Title: [253373] trunk/Source/WebCore
- Revision
- 253373
- Author
- za...@apple.com
- Date
- 2019-12-11 08:36:03 -0800 (Wed, 11 Dec 2019)
Log Message
[LFC][IFC] Fix fast/text/hyphenate-limit-lines.html
https://bugs.webkit.org/show_bug.cgi?id=205115
<rdar://problem/57837829>
Reviewed by Antti Koivisto.
Do not adjust the m_successiveHyphenatedLineCount unless it's the end of the line (either split or push).
* layout/inlineformatting/LineLayoutContext.cpp:
(WebCore::Layout::LineLayoutContext::processUncommittedContent):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (253372 => 253373)
--- trunk/Source/WebCore/ChangeLog 2019-12-11 15:55:16 UTC (rev 253372)
+++ trunk/Source/WebCore/ChangeLog 2019-12-11 16:36:03 UTC (rev 253373)
@@ -1,5 +1,18 @@
2019-12-11 Zalan Bujtas <za...@apple.com>
+ [LFC][IFC] Fix fast/text/hyphenate-limit-lines.html
+ https://bugs.webkit.org/show_bug.cgi?id=205115
+ <rdar://problem/57837829>
+
+ Reviewed by Antti Koivisto.
+
+ Do not adjust the m_successiveHyphenatedLineCount unless it's the end of the line (either split or push).
+
+ * layout/inlineformatting/LineLayoutContext.cpp:
+ (WebCore::Layout::LineLayoutContext::processUncommittedContent):
+
+2019-12-11 Zalan Bujtas <za...@apple.com>
+
[LFC][IFC] Move single whitespace measuring to TextUtil
https://bugs.webkit.org/show_bug.cgi?id=205096
<rdar://problem/57818442>
Modified: trunk/Source/WebCore/layout/inlineformatting/LineLayoutContext.cpp (253372 => 253373)
--- trunk/Source/WebCore/layout/inlineformatting/LineLayoutContext.cpp 2019-12-11 15:55:16 UTC (rev 253372)
+++ trunk/Source/WebCore/layout/inlineformatting/LineLayoutContext.cpp 2019-12-11 16:36:03 UTC (rev 253373)
@@ -236,13 +236,16 @@
m_uncommittedContent.append(*m_partialTrailingTextItem, breakingContext.partialTrailingContent->logicalWidth);
}
commitPendingContent(line);
- } else if (breakingContext.contentWrappingRule == LineBreaker::BreakingContext::ContentWrappingRule::Push)
+ // Adjust hyphenated line count.
+ if (breakingContext.partialTrailingContent->needsHyphen)
+ ++m_successiveHyphenatedLineCount;
+ } else if (breakingContext.contentWrappingRule == LineBreaker::BreakingContext::ContentWrappingRule::Push) {
m_uncommittedContent.reset();
- else
+ // Closing the line without any hyphen.
+ m_successiveHyphenatedLineCount = 0;
+ } else
ASSERT_NOT_REACHED();
- // Adjust hyphenated line count
- m_successiveHyphenatedLineCount = breakingContext.partialTrailingContent && breakingContext.partialTrailingContent->needsHyphen ? m_successiveHyphenatedLineCount + 1 : 0;
- return breakingContext.contentWrappingRule == LineBreaker::BreakingContext::ContentWrappingRule::Keep ? IsEndOfLine::No :IsEndOfLine::Yes;
+ return breakingContext.contentWrappingRule == LineBreaker::BreakingContext::ContentWrappingRule::Keep ? IsEndOfLine::No : IsEndOfLine::Yes;
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes