Changeset 246478 in webkit
- Timestamp:
- Jun 16, 2019, 12:32:52 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
layout/inlineformatting/InlineFormattingContextLineLayout.cpp (modified) (2 diffs)
-
layout/inlineformatting/InlineLine.cpp (modified) (2 diffs)
-
layout/inlineformatting/InlineLine.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r246477 r246478 1 2019-06-16 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Remove Line::Content::isVisuallyEmpty 4 https://bugs.webkit.org/show_bug.cgi?id=198892 5 <rdar://problem/51780345> 6 7 Reviewed by Antti Koivisto. 8 9 Instead of setting the isVisuallyEmpty flag, reset the line height to 0. 10 11 * layout/inlineformatting/InlineFormattingContextLineLayout.cpp: 12 (WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const): 13 * layout/inlineformatting/InlineLine.cpp: 14 (WebCore::Layout::Line::close): 15 * layout/inlineformatting/InlineLine.h: 16 (WebCore::Layout::Line::Content::isEmpty const): 17 (WebCore::Layout::Line::Content::setBaseline): 18 (WebCore::Layout::Line::Content::isVisuallyEmpty const): Deleted. 19 (WebCore::Layout::Line::Content::setIsVisuallyEmpty): Deleted. 20 1 21 2019-06-16 Zalan Bujtas <zalan@apple.com> 2 22 -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextLineLayout.cpp
r246234 r246478 312 312 313 313 // Ignore the initial strut. 314 auto lineBox = Display::Rect { lineContent.logicalTop(), lineContent.logicalLeft(), 0, !lineContent.isVisuallyEmpty() ? lineContent.logicalHeight() : LayoutUnit { }};314 auto lineBox = Display::Rect { lineContent.logicalTop(), lineContent.logicalLeft(), 0, lineContent.logicalHeight()}; 315 315 // Create final display runs. 316 316 auto& lineRuns = lineContent.runs(); … … 394 394 // FIXME linebox needs to be ajusted after content alignment. 395 395 m_formattingState.addLineBox({ lineBox, lineContent.baseline() }); 396 if (!lineContent.isVisuallyEmpty()) 397 alignRuns(m_formattingRoot.style().textAlign(), previousLineLastRunIndex.valueOr(-1) + 1, widthConstraint - lineContent.logicalWidth()); 396 alignRuns(m_formattingRoot.style().textAlign(), previousLineLastRunIndex.valueOr(-1) + 1, widthConstraint - lineContent.logicalWidth()); 398 397 } 399 398 -
trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp
r246476 r246478 87 87 removeTrailingTrimmableContent(); 88 88 if (!m_skipVerticalAligment) { 89 if (isVisuallyEmpty()) { 90 m_baseline = { }; 91 m_contentLogicalHeight = { }; 92 } 93 89 94 for (auto& run : m_content->runs()) { 90 95 LayoutUnit logicalTop; … … 122 127 } 123 128 } 124 m_content->setIsVisuallyEmpty(isVisuallyEmpty());125 129 m_content->setLogicalRect({ logicalTop(), logicalLeft(), contentLogicalWidth(), logicalHeight() }); 126 130 m_content->setBaseline(m_baseline); -
trunk/Source/WebCore/layout/inlineformatting/InlineLine.h
r246475 r246478 61 61 const Runs& runs() const { return m_runs; } 62 62 bool isEmpty() const { return m_runs.isEmpty(); } 63 // Not in painting sense though.64 bool isVisuallyEmpty() const { return m_isVisuallyEmpty; }65 63 66 64 LayoutUnit logicalTop() const { return m_logicalRect.top(); } … … 77 75 void setLogicalRect(const Display::Rect& logicalRect) { m_logicalRect = logicalRect; } 78 76 void setBaseline(LineBox::Baseline baseline) { m_baseline = baseline; } 79 void setIsVisuallyEmpty(bool isVisuallyEmpty) { m_isVisuallyEmpty = isVisuallyEmpty; }80 77 Runs& runs() { return m_runs; } 81 78 … … 83 80 LineBox::Baseline m_baseline; 84 81 Runs m_runs; 85 bool m_isVisuallyEmpty { true };86 82 }; 87 83 std::unique_ptr<Content> close();
Note:
See TracChangeset
for help on using the changeset viewer.