Title: [240714] trunk
Revision
240714
Author
[email protected]
Date
2019-01-30 08:39:54 -0800 (Wed, 30 Jan 2019)

Log Message

[LFC][IFC] nextBreakablePosition returns the same position on hyphen characters
https://bugs.webkit.org/show_bug.cgi?id=194001

Reviewed by Antti Koivisto.

Source/WebCore:

Skip to the next position manually. This is exactly what we do in simple line layout.

* layout/inlineformatting/InlineRunProvider.cpp:
(WebCore::Layout::InlineRunProvider::moveToNextBreakablePosition):

Tools:

* LayoutReloaded/misc/LFC-passing-tests.txt:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (240713 => 240714)


--- trunk/Source/WebCore/ChangeLog	2019-01-30 16:33:33 UTC (rev 240713)
+++ trunk/Source/WebCore/ChangeLog	2019-01-30 16:39:54 UTC (rev 240714)
@@ -1,3 +1,15 @@
+2019-01-30  Zalan Bujtas  <[email protected]>
+
+        [LFC][IFC] nextBreakablePosition returns the same position on hyphen characters
+        https://bugs.webkit.org/show_bug.cgi?id=194001
+
+        Reviewed by Antti Koivisto.
+
+        Skip to the next position manually. This is exactly what we do in simple line layout.
+
+        * layout/inlineformatting/InlineRunProvider.cpp:
+        (WebCore::Layout::InlineRunProvider::moveToNextBreakablePosition):
+
 2019-01-30  Simon Fraser  <[email protected]>
 
         Add some basic geometry information to the scrolling tree

Modified: trunk/Source/WebCore/layout/inlineformatting/InlineRunProvider.cpp (240713 => 240714)


--- trunk/Source/WebCore/layout/inlineformatting/InlineRunProvider.cpp	2019-01-30 16:33:33 UTC (rev 240713)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineRunProvider.cpp	2019-01-30 16:39:54 UTC (rev 240714)
@@ -182,8 +182,15 @@
     };
 
     auto& style = inlineItem.style();
-    auto nextBreakablePosition = findNextBreakablePosition(inlineItem.textContent(), style, currentItemPosition);
-    return nextBreakablePosition - currentItemPosition;
+    auto textLength = inlineItem.textContent().length();
+    ASSERT(textLength);
+    while (currentItemPosition < textLength - 1) {
+        auto nextBreakablePosition = findNextBreakablePosition(inlineItem.textContent(), style, currentItemPosition);
+        if (nextBreakablePosition != currentItemPosition)
+            return nextBreakablePosition - currentItemPosition;
+        ++currentItemPosition;
+    }
+    return textLength;
 }
 
 }

Modified: trunk/Tools/ChangeLog (240713 => 240714)


--- trunk/Tools/ChangeLog	2019-01-30 16:33:33 UTC (rev 240713)
+++ trunk/Tools/ChangeLog	2019-01-30 16:39:54 UTC (rev 240714)
@@ -1,5 +1,14 @@
 2019-01-30  Zalan Bujtas  <[email protected]>
 
+        [LFC][IFC] nextBreakablePosition returns the same position on hyphen characters
+        https://bugs.webkit.org/show_bug.cgi?id=194001
+
+        Reviewed by Antti Koivisto.
+
+        * LayoutReloaded/misc/LFC-passing-tests.txt:
+
+2019-01-30  Zalan Bujtas  <[email protected]>
+
         [LFC] Use the used margin values in outOfFlowReplacedVerticalGeometry consistently
         https://bugs.webkit.org/show_bug.cgi?id=194020
 

Modified: trunk/Tools/LayoutReloaded/misc/LFC-passing-tests.txt (240713 => 240714)


--- trunk/Tools/LayoutReloaded/misc/LFC-passing-tests.txt	2019-01-30 16:33:33 UTC (rev 240713)
+++ trunk/Tools/LayoutReloaded/misc/LFC-passing-tests.txt	2019-01-30 16:39:54 UTC (rev 240714)
@@ -374,3 +374,83 @@
 fast/body-propagation/background-color/008.html
 fast/body-propagation/background-image/008-xhtml.xhtml
 fast/body-propagation/background-image/008.html
+css2.1/20110323/absolute-non-replaced-height-001.htm
+css2.1/20110323/absolute-non-replaced-height-002.htm
+css2.1/20110323/absolute-non-replaced-height-003.htm
+css2.1/20110323/absolute-non-replaced-height-004.htm
+css2.1/20110323/absolute-non-replaced-height-005.htm
+css2.1/20110323/absolute-non-replaced-height-006.htm
+css2.1/20110323/absolute-non-replaced-height-007.htm
+css2.1/20110323/absolute-non-replaced-height-008.htm
+css2.1/20110323/absolute-non-replaced-height-009.htm
+css2.1/20110323/absolute-non-replaced-height-010.htm
+css2.1/20110323/absolute-non-replaced-height-011.htm
+css2.1/20110323/absolute-non-replaced-height-012.htm
+css2.1/20110323/absolute-non-replaced-max-height-001.htm
+css2.1/20110323/absolute-non-replaced-max-height-002.htm
+css2.1/20110323/absolute-non-replaced-max-height-003.htm
+css2.1/20110323/absolute-non-replaced-max-height-004.htm
+css2.1/20110323/absolute-non-replaced-max-height-005.htm
+css2.1/20110323/absolute-non-replaced-max-height-006.htm
+css2.1/20110323/absolute-non-replaced-max-height-007.htm
+css2.1/20110323/absolute-non-replaced-max-height-008.htm
+css2.1/20110323/absolute-non-replaced-max-height-009.htm
+css2.1/20110323/absolute-non-replaced-max-height-010.htm
+css2.1/20110323/absolute-non-replaced-max-height-011.htm
+css2.1/20110323/absolute-non-replaced-max-height-012.htm
+css2.1/20110323/absolute-non-replaced-width-001.htm
+css2.1/20110323/absolute-non-replaced-width-002.htm
+css2.1/20110323/absolute-non-replaced-width-003.htm
+css2.1/20110323/absolute-non-replaced-width-004.htm
+css2.1/20110323/absolute-non-replaced-width-005.htm
+css2.1/20110323/absolute-non-replaced-width-006.htm
+css2.1/20110323/absolute-non-replaced-width-007.htm
+css2.1/20110323/absolute-non-replaced-width-008.htm
+css2.1/20110323/absolute-non-replaced-width-009.htm
+css2.1/20110323/absolute-non-replaced-width-010.htm
+css2.1/20110323/absolute-non-replaced-width-011.htm
+css2.1/20110323/absolute-non-replaced-width-012.htm
+css2.1/20110323/absolute-non-replaced-width-013.htm
+css2.1/20110323/absolute-non-replaced-width-014.htm
+css2.1/20110323/absolute-non-replaced-width-015.htm
+css2.1/20110323/absolute-non-replaced-width-016.htm
+css2.1/20110323/abspos-containing-block-initial-001.htm
+css2.1/20110323/abspos-containing-block-initial-004a.htm
+css2.1/20110323/abspos-containing-block-initial-004b.htm
+css2.1/20110323/abspos-containing-block-initial-005a.htm
+css2.1/20110323/abspos-containing-block-initial-005c.htm
+css2.1/20110323/abspos-containing-block-initial-007.htm
+css2.1/20110323/abspos-containing-block-initial-009b.htm
+css2.1/20110323/abspos-containing-block-initial-009e.htm
+css2.1/20110323/block-non-replaced-height-001.htm
+css2.1/20110323/block-non-replaced-height-003.htm
+css2.1/20110323/block-non-replaced-height-007.htm
+css2.1/20110323/block-non-replaced-height-009.htm
+css2.1/20110323/block-non-replaced-height-011.htm
+css2.1/20110323/block-non-replaced-height-013.htm
+css2.1/20110323/block-non-replaced-height-015.htm
+css2.1/20110323/block-non-replaced-width-003.htm
+css2.1/20110323/block-non-replaced-width-004.htm
+css2.1/20110323/block-non-replaced-width-005.htm
+css2.1/20110323/block-non-replaced-width-006.htm
+css2.1/20110323/block-non-replaced-width-007.htm
+css2.1/20110323/block-non-replaced-width-008.htm
+css2.1/20110323/float-non-replaced-height-001.htm
+css2.1/20110323/float-non-replaced-width-001.htm
+css2.1/20110323/float-non-replaced-width-002.htm
+css2.1/20110323/float-non-replaced-width-003.htm
+css2.1/20110323/float-non-replaced-width-004.htm
+css2.1/20110323/float-non-replaced-width-005.htm
+css2.1/20110323/float-non-replaced-width-006.htm
+css2.1/20110323/float-non-replaced-width-010.htm
+css2.1/20110323/float-non-replaced-width-012.htm
+css2.1/20110323/float-replaced-width-001.htm
+css2.1/20110323/float-replaced-width-002.htm
+css2.1/20110323/float-replaced-width-003.htm
+css2.1/20110323/float-replaced-width-004.htm
+css2.1/20110323/float-replaced-width-005.htm
+css2.1/20110323/floats-001.html
+css2.1/20110323/margin-applies-to-009.htm
+css2.1/20110323/margin-collapse-012.htm
+css2.1/20110323/margin-collapse-clear-015.htm
+css2.1/20110323/margin-collapse-clear-016.htm
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to