New issue
Advanced search Search tips

Issue 672405 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Task



Sign in to add a comment

We should make Editor class small

Project Member Reported by yosin@chromium.org, Dec 8 2016

Issue description

* Make Editor class expose only sub-components and query/update states
* Move command related functions into “core/editing/commands/” as preparation of allowing usage of VisiblePosition and VisibleSelection only in "core/editing/commands/"

See [1] for details

[1] https://goo.gl/7FJ8fT


 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8ea5693d5cf304e56174bb6b65412f04209904db

commit 8ea5693d5cf304e56174bb6b65412f04209904db
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Wed Jul 26 01:37:59 2017

Move Editor::Transpose() out of Editor class

This patch moves |Editor::Transpose()| out of |Editor| class as preparation of
expanding it into |ExecutTranspose()| in "EditorCommand.cpp" to make |Editor|
class simpler for improving code health.

Following patch will expand |Transpose()| into |ExecutTranspose()|.

Bug: 672405
Change-Id: Icde253623f31813d2b4517c4da7d4798bd5fadf6
Reviewed-on: https://chromium-review.googlesource.com/583880
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489518}
[modify] https://crrev.com/8ea5693d5cf304e56174bb6b65412f04209904db/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/8ea5693d5cf304e56174bb6b65412f04209904db/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/8ea5693d5cf304e56174bb6b65412f04209904db/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 2 by bugdroid1@chromium.org, Aug 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8e8a1e936822c02b711e6e3e1b0a7dee42d2e4d1

commit 8e8a1e936822c02b711e6e3e1b0a7dee42d2e4d1
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Sat Aug 05 14:56:41 2017

Refactor Editor::SelectionForCommand() for improving readability

This patch changes |Editor::SelectionForCommand()| to utilize early-return style
and |const| variable for improving readability.

Bug: 672405
Change-Id: I0d2de5f1395861cb96be61dccde418677d6b48de
Reviewed-on: https://chromium-review.googlesource.com/601573
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492240}
[modify] https://crrev.com/8e8a1e936822c02b711e6e3e1b0a7dee42d2e4d1/third_party/WebKit/Source/core/editing/Editor.cpp

Labels: Type-Task
Project Member

Comment 4 by bugdroid1@chromium.org, Feb 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/64ace9566d83786c4928cc7a40b853727e674be7

commit 64ace9566d83786c4928cc7a40b853727e674be7
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Tue Feb 06 06:39:46 2018

Move PerformDelete() to EditorCommand.cpp

Editor::PerformDelete() is called by ExecuteDelete() and
ExecuteDeleteToMark() in EditorCommand.cpp. Move it to make |Editor|
class simpler for improving code health.

BUG=672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: Ia6badc79b924b87a7489da677124a69423a02e12
Reviewed-on: https://chromium-review.googlesource.com/903303
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534645}
[modify] https://crrev.com/64ace9566d83786c4928cc7a40b853727e674be7/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/64ace9566d83786c4928cc7a40b853727e674be7/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/64ace9566d83786c4928cc7a40b853727e674be7/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 5 by bugdroid1@chromium.org, Feb 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cb25260fce9c8c7f765fdead9659282d15e37243

commit cb25260fce9c8c7f765fdead9659282d15e37243
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Tue Feb 06 09:08:07 2018

Move FindStringAndScrollToVisible to TextFinder.cpp

Editor::FindStringAndScrollToVisible only used in TextFinder.cpp, split
it to FindRangeOfString() and ScrollToVisible(), move ScrollToVisible()
to TextFinder.cpp as a static function.

Bug: 672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: Ic86f7bf824c41c3c01bec29e266df32388f59309
Reviewed-on: https://chromium-review.googlesource.com/903203
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534665}
[modify] https://crrev.com/cb25260fce9c8c7f765fdead9659282d15e37243/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/cb25260fce9c8c7f765fdead9659282d15e37243/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/cb25260fce9c8c7f765fdead9659282d15e37243/third_party/WebKit/Source/core/editing/finder/TextFinder.cpp

Comment 6 by yosin@chromium.org, Feb 7 2018

Description: Show this description
Project Member

Comment 7 by bugdroid1@chromium.org, Feb 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4a39a11a4105371b98745ec6146bc8b688d8426f

commit 4a39a11a4105371b98745ec6146bc8b688d8426f
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Wed Feb 07 04:59:18 2018

Move ApplyStyleToSelection() to EditorCommand.cpp

Editor::ApplyStyleToSelection() is only called in EditorCommand.cpp.
Move it to make |Editor| class simpler for improving code health.

BUG=672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: I9a9cafa0ffff7da560ee2bc7fcd2e5bf15059665
Reviewed-on: https://chromium-review.googlesource.com/905962
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534919}
[modify] https://crrev.com/4a39a11a4105371b98745ec6146bc8b688d8426f/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/4a39a11a4105371b98745ec6146bc8b688d8426f/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/4a39a11a4105371b98745ec6146bc8b688d8426f/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 8 by bugdroid1@chromium.org, Feb 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/91179078c4b39dc548bae7ff055e7bf13faccda8

commit 91179078c4b39dc548bae7ff055e7bf13faccda8
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Wed Feb 07 05:03:27 2018

Move SelectionStartCSSPropertyValue() to EditorCommand.cpp

Editor::SelectionStartCSSPropertyValue() is called by ValueStyle() in
EditorCommand.cpp. Move it to make |Editor| class simpler for improving
code health.

BUG=672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: I221c9a73185b50d3c90e458810d545fd091e9df1
Reviewed-on: https://chromium-review.googlesource.com/903624
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534920}
[modify] https://crrev.com/91179078c4b39dc548bae7ff055e7bf13faccda8/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/91179078c4b39dc548bae7ff055e7bf13faccda8/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/91179078c4b39dc548bae7ff055e7bf13faccda8/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 9 by bugdroid1@chromium.org, Feb 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1e091778a08acb3ba5dcae027b2a22126cb3be0e

commit 1e091778a08acb3ba5dcae027b2a22126cb3be0e
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Wed Feb 07 06:25:53 2018

Move Paste() to EditorCommand.cpp

Editor::Paste() is called by ExecutePasteGlobalSelection() and
ExecutePaste() in EditorCommand.cpp. Move it with related functions to
make |Editor| class simpler for improving code health.

BUG=672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: I0aa8dcfd46abc01fee409909b5ebc3a25899768b
Reviewed-on: https://chromium-review.googlesource.com/903944
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534935}
[modify] https://crrev.com/1e091778a08acb3ba5dcae027b2a22126cb3be0e/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/1e091778a08acb3ba5dcae027b2a22126cb3be0e/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/1e091778a08acb3ba5dcae027b2a22126cb3be0e/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 10 by bugdroid1@chromium.org, Feb 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2361a9ee91d85b36f6905eb39191702bf58ee0e4

commit 2361a9ee91d85b36f6905eb39191702bf58ee0e4
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Wed Feb 07 08:02:40 2018

Move SelectionStartHasStyle() to EditorCommand.cpp

Editor::SelectionStartHasStyle() is called by ExecuteToggleStyle() and
StateStyle() in EditorCommand.cpp. Move it to make |Editor| class
simpler for improving code health.

BUG=672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: If49003e547180fcc0b86f2104eb4df6d0ae1ae22
Reviewed-on: https://chromium-review.googlesource.com/903902
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534949}
[modify] https://crrev.com/2361a9ee91d85b36f6905eb39191702bf58ee0e4/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/2361a9ee91d85b36f6905eb39191702bf58ee0e4/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/2361a9ee91d85b36f6905eb39191702bf58ee0e4/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 11 by bugdroid1@chromium.org, Feb 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c21ef2f2c6458957b1b1a26653ee035e31c05c7f

commit c21ef2f2c6458957b1b1a26653ee035e31c05c7f
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Thu Feb 08 01:20:25 2018

Move ApplyStyle() to EditorCommand.cpp

Editor::ApplyStyle() is only called in EditorCommand.cpp.
Move it to make |Editor| class simpler for improving code health.

BUG=672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: Ie2f2b9d89620481840ad25eadf73e97747d72bef
Reviewed-on: https://chromium-review.googlesource.com/906174
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535232}
[modify] https://crrev.com/c21ef2f2c6458957b1b1a26653ee035e31c05c7f/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/c21ef2f2c6458957b1b1a26653ee035e31c05c7f/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/c21ef2f2c6458957b1b1a26653ee035e31c05c7f/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 12 by bugdroid1@chromium.org, Feb 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7fe74ce42cd5de74f0610c4a918fae9ef64aec38

commit 7fe74ce42cd5de74f0610c4a918fae9ef64aec38
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Fri Feb 09 04:12:10 2018

Change to use FindEventTargetFrom() instead of FindEventTargetFromSelection().

Change the callers of FindEventTargetFromSelection() to use
FindEventTargetFrom() instead. Make |Editor| class simpler for improving
code health.

BUG=672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: I05e80e247093d92e79eb051a27e6d95c21e18832
Reviewed-on: https://chromium-review.googlesource.com/906049
Reviewed-by: Steve Kobes <skobes@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535632}
[modify] https://crrev.com/7fe74ce42cd5de74f0610c4a918fae9ef64aec38/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/7fe74ce42cd5de74f0610c4a918fae9ef64aec38/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/7fe74ce42cd5de74f0610c4a918fae9ef64aec38/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
[modify] https://crrev.com/7fe74ce42cd5de74f0610c4a918fae9ef64aec38/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionController.cpp
[modify] https://crrev.com/7fe74ce42cd5de74f0610c4a918fae9ef64aec38/third_party/WebKit/Source/core/page/DragController.cpp

Project Member

Comment 13 by bugdroid1@chromium.org, Feb 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/48a953f5401b8941f9f4bf2922ca6db442c9749d

commit 48a953f5401b8941f9f4bf2922ca6db442c9749d
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Fri Feb 09 06:41:18 2018

Migrate RemoveFormattingAndStyle() into ExecuteRemoveFormat().

Editor::RemoveFormattingAndStyle() is called by ExecuteRemoveFormat()
in EditorCommand.cpp. Move it to make |Editor| class simpler for
improving code health.

BUG=672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: I61b0428063d43025f951a8337efc7302bb182e17
Reviewed-on: https://chromium-review.googlesource.com/910531
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535662}
[modify] https://crrev.com/48a953f5401b8941f9f4bf2922ca6db442c9749d/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/48a953f5401b8941f9f4bf2922ca6db442c9749d/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/48a953f5401b8941f9f4bf2922ca6db442c9749d/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 14 by bugdroid1@chromium.org, Feb 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3b703ba20033b05a4e00ddb7d1e49bca2a9a761f

commit 3b703ba20033b05a4e00ddb7d1e49bca2a9a761f
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Tue Feb 13 09:07:48 2018

Expose SelectionHasStyle() as a static funtion of |EditingStyle|.

Move Editor::SelectionHasStyle() to EditingStyle. Expose it as a static
funtion. Make |Editor| simpler for improving code health.

Bug: 672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: I8c3da99cbcd67a38eaaacdad6e07a10aee95534a
Reviewed-on: https://chromium-review.googlesource.com/913049
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536305}
[modify] https://crrev.com/3b703ba20033b05a4e00ddb7d1e49bca2a9a761f/third_party/WebKit/Source/core/editing/EditingStyle.cpp
[modify] https://crrev.com/3b703ba20033b05a4e00ddb7d1e49bca2a9a761f/third_party/WebKit/Source/core/editing/EditingStyle.h
[modify] https://crrev.com/3b703ba20033b05a4e00ddb7d1e49bca2a9a761f/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/3b703ba20033b05a4e00ddb7d1e49bca2a9a761f/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/3b703ba20033b05a4e00ddb7d1e49bca2a9a761f/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
[modify] https://crrev.com/3b703ba20033b05a4e00ddb7d1e49bca2a9a761f/third_party/WebKit/Source/core/page/ContextMenuController.cpp

Project Member

Comment 15 by bugdroid1@chromium.org, Feb 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6d000d46d7ddc2a268b2fa18142211b9a4957797

commit 6d000d46d7ddc2a268b2fa18142211b9a4957797
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Tue Feb 13 09:09:21 2018

Migrate CanDHTML{Copy,Cut}() to Enabled{Copy,Cut}().

Editor::CanDHTMLCopy() is called by EnabledCopy() and
Editor::CanDHTMLCut() is called by EnabledCut() in EditorCommand.cpp.
Move them to make |Editor| class simpler for improving code health.

Bug: 672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: I20d034e9d9adfdc283d58cfc451c2e22340cdc27
Reviewed-on: https://chromium-review.googlesource.com/910752
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536308}
[modify] https://crrev.com/6d000d46d7ddc2a268b2fa18142211b9a4957797/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/6d000d46d7ddc2a268b2fa18142211b9a4957797/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/6d000d46d7ddc2a268b2fa18142211b9a4957797/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 16 by bugdroid1@chromium.org, Feb 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/deb4a13220db89bebd3d1837f7c8fb6cb7a7b8e6

commit deb4a13220db89bebd3d1837f7c8fb6cb7a7b8e6
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Tue Feb 13 09:12:40 2018

Move WriteImageNodeToPasteboard to EditingUtilities.

Move WriteImageNodeToPasteboard() to make |Editor| class simpler for
improving code health.

Bug: 672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: Id3e7ae73aa59e3ad012592b7ec5c7762196cfb21
Reviewed-on: https://chromium-review.googlesource.com/907813
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536309}
[modify] https://crrev.com/deb4a13220db89bebd3d1837f7c8fb6cb7a7b8e6/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/deb4a13220db89bebd3d1837f7c8fb6cb7a7b8e6/third_party/WebKit/Source/core/editing/EditingUtilities.h
[modify] https://crrev.com/deb4a13220db89bebd3d1837f7c8fb6cb7a7b8e6/third_party/WebKit/Source/core/editing/Editor.cpp

Project Member

Comment 17 by bugdroid1@chromium.org, Feb 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/16bd4066cd8263e8b6c4d2a26d19f98b26e5fec8

commit 16bd4066cd8263e8b6c4d2a26d19f98b26e5fec8
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Tue Feb 13 09:30:10 2018

Move TidyUpHTMLStructure() to EditingCommandsUtilities

Move TidyUpHTMLStructure() to make |Editor| class simpler for improving
code health. Move the related tests to EditingCommandsUtilitiesTest.

Bug: 672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: I48b56a330d085b24f0b64280d0ee60d6b672c464
Reviewed-on: https://chromium-review.googlesource.com/908388
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536315}
[modify] https://crrev.com/16bd4066cd8263e8b6c4d2a26d19f98b26e5fec8/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/16bd4066cd8263e8b6c4d2a26d19f98b26e5fec8/third_party/WebKit/Source/core/editing/EditorTest.cpp
[modify] https://crrev.com/16bd4066cd8263e8b6c4d2a26d19f98b26e5fec8/third_party/WebKit/Source/core/editing/commands/DocumentExecCommand.cpp
[modify] https://crrev.com/16bd4066cd8263e8b6c4d2a26d19f98b26e5fec8/third_party/WebKit/Source/core/editing/commands/EditingCommandsUtilities.cpp
[modify] https://crrev.com/16bd4066cd8263e8b6c4d2a26d19f98b26e5fec8/third_party/WebKit/Source/core/editing/commands/EditingCommandsUtilities.h
[modify] https://crrev.com/16bd4066cd8263e8b6c4d2a26d19f98b26e5fec8/third_party/WebKit/Source/core/editing/commands/EditingCommandsUtilitiesTest.cpp

Project Member

Comment 18 by bugdroid1@chromium.org, Feb 14 2018

Project Member

Comment 19 by bugdroid1@chromium.org, Feb 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/26a3c373c7d27eaf8e739ef82561c40445bf8fed

commit 26a3c373c7d27eaf8e739ef82561c40445bf8fed
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Mon Feb 26 06:14:13 2018

Move PasteAsFragment() to EditorCommand.cpp.

Editor::PasteAsFragment() is called by PasteWithPasteboard() in
EditorCommand.cpp. Move it to make |Editor| class simpler for improving
code health.

BUG=672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: Ia6c2d5f4ecb936e9fade8437fb8db1ebae508ded
Reviewed-on: https://chromium-review.googlesource.com/933683
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539077}
[modify] https://crrev.com/26a3c373c7d27eaf8e739ef82561c40445bf8fed/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/26a3c373c7d27eaf8e739ef82561c40445bf8fed/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/26a3c373c7d27eaf8e739ef82561c40445bf8fed/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 20 by bugdroid1@chromium.org, Feb 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b1a9b546e999fb977ba7d3c62887e10eef546621

commit b1a9b546e999fb977ba7d3c62887e10eef546621
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Mon Feb 26 06:22:16 2018

Remove TidyUpHTMLStructure() from Editor.h

Editor::TidyUpHTMLStructure() is moved to EditingCommandsUtilities in
crrev.com/c/908388 miss removing the declaration in Editor.h, remove it.

Bug: 672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: I6c5276ba93d0e45e0cdd82b42b9d1aebbdb6a1c0
Reviewed-on: https://chromium-review.googlesource.com/933666
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539078}
[modify] https://crrev.com/b1a9b546e999fb977ba7d3c62887e10eef546621/third_party/WebKit/Source/core/editing/Editor.h

Project Member

Comment 21 by bugdroid1@chromium.org, Feb 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8d963dab2ae602a6851c13fc60ad450336d8ba6a

commit 8d963dab2ae602a6851c13fc60ad450336d8ba6a
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Mon Feb 26 06:51:57 2018

Move DeleteWithDirection() to EditorCommand.cpp

Editor::DeleteWithDirection() is only called in EditorCommand.cpp. Move
it to make |Editor| class simpler for improving code health.

BUG=672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: I54d47bf44f6baa73bac2c54f767331f56f500352
Reviewed-on: https://chromium-review.googlesource.com/934382
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539081}
[modify] https://crrev.com/8d963dab2ae602a6851c13fc60ad450336d8ba6a/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/8d963dab2ae602a6851c13fc60ad450336d8ba6a/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/8d963dab2ae602a6851c13fc60ad450336d8ba6a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 22 by bugdroid1@chromium.org, Feb 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8fc41c99ab5bf2f386f26493b14aef0833f5d0a8

commit 8fc41c99ab5bf2f386f26493b14aef0833f5d0a8
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Mon Feb 26 08:58:23 2018

Migrate PasteAsPlainText() to PasteAsPlainTextWithPasteboard() in EditorCommand

Editor::PasteAsPlainText() is only called by
PasteAsPlainTextWithPasteboard() in EditorCommand.cpp. Move it to make
|Editor| class simpler for improving code health.

Bug: 672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: I02b43f067cea711e4b5e454fc8b28d5e4c33a7f0
Reviewed-on: https://chromium-review.googlesource.com/933665
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539090}
[modify] https://crrev.com/8fc41c99ab5bf2f386f26493b14aef0833f5d0a8/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/8fc41c99ab5bf2f386f26493b14aef0833f5d0a8/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/8fc41c99ab5bf2f386f26493b14aef0833f5d0a8/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 23 by bugdroid1@chromium.org, Feb 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8df41522f08abdf448b0be43b5047fb63b709120

commit 8df41522f08abdf448b0be43b5047fb63b709120
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Mon Feb 26 10:05:03 2018

Move FindEventTargetFrom() to EditingUtilities.

Move FindEventTargetFrom() out of |Editor| to make class simpler for
improving code health.

BUG=672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: Ib8ed084702ffbb58eb438eb83d59ed0c43f71233
Reviewed-on: https://chromium-review.googlesource.com/933684
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539098}
[modify] https://crrev.com/8df41522f08abdf448b0be43b5047fb63b709120/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/8df41522f08abdf448b0be43b5047fb63b709120/third_party/WebKit/Source/core/editing/EditingUtilities.h
[modify] https://crrev.com/8df41522f08abdf448b0be43b5047fb63b709120/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/8df41522f08abdf448b0be43b5047fb63b709120/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/8df41522f08abdf448b0be43b5047fb63b709120/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
[modify] https://crrev.com/8df41522f08abdf448b0be43b5047fb63b709120/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionController.cpp
[modify] https://crrev.com/8df41522f08abdf448b0be43b5047fb63b709120/third_party/WebKit/Source/core/page/DragController.cpp

Project Member

Comment 24 by bugdroid1@chromium.org, Feb 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3a9913c84f9d4b0fa856fad25fb111caaeb334c9

commit 3a9913c84f9d4b0fa856fad25fb111caaeb334c9
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Wed Feb 28 06:49:20 2018

Migrate Copy(),Cut() to Execute{Copy,Cut}() in EditorCommand.

Editor::Copy() is called by ExecuteCopy() and Editor::Cut() is called
by ExecuteCut() in EditorCommand.cpp. Move them to make |Editor| class
simpler for improving code health.

Bug: 672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: Ie1ad23ea7b1691dd119b6e476897ce97482f1a2c
Reviewed-on: https://chromium-review.googlesource.com/933741
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539736}
[modify] https://crrev.com/3a9913c84f9d4b0fa856fad25fb111caaeb334c9/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/3a9913c84f9d4b0fa856fad25fb111caaeb334c9/third_party/WebKit/Source/core/editing/EditingUtilities.h
[modify] https://crrev.com/3a9913c84f9d4b0fa856fad25fb111caaeb334c9/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/3a9913c84f9d4b0fa856fad25fb111caaeb334c9/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/3a9913c84f9d4b0fa856fad25fb111caaeb334c9/third_party/WebKit/Source/core/editing/EditorTest.cpp
[modify] https://crrev.com/3a9913c84f9d4b0fa856fad25fb111caaeb334c9/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 25 by bugdroid1@chromium.org, Feb 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/85c10dcb84b648e2422e5529f4ab4a80b731cf4f

commit 85c10dcb84b648e2422e5529f4ab4a80b731cf4f
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Wed Feb 28 09:27:46 2018

Move FirstRectForRange() to VisibleUnits.

Move FirstRectForRange() to VisibleUnits, make |Editor| class simpler
for improving code health.

BUG=672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: Iaca3148ba5a6f186a7870ede3ef59e0ddf4078bd
Reviewed-on: https://chromium-review.googlesource.com/938888
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539765}
[modify] https://crrev.com/85c10dcb84b648e2422e5529f4ab4a80b731cf4f/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/85c10dcb84b648e2422e5529f4ab4a80b731cf4f/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/85c10dcb84b648e2422e5529f4ab4a80b731cf4f/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/85c10dcb84b648e2422e5529f4ab4a80b731cf4f/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
[modify] https://crrev.com/85c10dcb84b648e2422e5529f4ab4a80b731cf4f/third_party/WebKit/Source/core/editing/VisibleUnits.h
[modify] https://crrev.com/85c10dcb84b648e2422e5529f4ab4a80b731cf4f/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp
[modify] https://crrev.com/85c10dcb84b648e2422e5529f4ab4a80b731cf4f/third_party/WebKit/Source/core/input/EventHandler.cpp

Project Member

Comment 26 by bugdroid1@chromium.org, Mar 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3b13b38f320a38d0d520c5c56f43e61cf7f7c8ca

commit 3b13b38f320a38d0d520c5c56f43e61cf7f7c8ca
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Thu Mar 01 08:10:44 2018

Move DispatchClipboardEvent() to EditorCommand.cpp

Editor::DispatchClipboardEvent() is only called in EditorCommand.cpp,
Move it to make |Editor| class simpler for improving code health.

Bug: 672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: Id7f8647cbd3eaa7d101ce46dae1f56b42b08edc0
Reviewed-on: https://chromium-review.googlesource.com/940785
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540100}
[modify] https://crrev.com/3b13b38f320a38d0d520c5c56f43e61cf7f7c8ca/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/3b13b38f320a38d0d520c5c56f43e61cf7f7c8ca/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/3b13b38f320a38d0d520c5c56f43e61cf7f7c8ca/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 27 by bugdroid1@chromium.org, Mar 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fddbc5a150de95c13d1c0ba41348434faf9f659e

commit fddbc5a150de95c13d1c0ba41348434faf9f659e
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Fri Mar 02 05:05:20 2018

Move FindEventTargetForClipboardEvent() to EditorCommand.cpp.

Editor::FindEventTargetForClipboardEvent() is only called in
EditorCommand.cpp. Move it to make |Editor| class simpler for improving
code health.

Bug: 672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: I0e8c3779ecf94a19f2b189ec1c838dcd2bff1d7c
Reviewed-on: https://chromium-review.googlesource.com/945168
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540448}
[modify] https://crrev.com/fddbc5a150de95c13d1c0ba41348434faf9f659e/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/fddbc5a150de95c13d1c0ba41348434faf9f659e/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/fddbc5a150de95c13d1c0ba41348434faf9f659e/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 28 by bugdroid1@chromium.org, Mar 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/099eef98bfd425d0ca08d5927831a242120c0b51

commit 099eef98bfd425d0ca08d5927831a242120c0b51
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Fri Mar 02 05:15:00 2018

Move *AppliedEditing() out of |Editor|.

Move AppliedEditing() to CompositeEditCommand.
Move UnappliedEditing() and ReappliedEditing() to UndoStep.
Move some related local functions to EditingCommandsUtilities.
This CL makes |Editor| class simple for improving code health.

Bug: 672405, 676001

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: Ia49f52490ec41292cd46ea136d0ae11a05c9e6ae
Reviewed-on: https://chromium-review.googlesource.com/930064
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540451}
[modify] https://crrev.com/099eef98bfd425d0ca08d5927831a242120c0b51/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/099eef98bfd425d0ca08d5927831a242120c0b51/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/099eef98bfd425d0ca08d5927831a242120c0b51/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
[modify] https://crrev.com/099eef98bfd425d0ca08d5927831a242120c0b51/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h
[modify] https://crrev.com/099eef98bfd425d0ca08d5927831a242120c0b51/third_party/WebKit/Source/core/editing/commands/EditingCommandsUtilities.cpp
[modify] https://crrev.com/099eef98bfd425d0ca08d5927831a242120c0b51/third_party/WebKit/Source/core/editing/commands/EditingCommandsUtilities.h
[modify] https://crrev.com/099eef98bfd425d0ca08d5927831a242120c0b51/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
[modify] https://crrev.com/099eef98bfd425d0ca08d5927831a242120c0b51/third_party/WebKit/Source/core/editing/commands/UndoStep.cpp

Project Member

Comment 29 by bugdroid1@chromium.org, Mar 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/527f682f49ce390f1c1bd36ef26ffb713c7cd4ef

commit 527f682f49ce390f1c1bd36ef26ffb713c7cd4ef
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Fri Mar 02 05:46:41 2018

Move CanSmartCopyOrDelete() to EditorCommand.cpp.

Editor::CanSmartCopyOrDelete() is only called in EditorCommand.cpp.
Move it to make |Editor| class simpler for improving code health.

Bug: 672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: I319abc60592f9a0a52b98e8b44b8ebb86a678e78
Reviewed-on: https://chromium-review.googlesource.com/945286
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540457}
[modify] https://crrev.com/527f682f49ce390f1c1bd36ef26ffb713c7cd4ef/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/527f682f49ce390f1c1bd36ef26ffb713c7cd4ef/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/527f682f49ce390f1c1bd36ef26ffb713c7cd4ef/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Cc: yosin@chromium.org
In document [1], There are some functions with "visit later" and 
some functions marked as "should be moved" but called by "keep" functions.

yosin@
Could you please help to update the document [1]?

[1] https://goo.gl/7FJ8fT
Project Member

Comment 31 by bugdroid1@chromium.org, Mar 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f37a10583cd049937e56331429e9953352d7da00

commit f37a10583cd049937e56331429e9953352d7da00
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Tue Mar 20 10:16:59 2018

Move Editor::Command to EditorCommand.h and rename to EditorCommand.

This CL introduces "EditorCommand.h", move class Editor::Command from
Editor.h to EditorCommand.h and rename it to EditorCommand. This make
|Editor| class simpler for improving code health.

Bug: 672405

Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Change-Id: I572094e32b4a7c19b62fcaf810165f9aab44db08
Reviewed-on: https://chromium-review.googlesource.com/958623
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544322}
[modify] https://crrev.com/f37a10583cd049937e56331429e9953352d7da00/third_party/WebKit/Source/core/editing/BUILD.gn
[modify] https://crrev.com/f37a10583cd049937e56331429e9953352d7da00/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/f37a10583cd049937e56331429e9953352d7da00/third_party/WebKit/Source/core/editing/EditorKeyBindings.cpp
[modify] https://crrev.com/f37a10583cd049937e56331429e9953352d7da00/third_party/WebKit/Source/core/editing/EditorTest.cpp
[modify] https://crrev.com/f37a10583cd049937e56331429e9953352d7da00/third_party/WebKit/Source/core/editing/commands/DocumentExecCommand.cpp
[modify] https://crrev.com/f37a10583cd049937e56331429e9953352d7da00/third_party/WebKit/Source/core/editing/commands/EditingCommandTest.cpp
[modify] https://crrev.com/f37a10583cd049937e56331429e9953352d7da00/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
[add] https://crrev.com/f37a10583cd049937e56331429e9953352d7da00/third_party/WebKit/Source/core/editing/commands/EditorCommand.h
[modify] https://crrev.com/f37a10583cd049937e56331429e9953352d7da00/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp

Sign in to add a comment