Title: [269110] trunk/Source/WebCore
Revision
269110
Author
[email protected]
Date
2020-10-28 11:17:23 -0700 (Wed, 28 Oct 2020)

Log Message

[LFC][IFC] horizontalAlignmentOffset should check for empty run list
https://bugs.webkit.org/show_bug.cgi?id=218285
<rdar://problem/70730722>

Reviewed by Antti Koivisto.

LineBoxBuilder functions check for empty run list except this static helper.

* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::horizontalAlignmentOffset):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (269109 => 269110)


--- trunk/Source/WebCore/ChangeLog	2020-10-28 17:41:12 UTC (rev 269109)
+++ trunk/Source/WebCore/ChangeLog	2020-10-28 18:17:23 UTC (rev 269110)
@@ -1,3 +1,16 @@
+2020-10-28  Zalan Bujtas  <[email protected]>
+
+        [LFC][IFC] horizontalAlignmentOffset should check for empty run list
+        https://bugs.webkit.org/show_bug.cgi?id=218285
+        <rdar://problem/70730722>
+
+        Reviewed by Antti Koivisto.
+
+        LineBoxBuilder functions check for empty run list except this static helper.
+
+        * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
+        (WebCore::Layout::horizontalAlignmentOffset):
+
 2020-10-28  Chris Dumez  <[email protected]>
 
         AudioBuffer channels should be neuterable / detachable

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp (269109 => 269110)


--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp	2020-10-28 17:41:12 UTC (rev 269109)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp	2020-10-28 18:17:23 UTC (rev 269110)
@@ -118,7 +118,7 @@
         // Text is justified according to the method specified by the text-justify property,
         // in order to exactly fill the line box. Unless otherwise specified by text-align-last,
         // the last line before a forced break or the end of the block is start-aligned.
-        if (runs.last().isLineBreak() || isLastLine)
+        if (isLastLine || (!runs.isEmpty() && runs.last().isLineBreak()))
             return TextAlignMode::Start;
         return TextAlignMode::Justify;
     };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to