Title: [282932] branches/safari-612-branch/Source/WebCore
Revision
282932
Author
repst...@apple.com
Date
2021-09-22 22:13:48 -0700 (Wed, 22 Sep 2021)

Log Message

Cherry-pick r281847. rdar://problem/83429949

    visualWordPosition should operate on a clean tree
    https://bugs.webkit.org/show_bug.cgi?id=229744
    <rdar://80684065>

    Reviewed by Antti Koivisto.

    This function expects the tree to not be mutated while walking the inline runs.

    * editing/VisibleUnits.cpp:
    (WebCore::visualWordPosition):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281847 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-612-branch/Source/WebCore/ChangeLog (282931 => 282932)


--- branches/safari-612-branch/Source/WebCore/ChangeLog	2021-09-23 05:13:45 UTC (rev 282931)
+++ branches/safari-612-branch/Source/WebCore/ChangeLog	2021-09-23 05:13:48 UTC (rev 282932)
@@ -1,5 +1,36 @@
 2021-09-22  Alan Coon  <alanc...@apple.com>
 
+        Cherry-pick r281847. rdar://problem/83429949
+
+    visualWordPosition should operate on a clean tree
+    https://bugs.webkit.org/show_bug.cgi?id=229744
+    <rdar://80684065>
+    
+    Reviewed by Antti Koivisto.
+    
+    This function expects the tree to not be mutated while walking the inline runs.
+    
+    * editing/VisibleUnits.cpp:
+    (WebCore::visualWordPosition):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-09-01  Alan Bujtas  <za...@apple.com>
+
+            visualWordPosition should operate on a clean tree
+            https://bugs.webkit.org/show_bug.cgi?id=229744
+            <rdar://80684065>
+
+            Reviewed by Antti Koivisto.
+
+            This function expects the tree to not be mutated while walking the inline runs.
+
+            * editing/VisibleUnits.cpp:
+            (WebCore::visualWordPosition):
+
+2021-09-22  Alan Coon  <alanc...@apple.com>
+
         Cherry-pick r281839. rdar://problem/83429771
 
     [GPU Process](REGRESSION): A detached canvas leaks all the images it draws

Modified: branches/safari-612-branch/Source/WebCore/editing/VisibleUnits.cpp (282931 => 282932)


--- branches/safari-612-branch/Source/WebCore/editing/VisibleUnits.cpp	2021-09-23 05:13:45 UTC (rev 282931)
+++ branches/safari-612-branch/Source/WebCore/editing/VisibleUnits.cpp	2021-09-23 05:13:48 UTC (rev 282932)
@@ -309,9 +309,11 @@
 static VisiblePosition visualWordPosition(const VisiblePosition& visiblePosition, CursorMovementDirection direction, 
     bool skipsSpaceWhenMovingRight)
 {
-    if (visiblePosition.isNull())
+    if (visiblePosition.isNull() || !visiblePosition.deepEquivalent().document())
         return VisiblePosition();
 
+    visiblePosition.deepEquivalent().document()->updateLayoutIgnorePendingStylesheets();
+
     TextDirection blockDirection = directionOfEnclosingBlock(visiblePosition.deepEquivalent());
     LayoutIntegration::RunIterator previouslyVisitedRun;
     VisiblePosition current = visiblePosition;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to