Changeset 210831 in webkit


Ignore:
Timestamp:
Jan 17, 2017, 4:02:42 PM (9 years ago)
Author:
Alan Bujtas
Message:

Editing nested RTL-LTR content makes the process unresponsive.
https://bugs.webkit.org/show_bug.cgi?id=167140
rdar://problem/29057611

Reviewed by Ryosuke Niwa.

Source/WebCore:

Break out of the loop if we keep coming back to the same position.
This is a workaround for the underlying editing/position bug -> webkit.org/b/167138.

Test: editing/rtl-to-ltr-editing-word-move-spin.html

  • editing/VisibleUnits.cpp:

(WebCore::visualWordPosition):

LayoutTests:

  • editing/rtl-to-ltr-editing-word-move-spin-expected.txt: Added.
  • editing/rtl-to-ltr-editing-word-move-spin.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r210830 r210831  
     12017-01-17  Zalan Bujtas  <zalan@apple.com>
     2
     3        Editing nested RTL-LTR content makes the process unresponsive.
     4        https://bugs.webkit.org/show_bug.cgi?id=167140
     5        rdar://problem/29057611
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        * editing/rtl-to-ltr-editing-word-move-spin-expected.txt: Added.
     10        * editing/rtl-to-ltr-editing-word-move-spin.html: Added.
     11
    1122017-01-17  Ryan Haddad  <ryanhaddad@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r210829 r210831  
     12017-01-17  Zalan Bujtas  <zalan@apple.com>
     2
     3        Editing nested RTL-LTR content makes the process unresponsive.
     4        https://bugs.webkit.org/show_bug.cgi?id=167140
     5        rdar://problem/29057611
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        Break out of the loop if we keep coming back to the same position.
     10        This is a workaround for the underlying editing/position bug -> webkit.org/b/167138.
     11
     12        Test: editing/rtl-to-ltr-editing-word-move-spin.html
     13
     14        * editing/VisibleUnits.cpp:
     15        (WebCore::visualWordPosition):
     16
    1172017-01-16  Filip Pizlo  <fpizlo@apple.com>
    218
  • trunk/Source/WebCore/editing/VisibleUnits.cpp

    r209907 r210831  
    353353    InlineBox* previouslyVisitedBox = nullptr;
    354354    VisiblePosition current = visiblePosition;
     355    std::optional<VisiblePosition> previousPosition;
    355356    UBreakIterator* iter = nullptr;
    356357
     
    361362        VisiblePosition adjacentCharacterPosition = direction == MoveRight ? current.right(true) : current.left(true);
    362363        if (adjacentCharacterPosition == current || adjacentCharacterPosition.isNull())
     364            return VisiblePosition();
     365        // FIXME: This is a workaround for webkit.org/b/167138.
     366        if (previousPosition && adjacentCharacterPosition == previousPosition.value())
    363367            return VisiblePosition();
    364368   
     
    410414            return adjacentCharacterPosition;
    411415   
     416        previousPosition = current;
    412417        current = adjacentCharacterPosition;
    413418    }
Note: See TracChangeset for help on using the changeset viewer.