Changeset 269894 in webkit


Ignore:
Timestamp:
Nov 17, 2020 12:22:08 AM (3 years ago)
Author:
commit-queue@webkit.org
Message:

Check whether destination still can be selected
https://bugs.webkit.org/show_bug.cgi?id=218491

Patch by Rob Buis <rbuis@igalia.com> on 2020-11-17
Reviewed by Ryosuke Niwa.

Source/WebCore:

Check whether destination still can be selected
after deletion.

Test: editing/deleting/delete-selection-crash.html

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::moveParagraphs):

LayoutTests:

Add testcase.

  • editing/deleting/delete-selection-crash-expected.txt: Added.
  • editing/deleting/delete-selection-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r269888 r269894  
     12020-11-17  Rob Buis  <rbuis@igalia.com>
     2
     3        Check whether destination still can be selected
     4        https://bugs.webkit.org/show_bug.cgi?id=218491
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Add testcase.
     9
     10        * editing/deleting/delete-selection-crash-expected.txt: Added.
     11        * editing/deleting/delete-selection-crash.html: Added.
     12
    1132020-11-16  Sam Weinig  <weinig@apple.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r269893 r269894  
     12020-11-17  Rob Buis  <rbuis@igalia.com>
     2
     3        Check whether destination still can be selected
     4        https://bugs.webkit.org/show_bug.cgi?id=218491
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Check whether destination still can be selected
     9        after deletion.
     10
     11        Test: editing/deleting/delete-selection-crash.html
     12
     13        * editing/CompositeEditCommand.cpp:
     14        (WebCore::CompositeEditCommand::moveParagraphs):
     15
    1162020-11-16  Kimmo Kinnunen  <kkinnunen@apple.com>
    217
  • trunk/Source/WebCore/editing/CompositeEditCommand.cpp

    r269609 r269894  
    14591459
    14601460    // FIXME (Bug 211793): We should redesign cleanupAfterDeletion or find another destination when it is removed.
    1461     if (!destination.deepEquivalent().anchorNode()->isConnected())
     1461    if (!destination.deepEquivalent().anchorNode()->isConnected() || VisibleSelection(destination, originalIsDirectional).isNone())
    14621462        return;
    14631463
Note: See TracChangeset for help on using the changeset viewer.