Title: [246678] trunk/Source/WebCore
- Revision
- 246678
- Author
- [email protected]
- Date
- 2019-06-21 08:31:02 -0700 (Fri, 21 Jun 2019)
Log Message
[LFC][IFC] LineBox::Baseline should have a height getter.
https://bugs.webkit.org/show_bug.cgi?id=199092
<rdar://problem/51966958>
Reviewed by Antti Koivisto.
The baseline height does not need to be a getter on the Line (no one calls it).
* layout/inlineformatting/InlineLine.cpp:
(WebCore::Layout::Line::adjustBaselineAndLineHeight):
* layout/inlineformatting/InlineLine.h:
(WebCore::Layout::Line::contentLogicalWidth const):
(WebCore::Layout::Line::baselineAlignedContentHeight const): Deleted.
* layout/inlineformatting/InlineLineBox.h:
(WebCore::Layout::LineBox::Baseline::height const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (246677 => 246678)
--- trunk/Source/WebCore/ChangeLog 2019-06-21 14:20:00 UTC (rev 246677)
+++ trunk/Source/WebCore/ChangeLog 2019-06-21 15:31:02 UTC (rev 246678)
@@ -1,3 +1,21 @@
+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>
+
+ Reviewed by Antti Koivisto.
+
+ The baseline height does not need to be a getter on the Line (no one calls it).
+
+ * layout/inlineformatting/InlineLine.cpp:
+ (WebCore::Layout::Line::adjustBaselineAndLineHeight):
+ * layout/inlineformatting/InlineLine.h:
+ (WebCore::Layout::Line::contentLogicalWidth const):
+ (WebCore::Layout::Line::baselineAlignedContentHeight const): Deleted.
+ * layout/inlineformatting/InlineLineBox.h:
+ (WebCore::Layout::LineBox::Baseline::height const):
+
2019-06-21 Michael Catanzaro <[email protected]>
[WPE][GTK] Bump minimum versions of GLib, GTK, libsoup, ATK, GStreamer, and Cairo
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp (246677 => 246678)
--- trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp 2019-06-21 14:20:00 UTC (rev 246677)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp 2019-06-21 15:31:02 UTC (rev 246678)
@@ -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, baselineAlignedContentHeight());
+ m_contentLogicalHeight = std::max(m_contentLogicalHeight, 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, baselineAlignedContentHeight());
+ m_contentLogicalHeight = std::max(m_contentLogicalHeight, m_baseline.height());
m_initialStrut = { };
return;
}
@@ -343,12 +343,12 @@
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), baselineAlignedContentHeight());
+ m_contentLogicalHeight = std::max(std::max(m_contentLogicalHeight, 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, baselineAlignedContentHeight());
+ m_contentLogicalHeight = std::max(m_contentLogicalHeight, 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.
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLine.h (246677 => 246678)
--- trunk/Source/WebCore/layout/inlineformatting/InlineLine.h 2019-06-21 14:20:00 UTC (rev 246677)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLine.h 2019-06-21 15:31:02 UTC (rev 246678)
@@ -118,7 +118,6 @@
LayoutUnit logicalHeight() const { return m_contentLogicalHeight; }
LayoutUnit contentLogicalWidth() const { return m_contentLogicalWidth; }
- LayoutUnit baselineAlignedContentHeight() const { return m_baseline.ascent + m_baseline.descent; }
LayoutUnit baselineOffset() const { return m_baseline.ascent + m_baselineTop; }
void appendNonBreakableSpace(const InlineItem&, const Display::Rect& logicalRect);
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLineBox.h (246677 => 246678)
--- trunk/Source/WebCore/layout/inlineformatting/InlineLineBox.h 2019-06-21 14:20:00 UTC (rev 246677)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLineBox.h 2019-06-21 15:31:02 UTC (rev 246678)
@@ -35,6 +35,8 @@
class LineBox {
public:
struct Baseline {
+ LayoutUnit height() const { return ascent + descent; }
+
LayoutUnit ascent;
LayoutUnit descent;
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes