Changeset 246678 in webkit
- Timestamp:
- Jun 21, 2019 8:31:02 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r246677 r246678 1 2019-06-21 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] LineBox::Baseline should have a height getter. 4 https://bugs.webkit.org/show_bug.cgi?id=199092 5 <rdar://problem/51966958> 6 7 Reviewed by Antti Koivisto. 8 9 The baseline height does not need to be a getter on the Line (no one calls it). 10 11 * layout/inlineformatting/InlineLine.cpp: 12 (WebCore::Layout::Line::adjustBaselineAndLineHeight): 13 * layout/inlineformatting/InlineLine.h: 14 (WebCore::Layout::Line::contentLogicalWidth const): 15 (WebCore::Layout::Line::baselineAlignedContentHeight const): Deleted. 16 * layout/inlineformatting/InlineLineBox.h: 17 (WebCore::Layout::LineBox::Baseline::height const): 18 1 19 2019-06-21 Michael Catanzaro <mcatanzaro@igalia.com> 2 20 -
trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp
r246634 r246678 320 320 if (halfLeading.ascent > 0) 321 321 m_baseline.ascent = std::max(m_baseline.ascent, halfLeading.ascent); 322 m_contentLogicalHeight = std::max(m_contentLogicalHeight, baselineAlignedContentHeight());322 m_contentLogicalHeight = std::max(m_contentLogicalHeight, m_baseline.height()); 323 323 return; 324 324 } … … 329 329 m_baseline.ascent = std::max(m_initialStrut->ascent, m_baseline.ascent); 330 330 m_baseline.descent = std::max(m_initialStrut->descent, m_baseline.descent); 331 m_contentLogicalHeight = std::max(m_contentLogicalHeight, baselineAlignedContentHeight());331 m_contentLogicalHeight = std::max(m_contentLogicalHeight, m_baseline.height()); 332 332 m_initialStrut = { }; 333 333 return; … … 344 344 m_baseline.descent = std::max(inlineBlockBaseline.descent, m_baseline.descent); 345 345 m_baseline.ascent = std::max(inlineBlockBaseline.ascent, m_baseline.ascent); 346 m_contentLogicalHeight = std::max(std::max(m_contentLogicalHeight, runHeight), baselineAlignedContentHeight());346 m_contentLogicalHeight = std::max(std::max(m_contentLogicalHeight, runHeight), m_baseline.height()); 347 347 break; 348 348 } 349 349 m_baseline.descent = std::max<LayoutUnit>(0, m_baseline.descent); 350 350 m_baseline.ascent = std::max(runHeight, m_baseline.ascent); 351 m_contentLogicalHeight = std::max(m_contentLogicalHeight, baselineAlignedContentHeight());351 m_contentLogicalHeight = std::max(m_contentLogicalHeight, m_baseline.height()); 352 352 break; 353 353 case VerticalAlign::Top: -
trunk/Source/WebCore/layout/inlineformatting/InlineLine.h
r246634 r246678 119 119 120 120 LayoutUnit contentLogicalWidth() const { return m_contentLogicalWidth; } 121 LayoutUnit baselineAlignedContentHeight() const { return m_baseline.ascent + m_baseline.descent; }122 121 LayoutUnit baselineOffset() const { return m_baseline.ascent + m_baselineTop; } 123 122 -
trunk/Source/WebCore/layout/inlineformatting/InlineLineBox.h
r246484 r246678 36 36 public: 37 37 struct Baseline { 38 LayoutUnit height() const { return ascent + descent; } 39 38 40 LayoutUnit ascent; 39 41 LayoutUnit descent;
Note: See TracChangeset
for help on using the changeset viewer.