Title: [253920] trunk/Source/WebCore
Revision
253920
Author
[email protected]
Date
2019-12-27 06:13:25 -0800 (Fri, 27 Dec 2019)

Log Message

[LFC][IFC] Fix LayoutTests/fast/backgrounds/size/backgroundSize15.html
https://bugs.webkit.org/show_bug.cgi?id=205602
<rdar://problem/58212499>

Reviewed by Antti Koivisto.

softWrapOpportunityIndex could point after the last inline item in the list (when there's no more wrap opportunity)
e.g text<br> : the softWrapOpportunityIndex is 2.

* layout/inlineformatting/LineLayoutContext.cpp:
(WebCore::Layout::LineLayoutContext::nextContentForLine):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (253919 => 253920)


--- trunk/Source/WebCore/ChangeLog	2019-12-27 10:50:47 UTC (rev 253919)
+++ trunk/Source/WebCore/ChangeLog	2019-12-27 14:13:25 UTC (rev 253920)
@@ -1,3 +1,17 @@
+2019-12-27  Zalan Bujtas  <[email protected]>
+
+        [LFC][IFC] Fix LayoutTests/fast/backgrounds/size/backgroundSize15.html
+        https://bugs.webkit.org/show_bug.cgi?id=205602
+        <rdar://problem/58212499>
+
+        Reviewed by Antti Koivisto.
+
+        softWrapOpportunityIndex could point after the last inline item in the list (when there's no more wrap opportunity)
+        e.g text<br> : the softWrapOpportunityIndex is 2.
+
+        * layout/inlineformatting/LineLayoutContext.cpp:
+        (WebCore::Layout::LineLayoutContext::nextContentForLine):
+
 2019-12-27  James Darpinian  <[email protected]>
 
         ANGLE: Fix WebGL conformance tests for EXT_texture_filter_anisotropic

Modified: trunk/Source/WebCore/layout/inlineformatting/LineLayoutContext.cpp (253919 => 253920)


--- trunk/Source/WebCore/layout/inlineformatting/LineLayoutContext.cpp	2019-12-27 10:50:47 UTC (rev 253919)
+++ trunk/Source/WebCore/layout/inlineformatting/LineLayoutContext.cpp	2019-12-27 14:13:25 UTC (rev 253920)
@@ -180,6 +180,7 @@
 
 LineCandidateContent LineLayoutContext::nextContentForLine(unsigned inlineItemIndex, Optional<unsigned> partialLeadingContentLength, InlineLayoutUnit currentLogicalRight)
 {
+    ASSERT(inlineItemIndex < m_inlineItems.size());
     // 1. Simply add any overflow content from the previous line to the candidate content. It's always a text content.
     // 2. Find the next soft wrap position or explicit line break.
     // 3. Collect floats between the inline content.
@@ -199,7 +200,7 @@
     }
 
     // Are we wrapping at a line break?
-    auto isSingleItem = softWrapOpportunityIndex < m_inlineItems.size() && inlineItemIndex + 1 == softWrapOpportunityIndex;
+    auto isSingleItem = inlineItemIndex + 1 == softWrapOpportunityIndex;
     if (isSingleItem && m_inlineItems[inlineItemIndex]->isLineBreak()) {
         candidateContent.setIsLineBreak();
         return candidateContent;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to