Modified: trunk/Source/WebCore/ChangeLog (246678 => 246679)
--- trunk/Source/WebCore/ChangeLog 2019-06-21 15:31:02 UTC (rev 246678)
+++ trunk/Source/WebCore/ChangeLog 2019-06-21 15:43:17 UTC (rev 246679)
@@ -1,5 +1,21 @@
2019-06-21 Zalan Bujtas <[email protected]>
+ [LFC][IFC] Rename Line::m_contentLogicalHeight to m_lineLogicalHeight
+ https://bugs.webkit.org/show_bug.cgi?id=199100
+ <rdar://problem/51973614>
+
+ Reviewed by Antti Koivisto.
+
+ m_logicalLineHeight name seems more appropriate at this point (though the line heigh is driven by the content height).
+
+ * layout/inlineformatting/InlineLine.cpp:
+ (WebCore::Layout::Line::close):
+ (WebCore::Layout::Line::adjustBaselineAndLineHeight):
+ * layout/inlineformatting/InlineLine.h:
+ (WebCore::Layout::Line::logicalHeight const):
+
+2019-06-21 Zalan Bujtas <[email protected]>
+
[LFC][IFC] LineBox::Baseline should have a height getter.
https://bugs.webkit.org/show_bug.cgi?id=199092
<rdar://problem/51966958>
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp (246678 => 246679)
--- trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp 2019-06-21 15:31:02 UTC (rev 246678)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp 2019-06-21 15:43:17 UTC (rev 246679)
@@ -50,7 +50,7 @@
, m_logicalTopLeft(initialConstraints.topLeft)
, m_baseline({ initialConstraints.heightAndBaseline.baselineOffset, initialConstraints.heightAndBaseline.height - initialConstraints.heightAndBaseline.baselineOffset })
, m_initialStrut(initialConstraints.heightAndBaseline.strut)
- , m_contentLogicalHeight(initialConstraints.heightAndBaseline.height)
+ , m_lineLogicalHeight(initialConstraints.heightAndBaseline.height)
, m_lineLogicalWidth(initialConstraints.availableWidth)
, m_skipVerticalAligment(skipVerticalAligment == SkipVerticalAligment::Yes)
{
@@ -91,12 +91,12 @@
if (isVisuallyEmpty()) {
m_baseline = { };
m_baselineTop = { };
- m_contentLogicalHeight = { };
+ m_lineLogicalHeight = { };
}
// Remove descent when all content is baseline aligned but none of them have descent.
if (InlineFormattingContext::Quirks::lineDescentNeedsCollapsing(m_layoutState, *m_content)) {
- m_contentLogicalHeight -= m_baseline.descent;
+ m_lineLogicalHeight -= m_baseline.descent;
m_baseline.descent = { };
}
@@ -319,7 +319,7 @@
m_baseline.descent = std::max(m_baseline.descent, halfLeading.descent);
if (halfLeading.ascent > 0)
m_baseline.ascent = std::max(m_baseline.ascent, halfLeading.ascent);
- m_contentLogicalHeight = std::max(m_contentLogicalHeight, m_baseline.height());
+ m_lineLogicalHeight = std::max(m_lineLogicalHeight, m_baseline.height());
return;
}
// Apply initial strut if needed.
@@ -328,7 +328,7 @@
return;
m_baseline.ascent = std::max(m_initialStrut->ascent, m_baseline.ascent);
m_baseline.descent = std::max(m_initialStrut->descent, m_baseline.descent);
- m_contentLogicalHeight = std::max(m_contentLogicalHeight, m_baseline.height());
+ m_lineLogicalHeight = std::max(m_lineLogicalHeight, m_baseline.height());
m_initialStrut = { };
return;
}
@@ -343,21 +343,21 @@
auto inlineBlockBaseline = formattingState.lineBoxes().last().baseline();
m_baseline.descent = std::max(inlineBlockBaseline.descent, m_baseline.descent);
m_baseline.ascent = std::max(inlineBlockBaseline.ascent, m_baseline.ascent);
- m_contentLogicalHeight = std::max(std::max(m_contentLogicalHeight, runHeight), m_baseline.height());
+ m_lineLogicalHeight = std::max(std::max(m_lineLogicalHeight, runHeight), m_baseline.height());
break;
}
m_baseline.descent = std::max<LayoutUnit>(0, m_baseline.descent);
m_baseline.ascent = std::max(runHeight, m_baseline.ascent);
- m_contentLogicalHeight = std::max(m_contentLogicalHeight, m_baseline.height());
+ m_lineLogicalHeight = std::max(m_lineLogicalHeight, m_baseline.height());
break;
case VerticalAlign::Top:
// Top align content never changes the baseline offset, it only pushes the bottom of the line further down.
- m_contentLogicalHeight = std::max(runHeight, m_contentLogicalHeight);
+ m_lineLogicalHeight = std::max(runHeight, m_lineLogicalHeight);
break;
case VerticalAlign::Bottom:
- if (m_contentLogicalHeight < runHeight) {
- m_baselineTop += runHeight - m_contentLogicalHeight;
- m_contentLogicalHeight = runHeight;
+ if (m_lineLogicalHeight < runHeight) {
+ m_baselineTop += runHeight - m_lineLogicalHeight;
+ m_lineLogicalHeight = runHeight;
}
break;
default:
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLine.h (246678 => 246679)
--- trunk/Source/WebCore/layout/inlineformatting/InlineLine.h 2019-06-21 15:31:02 UTC (rev 246678)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLine.h 2019-06-21 15:43:17 UTC (rev 246679)
@@ -115,7 +115,7 @@
LayoutUnit logicalRight() const { return logicalLeft() + logicalWidth(); }
LayoutUnit logicalWidth() const { return m_lineLogicalWidth; }
- LayoutUnit logicalHeight() const { return m_contentLogicalHeight; }
+ LayoutUnit logicalHeight() const { return m_lineLogicalHeight; }
LayoutUnit contentLogicalWidth() const { return m_contentLogicalWidth; }
LayoutUnit baselineOffset() const { return m_baseline.ascent + m_baselineTop; }
@@ -145,7 +145,7 @@
LayoutUnit m_baselineTop;
Optional<LineBox::Baseline> m_initialStrut;
- LayoutUnit m_contentLogicalHeight;
+ LayoutUnit m_lineLogicalHeight;
LayoutUnit m_lineLogicalWidth;
bool m_skipVerticalAligment { false };
};