Title: [254371] trunk/Source/WebCore
Revision
254371
Author
[email protected]
Date
2020-01-10 15:13:34 -0800 (Fri, 10 Jan 2020)

Log Message

[LFC][Integration] Fix accessibility/deleting-iframe-destroys-axcache.html and accessibility/div-within-anchors-causes-crash.html
https://bugs.webkit.org/show_bug.cgi?id=206072

Reviewed by Zalan Bujtas.

* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::lineCount const):

We may have a line layout with 0 runs but 1 line. In these cases line count must return 0
to match other systems.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (254370 => 254371)


--- trunk/Source/WebCore/ChangeLog	2020-01-10 22:52:23 UTC (rev 254370)
+++ trunk/Source/WebCore/ChangeLog	2020-01-10 23:13:34 UTC (rev 254371)
@@ -1,3 +1,16 @@
+2020-01-10  Antti Koivisto  <[email protected]>
+
+        [LFC][Integration] Fix accessibility/deleting-iframe-destroys-axcache.html and accessibility/div-within-anchors-causes-crash.html
+        https://bugs.webkit.org/show_bug.cgi?id=206072
+
+        Reviewed by Zalan Bujtas.
+
+        * layout/integration/LayoutIntegrationLineLayout.cpp:
+        (WebCore::LayoutIntegration::LineLayout::lineCount const):
+
+        We may have a line layout with 0 runs but 1 line. In these cases line count must return 0
+        to match other systems.
+
 2020-01-10  Jiewen Tan  <[email protected]>
 
         [WebAuthn] Support authenticatorGetNextAssertion

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp (254370 => 254371)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp	2020-01-10 22:52:23 UTC (rev 254370)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp	2020-01-10 23:13:34 UTC (rev 254371)
@@ -105,7 +105,11 @@
 size_t LineLayout::lineCount() const
 {
     auto* inlineContent = displayInlineContent();
-    return inlineContent ? inlineContent->lineBoxes.size() : 0;
+    if (!inlineContent)
+        return 0;
+    if (inlineContent->runs.isEmpty())
+        return 0;
+    return inlineContent->lineBoxes.size();
 }
 
 LayoutUnit LineLayout::firstLineBaseline() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to