Title: [283290] branches/safari-613.1.3-branch
Revision
283290
Author
[email protected]
Date
2021-09-29 17:57:35 -0700 (Wed, 29 Sep 2021)

Log Message

Cherry-pick r283087. rdar://problem/83697121

    Line iterator firstRun/lastRun may return runs from wrong lines
    https://bugs.webkit.org/show_bug.cgi?id=230770
    <rdar://problem/83509753>

    Reviewed by Alan Bujtas.

    Source/WebCore:

    In some situation line iterator firstRun/lastRun could return runs from different lines.
    This could lead to inconsistencies like firstRun being non-null while lastRun is null.

    Test: editing/iterator-line-start-end.html

    * layout/integration/LayoutIntegrationLineIteratorModernPath.h:
    (WebCore::LayoutIntegration::LineIteratorModernPath::firstRun const):
    (WebCore::LayoutIntegration::LineIteratorModernPath::lastRun const):

    Take care to only return runs from this line.

    LayoutTests:

    * editing/iterator-line-start-end-expected.txt: Added.
    * editing/iterator-line-start-end.html: Added.

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

Modified Paths

Added Paths

Diff

Modified: branches/safari-613.1.3-branch/LayoutTests/ChangeLog (283289 => 283290)


--- branches/safari-613.1.3-branch/LayoutTests/ChangeLog	2021-09-30 00:55:27 UTC (rev 283289)
+++ branches/safari-613.1.3-branch/LayoutTests/ChangeLog	2021-09-30 00:57:35 UTC (rev 283290)
@@ -1,3 +1,45 @@
+2021-09-29  Alan Coon  <[email protected]>
+
+        Cherry-pick r283087. rdar://problem/83697121
+
+    Line iterator firstRun/lastRun may return runs from wrong lines
+    https://bugs.webkit.org/show_bug.cgi?id=230770
+    <rdar://problem/83509753>
+    
+    Reviewed by Alan Bujtas.
+    
+    Source/WebCore:
+    
+    In some situation line iterator firstRun/lastRun could return runs from different lines.
+    This could lead to inconsistencies like firstRun being non-null while lastRun is null.
+    
+    Test: editing/iterator-line-start-end.html
+    
+    * layout/integration/LayoutIntegrationLineIteratorModernPath.h:
+    (WebCore::LayoutIntegration::LineIteratorModernPath::firstRun const):
+    (WebCore::LayoutIntegration::LineIteratorModernPath::lastRun const):
+    
+    Take care to only return runs from this line.
+    
+    LayoutTests:
+    
+    * editing/iterator-line-start-end-expected.txt: Added.
+    * editing/iterator-line-start-end.html: Added.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-09-26  Antti Koivisto  <[email protected]>
+
+            Line iterator firstRun/lastRun may return runs from wrong lines
+            https://bugs.webkit.org/show_bug.cgi?id=230770
+            <rdar://problem/83509753>
+
+            Reviewed by Alan Bujtas.
+
+            * editing/iterator-line-start-end-expected.txt: Added.
+            * editing/iterator-line-start-end.html: Added.
+
 2021-09-23  Tim Nguyen  <[email protected]>
 
         Make inert nodes invisible to hit testing

Added: branches/safari-613.1.3-branch/LayoutTests/editing/iterator-line-start-end-expected.txt (0 => 283290)


--- branches/safari-613.1.3-branch/LayoutTests/editing/iterator-line-start-end-expected.txt	                        (rev 0)
+++ branches/safari-613.1.3-branch/LayoutTests/editing/iterator-line-start-end-expected.txt	2021-09-30 00:57:35 UTC (rev 283290)
@@ -0,0 +1,3 @@
+
+This test passes if it doesn't crash
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x

Added: branches/safari-613.1.3-branch/LayoutTests/editing/iterator-line-start-end.html (0 => 283290)


--- branches/safari-613.1.3-branch/LayoutTests/editing/iterator-line-start-end.html	                        (rev 0)
+++ branches/safari-613.1.3-branch/LayoutTests/editing/iterator-line-start-end.html	2021-09-30 00:57:35 UTC (rev 283290)
@@ -0,0 +1,9 @@
+<img align="right" height="100">
+<div>This test passes if it doesn't crash</div>
+<div>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x</div>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+
+document.execCommand("selectAll");
+</script>

Modified: branches/safari-613.1.3-branch/Source/WebCore/ChangeLog (283289 => 283290)


--- branches/safari-613.1.3-branch/Source/WebCore/ChangeLog	2021-09-30 00:55:27 UTC (rev 283289)
+++ branches/safari-613.1.3-branch/Source/WebCore/ChangeLog	2021-09-30 00:57:35 UTC (rev 283290)
@@ -1,3 +1,53 @@
+2021-09-29  Alan Coon  <[email protected]>
+
+        Cherry-pick r283087. rdar://problem/83697121
+
+    Line iterator firstRun/lastRun may return runs from wrong lines
+    https://bugs.webkit.org/show_bug.cgi?id=230770
+    <rdar://problem/83509753>
+    
+    Reviewed by Alan Bujtas.
+    
+    Source/WebCore:
+    
+    In some situation line iterator firstRun/lastRun could return runs from different lines.
+    This could lead to inconsistencies like firstRun being non-null while lastRun is null.
+    
+    Test: editing/iterator-line-start-end.html
+    
+    * layout/integration/LayoutIntegrationLineIteratorModernPath.h:
+    (WebCore::LayoutIntegration::LineIteratorModernPath::firstRun const):
+    (WebCore::LayoutIntegration::LineIteratorModernPath::lastRun const):
+    
+    Take care to only return runs from this line.
+    
+    LayoutTests:
+    
+    * editing/iterator-line-start-end-expected.txt: Added.
+    * editing/iterator-line-start-end.html: Added.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-09-26  Antti Koivisto  <[email protected]>
+
+            Line iterator firstRun/lastRun may return runs from wrong lines
+            https://bugs.webkit.org/show_bug.cgi?id=230770
+            <rdar://problem/83509753>
+
+            Reviewed by Alan Bujtas.
+
+            In some situation line iterator firstRun/lastRun could return runs from different lines.
+            This could lead to inconsistencies like firstRun being non-null while lastRun is null.
+
+            Test: editing/iterator-line-start-end.html
+
+            * layout/integration/LayoutIntegrationLineIteratorModernPath.h:
+            (WebCore::LayoutIntegration::LineIteratorModernPath::firstRun const):
+            (WebCore::LayoutIntegration::LineIteratorModernPath::lastRun const):
+
+            Take care to only return runs from this line.
+
 2021-09-25  Alan Bujtas  <[email protected]>
 
         Fix win build.

Modified: branches/safari-613.1.3-branch/Source/WebCore/layout/integration/LayoutIntegrationLineIteratorModernPath.h (283289 => 283290)


--- branches/safari-613.1.3-branch/Source/WebCore/layout/integration/LayoutIntegrationLineIteratorModernPath.h	2021-09-30 00:55:27 UTC (rev 283289)
+++ branches/safari-613.1.3-branch/Source/WebCore/layout/integration/LayoutIntegrationLineIteratorModernPath.h	2021-09-30 00:57:35 UTC (rev 283290)
@@ -102,7 +102,7 @@
             return { *m_inlineContent };
         auto runIterator = RunIteratorModernPath { *m_inlineContent, line().firstBoxIndex() };
         if (runIterator.box().isInlineBox())
-            runIterator.traverseNextLeaf();
+            runIterator.traverseNextOnLine();
         return runIterator;
     }
 
@@ -113,7 +113,7 @@
             return { *m_inlineContent };
         auto runIterator = RunIteratorModernPath { *m_inlineContent, line().firstBoxIndex() + boxCount - 1 };
         if (runIterator.box().isInlineBox())
-            runIterator.traversePreviousLeaf();
+            runIterator.traversePreviousOnLine();
         return runIterator;
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to