[LFC][IFC] nextBreakablePosition returns the same position on hyphen characters
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Jan 2019 16:39:54 +0000 (16:39 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Jan 2019 16:39:54 +0000 (16:39 +0000)
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:

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

Source/WebCore/ChangeLog
Source/WebCore/layout/inlineformatting/InlineRunProvider.cpp
Tools/ChangeLog
Tools/LayoutReloaded/misc/LFC-passing-tests.txt

index fa6bd32..0221948 100644 (file)
@@ -1,3 +1,15 @@
+2019-01-30  Zalan Bujtas  <zalan@apple.com>
+
+        [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  <simon.fraser@apple.com>
 
         Add some basic geometry information to the scrolling tree
index 6cea22c..9eb20f0 100644 (file)
@@ -182,8 +182,15 @@ unsigned InlineRunProvider::moveToNextBreakablePosition(const InlineItem& inline
     };
 
     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;
 }
 
 }
index 0175c20..c597e89 100644 (file)
@@ -1,5 +1,14 @@
 2019-01-30  Zalan Bujtas  <zalan@apple.com>
 
+        [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  <zalan@apple.com>
+
         [LFC] Use the used margin values in outOfFlowReplacedVerticalGeometry consistently
         https://bugs.webkit.org/show_bug.cgi?id=194020
 
index 5d33fbd..80ea1f1 100644 (file)
@@ -374,3 +374,83 @@ fast/body-propagation/background-color/008-xhtml.xhtml
 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