New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 772248 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit 16 days ago
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Revise CompositeEditCommand::DeleteSelection(EditingState*, ...)

Project Member Reported by yosin@chromium.org, Oct 6 2017

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();


 
Owner: tanvir.r...@samsung.com
Status: Assigned (was: Available)
I will work on this.
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Status: Fixed (was: Assigned)

Sign in to add a comment