Title: [292661] branches/safari-613-branch/Source/WebCore
Revision
292661
Author
alanc...@apple.com
Date
2022-04-08 17:14:18 -0700 (Fri, 08 Apr 2022)

Log Message

Cherry-pick r292054. rdar://problem/80630664

    WebCore::LegacyRootInlineBox::lineSnapAdjustment should bail out on grid line height < 1
    https://bugs.webkit.org/show_bug.cgi?id=238465
    <rdar://80630664>

    Reviewed by Antti Koivisto.

    The !gridLineHeight check was added to avoid division by zero but the integral roundToInt() may also produce a 0 value for
    gridLineHeight.

    * rendering/LegacyRootInlineBox.cpp:
    (WebCore::LegacyRootInlineBox::lineSnapAdjustment const):

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

Modified Paths

Diff

Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (292660 => 292661)


--- branches/safari-613-branch/Source/WebCore/ChangeLog	2022-04-09 00:14:15 UTC (rev 292660)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog	2022-04-09 00:14:18 UTC (rev 292661)
@@ -1,5 +1,38 @@
 2022-04-07  Alan Coon  <alanc...@apple.com>
 
+        Cherry-pick r292054. rdar://problem/80630664
+
+    WebCore::LegacyRootInlineBox::lineSnapAdjustment should bail out on grid line height < 1
+    https://bugs.webkit.org/show_bug.cgi?id=238465
+    <rdar://80630664>
+    
+    Reviewed by Antti Koivisto.
+    
+    The !gridLineHeight check was added to avoid division by zero but the integral roundToInt() may also produce a 0 value for
+    gridLineHeight.
+    
+    * rendering/LegacyRootInlineBox.cpp:
+    (WebCore::LegacyRootInlineBox::lineSnapAdjustment const):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-03-29  Alan Bujtas  <za...@apple.com>
+
+            WebCore::LegacyRootInlineBox::lineSnapAdjustment should bail out on grid line height < 1
+            https://bugs.webkit.org/show_bug.cgi?id=238465
+            <rdar://80630664>
+
+            Reviewed by Antti Koivisto.
+
+            The !gridLineHeight check was added to avoid division by zero but the integral roundToInt() may also produce a 0 value for
+            gridLineHeight.
+
+            * rendering/LegacyRootInlineBox.cpp:
+            (WebCore::LegacyRootInlineBox::lineSnapAdjustment const):
+
+2022-04-07  Alan Coon  <alanc...@apple.com>
+
         Cherry-pick r292034. rdar://problem/90916916
 
     Check page exists before trying to access authenticatorCoordinator

Modified: branches/safari-613-branch/Source/WebCore/rendering/LegacyRootInlineBox.cpp (292660 => 292661)


--- branches/safari-613-branch/Source/WebCore/rendering/LegacyRootInlineBox.cpp	2022-04-09 00:14:15 UTC (rev 292660)
+++ branches/safari-613-branch/Source/WebCore/rendering/LegacyRootInlineBox.cpp	2022-04-09 00:14:18 UTC (rev 292661)
@@ -360,7 +360,7 @@
     // FIXME: Need to handle crazy line-box-contain values that cause the root line box to not be considered. I assume
     // the grid should honor line-box-contain.
     LayoutUnit gridLineHeight = lineGridBox->lineBoxBottom() - lineGridBox->lineBoxTop();
-    if (!gridLineHeight)
+    if (!roundToInt(gridLineHeight))
         return 0;
 
     LayoutUnit lineGridFontAscent = lineGrid->style().fontMetrics().ascent(baselineType());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to