Title: [237985] trunk/Source/WebCore
- Revision
- 237985
- Author
- [email protected]
- Date
- 2018-11-08 07:20:29 -0800 (Thu, 08 Nov 2018)
Log Message
[BFC][IFC] InlineFormattingContext::Line::alignRuns() should take care of all the alignments.
https://bugs.webkit.org/show_bug.cgi?id=191414
Reviewed by Antti Koivisto.
* layout/inlineformatting/Line.cpp:
(WebCore::Layout::InlineFormattingContext::Line::close):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (237984 => 237985)
--- trunk/Source/WebCore/ChangeLog 2018-11-08 11:21:58 UTC (rev 237984)
+++ trunk/Source/WebCore/ChangeLog 2018-11-08 15:20:29 UTC (rev 237985)
@@ -1,3 +1,13 @@
+2018-11-08 Zalan Bujtas <[email protected]>
+
+ [BFC][IFC] InlineFormattingContext::Line::alignRuns() should take care of all the alignments.
+ https://bugs.webkit.org/show_bug.cgi?id=191414
+
+ Reviewed by Antti Koivisto.
+
+ * layout/inlineformatting/Line.cpp:
+ (WebCore::Layout::InlineFormattingContext::Line::close):
+
2018-11-08 Jiewen Tan <[email protected]>
[WebAuthN] Import CTAP device request/response converters from Chromium
Modified: trunk/Source/WebCore/layout/inlineformatting/Line.cpp (237984 => 237985)
--- trunk/Source/WebCore/layout/inlineformatting/Line.cpp 2018-11-08 11:21:58 UTC (rev 237984)
+++ trunk/Source/WebCore/layout/inlineformatting/Line.cpp 2018-11-08 15:20:29 UTC (rev 237985)
@@ -217,7 +217,7 @@
void InlineFormattingContext::Line::close(LastLine isLastLine)
{
- auto trimTrailingContent = [&]() {
+ auto trimTrailingContent = [&]{
if (!m_trailingTrimmableContent)
return;
@@ -235,12 +235,18 @@
m_trailingTrimmableContent = { };
};
- auto alignRuns = [&](auto alignment) {
+ auto alignRuns = [&]{
if (!hasContent())
return;
- auto adjustedLogicalLeft = adjustedLineLogicalLeft(alignment, m_logicalRect.left(), m_availableWidth);
+ auto textAlignment = !m_alignmentIsJustify ? m_formattingRoot.style().textAlign() : isLastLine == LastLine::No ? TextAlignMode::Justify : TextAlignMode::Left;
+ if (textAlignment == TextAlignMode::Justify) {
+ justifyRuns();
+ return;
+ }
+
+ auto adjustedLogicalLeft = adjustedLineLogicalLeft(textAlignment, m_logicalRect.left(), m_availableWidth);
if (m_logicalRect.left() == adjustedLogicalLeft)
return;
@@ -254,17 +260,8 @@
return;
trimTrailingContent();
+ alignRuns();
- auto textAlignment = m_formattingRoot.style().textAlign();
- if (m_alignmentIsJustify) {
- if (isLastLine == LastLine::No) {
- justifyRuns();
- return;
- }
- textAlignment = TextAlignMode::Left;
- }
-
- alignRuns(textAlignment);
m_isFirstLine = false;
m_closed = true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes