Title: [253200] trunk/Source/WebCore
- Revision
- 253200
- Author
- [email protected]
- Date
- 2019-12-05 19:46:23 -0800 (Thu, 05 Dec 2019)
Log Message
[LFC][IFC] Fix css1/basic/containment.html
https://bugs.webkit.org/show_bug.cgi?id=204931
<rdar://problem/57682871>
Reviewed by Simon Fraser.
moveToNextBreakablePosition jumped over all the positions that came back as the current position.
e.g --- <- first 2 breakable positions are at: 1 2 but we skipped over the first one.
* layout/inlineformatting/InlineTextItem.cpp:
(WebCore::Layout::moveToNextBreakablePosition):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (253199 => 253200)
--- trunk/Source/WebCore/ChangeLog 2019-12-06 02:14:11 UTC (rev 253199)
+++ trunk/Source/WebCore/ChangeLog 2019-12-06 03:46:23 UTC (rev 253200)
@@ -1,3 +1,17 @@
+2019-12-05 Zalan Bujtas <[email protected]>
+
+ [LFC][IFC] Fix css1/basic/containment.html
+ https://bugs.webkit.org/show_bug.cgi?id=204931
+ <rdar://problem/57682871>
+
+ Reviewed by Simon Fraser.
+
+ moveToNextBreakablePosition jumped over all the positions that came back as the current position.
+ e.g --- <- first 2 breakable positions are at: 1 2 but we skipped over the first one.
+
+ * layout/inlineformatting/InlineTextItem.cpp:
+ (WebCore::Layout::moveToNextBreakablePosition):
+
2019-12-05 Megan Gardner <[email protected]>
Move member variable that should be private
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineTextItem.cpp (253199 => 253200)
--- trunk/Source/WebCore/layout/inlineformatting/InlineTextItem.cpp 2019-12-06 02:14:11 UTC (rev 253199)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineTextItem.cpp 2019-12-06 03:46:23 UTC (rev 253200)
@@ -72,12 +72,13 @@
};
auto textLength = lineBreakIterator.stringView().length();
- auto currentPosition = startPosition;
- while (currentPosition < textLength - 1) {
- auto nextBreakablePosition = findNextBreakablePosition(currentPosition);
- if (nextBreakablePosition != currentPosition)
- return nextBreakablePosition - currentPosition;
- ++currentPosition;
+ auto startPositionForNextBreakablePosition = startPosition;
+ while (startPositionForNextBreakablePosition < textLength) {
+ auto nextBreakablePosition = findNextBreakablePosition(startPositionForNextBreakablePosition);
+ // Oftentimes the next breakable position comes back as the start position (most notably hyphens).
+ if (nextBreakablePosition != startPosition)
+ return nextBreakablePosition - startPosition;
+ ++startPositionForNextBreakablePosition;
}
return textLength - startPosition;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes