Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Issue 2576903002: [EditCommandSource] Pass source from |Editor::Command| to |Editor::apply*()/insert*()/...| (2/3) (Closed)

Created:
4 years ago by chongz
Modified:
4 years ago
Reviewers:
tkent, Xiaocheng
CC:
blink-reviews, chromium-reviews, Yuta Kitamura
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[EditCommandSource] Pass source from |Editor::Command| to |Editor::apply*()/insert*()/...| (2/3) This is the sub-patch (2/3) of supporting |EditCommandSource| in |CompositeEditCommand| (https://crrev.com/2574793002). This CL: 1. Added method |Editor::replaceSelectionForSpellChecker()| for |SpellChecker::replaceMisspelledRange()| to hide editor details; 2. Passed command source from |Editor::Command| to various methods in |Editor|, such as |performDelete()|, |removeFormattingAndStyle()|, |applyStyle()|, |replaceSelectionWithText()| etc. Note: It's OK to add extra |EditCommandSource| parameter to those methods because they are going to be moved to "EditorCommand.cpp" (according to the editing refactor doc), which means they should share the similar pattern as other |static execute*()| methods. This CL shouldn't have any behavior change. Next CL will pass command source down to |CompositeEditCommand| and |TypingCommand|. Editing Refactor doc: https://docs.google.com/a/chromium.org/document/d/1i-f5ByGHIvTcvy2UEAvOtBK14BNMFTB8ms9uedeArbw/edit?usp=sharing BUG=673789 Committed: https://crrev.com/f6fddd7fab5cf706023fc4f2edbdfa4fdd93d56f Cr-Commit-Position: refs/heads/master@{#439010}

Patch Set 1 #

Total comments: 23

Patch Set 2 : Xiaocheng's review: Add TODOs and DCHECK comments #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+168 lines, -111 lines) Patch
M third_party/WebKit/Source/core/editing/Editor.h View 1 7 chunks +30 lines, -14 lines 3 comments Download
M third_party/WebKit/Source/core/editing/Editor.cpp View 1 23 chunks +64 lines, -32 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp View 1 19 chunks +72 lines, -61 lines 0 comments Download
M third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 40 (29 generated)
chongz
xiaochengh@ This is the second sub-patch of the |CommandSource| CL (depends on the first one). ...
4 years ago (2016-12-15 00:39:14 UTC) #9
Xiaocheng
https://codereview.chromium.org/2576903002/diff/1/third_party/WebKit/Source/core/editing/Editor.cpp File third_party/WebKit/Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/2576903002/diff/1/third_party/WebKit/Source/core/editing/Editor.cpp#newcode379 third_party/WebKit/Source/core/editing/Editor.cpp:379: CommandSource, Please add a TODO about future plan so ...
4 years ago (2016-12-15 03:27:50 UTC) #12
Xiaocheng
https://codereview.chromium.org/2576903002/diff/1/third_party/WebKit/Source/core/editing/Editor.h File third_party/WebKit/Source/core/editing/Editor.h (right): https://codereview.chromium.org/2576903002/diff/1/third_party/WebKit/Source/core/editing/Editor.h#newcode277 third_party/WebKit/Source/core/editing/Editor.h:277: CommandSource = CommandSource::MenuOrKeyBinding); On 2016/12/15 at 03:27:50, Xiaocheng wrote: ...
4 years ago (2016-12-15 05:38:22 UTC) #13
chongz
Xiaocheng@ I've rebased and updated as per your comments, PTAL again, thanks! https://codereview.chromium.org/2576903002/diff/1/third_party/WebKit/Source/core/editing/Editor.cpp File third_party/WebKit/Source/core/editing/Editor.cpp ...
4 years ago (2016-12-16 00:45:22 UTC) #22
Xiaocheng
lgtm +tkent https://codereview.chromium.org/2576903002/diff/40001/third_party/WebKit/Source/core/editing/Editor.h File third_party/WebKit/Source/core/editing/Editor.h (right): https://codereview.chromium.org/2576903002/diff/40001/third_party/WebKit/Source/core/editing/Editor.h#newcode281 third_party/WebKit/Source/core/editing/Editor.h:281: void replaceSelectionForSpellChecker(const String&); On 2016/12/16 at 00:45:22, ...
4 years ago (2016-12-16 01:30:43 UTC) #24
tkent
lgtm
4 years ago (2016-12-16 02:38:40 UTC) #31
chongz
https://codereview.chromium.org/2576903002/diff/40001/third_party/WebKit/Source/core/editing/Editor.h File third_party/WebKit/Source/core/editing/Editor.h (right): https://codereview.chromium.org/2576903002/diff/40001/third_party/WebKit/Source/core/editing/Editor.h#newcode281 third_party/WebKit/Source/core/editing/Editor.h:281: void replaceSelectionForSpellChecker(const String&); On 2016/12/16 01:30:43, Xiaocheng wrote: > ...
4 years ago (2016-12-16 03:18:45 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2576903002/40001
4 years ago (2016-12-16 03:19:53 UTC) #34
commit-bot: I haz the power
Committed patchset #2 (id:40001)
4 years ago (2016-12-16 03:47:10 UTC) #37
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/f6fddd7fab5cf706023fc4f2edbdfa4fdd93d56f Cr-Commit-Position: refs/heads/master@{#439010}
4 years ago (2016-12-16 03:49:10 UTC) #39
chongz
3 years, 11 months ago (2017-01-17 14:57:57 UTC) #40
Message was sent while issue was closed.
A revert of this CL (patchset #2 id:40001) has been created in
https://codereview.chromium.org/2635963004/ by chongz@chromium.org.

The reason for reverting is: We want to revert all CLs and start over the
refactor process, see:
https://crbug.com/673789..

Powered by Google App Engine
This is Rietveld 408576698