Changeset 246679 in webkit
- Timestamp:
- Jun 21, 2019 8:43:17 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r246678 r246679 1 2019-06-21 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Rename Line::m_contentLogicalHeight to m_lineLogicalHeight 4 https://bugs.webkit.org/show_bug.cgi?id=199100 5 <rdar://problem/51973614> 6 7 Reviewed by Antti Koivisto. 8 9 m_logicalLineHeight name seems more appropriate at this point (though the line heigh is driven by the content height). 10 11 * layout/inlineformatting/InlineLine.cpp: 12 (WebCore::Layout::Line::close): 13 (WebCore::Layout::Line::adjustBaselineAndLineHeight): 14 * layout/inlineformatting/InlineLine.h: 15 (WebCore::Layout::Line::logicalHeight const): 16 1 17 2019-06-21 Zalan Bujtas <zalan@apple.com> 2 18 -
trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp
r246678 r246679 51 51 , m_baseline({ initialConstraints.heightAndBaseline.baselineOffset, initialConstraints.heightAndBaseline.height - initialConstraints.heightAndBaseline.baselineOffset }) 52 52 , m_initialStrut(initialConstraints.heightAndBaseline.strut) 53 , m_ contentLogicalHeight(initialConstraints.heightAndBaseline.height)53 , m_lineLogicalHeight(initialConstraints.heightAndBaseline.height) 54 54 , m_lineLogicalWidth(initialConstraints.availableWidth) 55 55 , m_skipVerticalAligment(skipVerticalAligment == SkipVerticalAligment::Yes) … … 92 92 m_baseline = { }; 93 93 m_baselineTop = { }; 94 m_ contentLogicalHeight = { };94 m_lineLogicalHeight = { }; 95 95 } 96 96 97 97 // Remove descent when all content is baseline aligned but none of them have descent. 98 98 if (InlineFormattingContext::Quirks::lineDescentNeedsCollapsing(m_layoutState, *m_content)) { 99 m_ contentLogicalHeight -= m_baseline.descent;99 m_lineLogicalHeight -= m_baseline.descent; 100 100 m_baseline.descent = { }; 101 101 } … … 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, m_baseline.height());322 m_lineLogicalHeight = std::max(m_lineLogicalHeight, 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, m_baseline.height());331 m_lineLogicalHeight = std::max(m_lineLogicalHeight, 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), m_baseline.height());346 m_lineLogicalHeight = std::max(std::max(m_lineLogicalHeight, 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, m_baseline.height());351 m_lineLogicalHeight = std::max(m_lineLogicalHeight, m_baseline.height()); 352 352 break; 353 353 case VerticalAlign::Top: 354 354 // Top align content never changes the baseline offset, it only pushes the bottom of the line further down. 355 m_ contentLogicalHeight = std::max(runHeight, m_contentLogicalHeight);355 m_lineLogicalHeight = std::max(runHeight, m_lineLogicalHeight); 356 356 break; 357 357 case VerticalAlign::Bottom: 358 if (m_ contentLogicalHeight < runHeight) {359 m_baselineTop += runHeight - m_ contentLogicalHeight;360 m_ contentLogicalHeight = runHeight;358 if (m_lineLogicalHeight < runHeight) { 359 m_baselineTop += runHeight - m_lineLogicalHeight; 360 m_lineLogicalHeight = runHeight; 361 361 } 362 362 break; -
trunk/Source/WebCore/layout/inlineformatting/InlineLine.h
r246678 r246679 116 116 117 117 LayoutUnit logicalWidth() const { return m_lineLogicalWidth; } 118 LayoutUnit logicalHeight() const { return m_ contentLogicalHeight; }118 LayoutUnit logicalHeight() const { return m_lineLogicalHeight; } 119 119 120 120 LayoutUnit contentLogicalWidth() const { return m_contentLogicalWidth; } … … 146 146 147 147 Optional<LineBox::Baseline> m_initialStrut; 148 LayoutUnit m_ contentLogicalHeight;148 LayoutUnit m_lineLogicalHeight; 149 149 LayoutUnit m_lineLogicalWidth; 150 150 bool m_skipVerticalAligment { false };
Note: See TracChangeset
for help on using the changeset viewer.