Revise CompositeEditCommand::DeleteSelection(EditingState*, ...) |
||
Issue description
We should change CompositeEditCommand::DeleteSelection(EditingState*, ...)
to return |true| if not aborted and |false| if aborted and it
should abort if one of ending_selection_ or starting_selection_ is not
valid for |GetDocument()|.
Current pattern:
DeleteSelection(editing_state, false, true);
if (editing_state->IsAborted())
return;
// |ending_selection_| may not be valid for document.
insertion_position = EndingVisibleSelection().Start();
affinity = EndingVisibleSelection().Affinity();
New pattern:
if (!DeleteSelection(editing_state, false, true))
return;
insertion_position = EndingVisibleSelection().Start();
affinity = EndingVisibleSelection().Affinity();
,
Oct 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b9b2767247a5ee13eedee9977fd02a788dc264c6 commit b9b2767247a5ee13eedee9977fd02a788dc264c6 Author: tanvir.rizvi <tanvir.rizvi@samsung.com> Date: Wed Oct 11 11:06:15 2017 Revise CompositeEditCommand::DeleteSelection Make CompositeEditCommand::DeleteSelection to return true/false based on the editing state. Also abort the editing state if ending selection is not valid for the document. Bug: 772248 Change-Id: Iea9291498311e6890a4fe1bc3615b441248f0921 Reviewed-on: https://chromium-review.googlesource.com/709574 Reviewed-by: Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Tanvir Rizvi <tanvir.rizvi@samsung.com> Cr-Commit-Position: refs/heads/master@{#507946} [modify] https://crrev.com/b9b2767247a5ee13eedee9977fd02a788dc264c6/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp [modify] https://crrev.com/b9b2767247a5ee13eedee9977fd02a788dc264c6/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp [modify] https://crrev.com/b9b2767247a5ee13eedee9977fd02a788dc264c6/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h [modify] https://crrev.com/b9b2767247a5ee13eedee9977fd02a788dc264c6/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp [modify] https://crrev.com/b9b2767247a5ee13eedee9977fd02a788dc264c6/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp [modify] https://crrev.com/b9b2767247a5ee13eedee9977fd02a788dc264c6/third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp [modify] https://crrev.com/b9b2767247a5ee13eedee9977fd02a788dc264c6/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp [modify] https://crrev.com/b9b2767247a5ee13eedee9977fd02a788dc264c6/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
,
Oct 25 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by tanvir.r...@samsung.com
, Oct 6 2017Status: Assigned (was: Available)