Skip to content

Commit fb3bed1

Browse files
committed
[LFC][IFC] Move Layout::Run under InlineDisplay and rename it to Box
https://bugs.webkit.org/show_bug.cgi?id=230643 Reviewed by Antti Koivisto. These fragments of inline content should be considered runs only up to the point where we finished breaking the line. Soon after they gain horizontal (and later vertical) geometries, we should call them boxes. * WebCore.xcodeproj/project.pbxproj: * display/DisplayTreeBuilder.cpp: (WebCore::Display::TreeBuilder::buildInlineDisplayTree): * display/css/DisplayBoxFactory.cpp: (WebCore::Display::BoxFactory::displayBoxForTextRun const): * display/css/DisplayBoxFactory.h: * display/css/DisplayTextBox.cpp: (WebCore::Display::TextBox::TextBox): (WebCore::Display::m_text): * display/css/DisplayTextBox.h: (WebCore::Display::TextBox::expansion const): (WebCore::Display::TextBox::text const): * layout/Verification.cpp: (WebCore::Layout::checkForMatchingNonTextRuns): (WebCore::Layout::checkForMatchingTextRuns): (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded): * layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp: (WebCore::Layout::InlineDisplayContentBuilder::build): (WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineContent): (WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineSpanningInlineBoxes): (WebCore::Layout::InlineDisplayContentBuilder::collectInkOverflowForInlineBoxes): (WebCore::Layout::InlineDisplayContentBuilder::createRunsAndUpdateGeometryForLineContent): Deleted. (WebCore::Layout::InlineDisplayContentBuilder::createRunsAndUpdateGeometryForLineSpanningInlineBoxes): Deleted. (WebCore::Layout::InlineDisplayContentBuilder::collectInkOverflowForInlineBoxRuns): Deleted. * layout/formattingContexts/inline/InlineDisplayContentBuilder.h: * layout/formattingContexts/inline/InlineFormattingContext.cpp: (WebCore::Layout::InlineFormattingContext::layoutInFlowContent): (WebCore::Layout::InlineFormattingContext::lineLayout): (WebCore::Layout::InlineFormattingContext::computeStaticPositionForOutOfFlowContent): (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent): (WebCore::Layout::InlineFormattingContext::invalidateFormattingState): * layout/formattingContexts/inline/InlineFormattingState.h: (WebCore::Layout::InlineFormattingState::lineBoxes const): (WebCore::Layout::InlineFormattingState::addLineBox): (WebCore::Layout::InlineFormattingState::boxes const): (WebCore::Layout::InlineFormattingState::boxes): (WebCore::Layout::InlineFormattingState::addBoxes): (WebCore::Layout::InlineFormattingState::clearLineAndBoxes): (WebCore::Layout::InlineFormattingState::shrinkToFit): (WebCore::Layout::InlineFormattingState::runs const): Deleted. (WebCore::Layout::InlineFormattingState::runs): Deleted. (WebCore::Layout::InlineFormattingState::addRuns): Deleted. (WebCore::Layout::InlineFormattingState::clearLineAndRuns): Deleted. * layout/formattingContexts/inline/InlineLine.h: (WebCore::Layout::Line::Run::expansion const): (WebCore::Layout::Line::Run::setExpansion): * layout/formattingContexts/inline/display/InlineLineRun.h: (WebCore::InlineDisplay::Box::logicalRect const): (WebCore::InlineDisplay::Box::inkOverflow const): (WebCore::InlineDisplay::Box::logicalTop const): (WebCore::InlineDisplay::Box::logicalBottom const): (WebCore::InlineDisplay::Box::logicalLeft const): (WebCore::InlineDisplay::Box::logicalRight const): (WebCore::InlineDisplay::Box::logicalWidth const): (WebCore::InlineDisplay::Box::logicalHeight const): (WebCore::InlineDisplay::Box::moveVertically): (WebCore::InlineDisplay::Box::adjustInkOverflow): (WebCore::InlineDisplay::Box::layoutBox const): (WebCore::InlineDisplay::Box::Box): (WebCore::InlineDisplay::Box::Text::Text): (WebCore::Layout::Run::Text::start const): Deleted. (WebCore::Layout::Run::Text::end const): Deleted. (WebCore::Layout::Run::Text::length const): Deleted. (WebCore::Layout::Run::Text::originalContent const): Deleted. (WebCore::Layout::Run::Text::renderedContent const): Deleted. (WebCore::Layout::Run::Text::hasHyphen const): Deleted. (WebCore::Layout::Run::isText const): Deleted. (WebCore::Layout::Run::isSoftLineBreak const): Deleted. (WebCore::Layout::Run::isLineBreakBox const): Deleted. (WebCore::Layout::Run::isLineBreak const): Deleted. (WebCore::Layout::Run::isAtomicInlineLevelBox const): Deleted. (WebCore::Layout::Run::isInlineBox const): Deleted. (WebCore::Layout::Run::isNonRootInlineBox const): Deleted. (WebCore::Layout::Run::isRootInlineBox const): Deleted. (WebCore::Layout::Run::isGenericInlineLevelBox const): Deleted. (WebCore::Layout::Run::isInlineLevelBox const): Deleted. (WebCore::Layout::Run::isNonRootInlineLevelBox const): Deleted. (WebCore::Layout::Run::type const): Deleted. (WebCore::Layout::Run::hasContent const): Deleted. (WebCore::Layout::Run::logicalRect const): Deleted. (WebCore::Layout::Run::inkOverflow const): Deleted. (WebCore::Layout::Run::logicalTop const): Deleted. (WebCore::Layout::Run::logicalBottom const): Deleted. (WebCore::Layout::Run::logicalLeft const): Deleted. (WebCore::Layout::Run::logicalRight const): Deleted. (WebCore::Layout::Run::logicalWidth const): Deleted. (WebCore::Layout::Run::logicalHeight const): Deleted. (WebCore::Layout::Run::moveVertically): Deleted. (WebCore::Layout::Run::adjustInkOverflow): Deleted. (WebCore::Layout::Run::text): Deleted. (WebCore::Layout::Run::text const): Deleted. (WebCore::Layout::Run::expansion const): Deleted. (WebCore::Layout::Run::layoutBox const): Deleted. (WebCore::Layout::Run::style const): Deleted. (WebCore::Layout::Run::lineIndex const): Deleted. (WebCore::Layout::Run::Run): Deleted. (WebCore::Layout::Run::Text::Text): Deleted. * layout/formattingContexts/table/TableFormattingContext.cpp: (WebCore::Layout::TableFormattingContext::setUsedGeometryForCells): * layout/integration/LayoutIntegrationInlineContent.cpp: (WebCore::LayoutIntegration::InlineContent::hasContent const): (WebCore::LayoutIntegration:: const): (WebCore::LayoutIntegration::InlineContent::~InlineContent): (WebCore::LayoutIntegration::InlineContent::indexForBox const): (WebCore::LayoutIntegration::InlineContent::firstBoxForLayoutBox const): (WebCore::LayoutIntegration::InlineContent::firstBoxIndexForLayoutBox const): (WebCore::LayoutIntegration::InlineContent::nonRootInlineBoxIndexesForLayoutBox const): (WebCore::LayoutIntegration::InlineContent::releaseCaches): (WebCore::LayoutIntegration::InlineContent::shrinkToFit): (WebCore::LayoutIntegration::InlineContent::indexForRun const): Deleted. (WebCore::LayoutIntegration::InlineContent::firstRunForLayoutBox const): Deleted. (WebCore::LayoutIntegration::InlineContent::firstRunIndexForLayoutBox const): Deleted. * layout/integration/LayoutIntegrationInlineContent.h: (WebCore::LayoutIntegration::InlineContent::lineForBox const): (WebCore::LayoutIntegration::InlineContent::traverseNonRootInlineBoxes): (WebCore::LayoutIntegration::InlineContent::lineForRun const): Deleted. * layout/integration/LayoutIntegrationInlineContentBuilder.cpp: (WebCore::LayoutIntegration::InlineContentBuilder::build const): (WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const): * layout/integration/LayoutIntegrationLine.h: (WebCore::LayoutIntegration::Line::Line): (WebCore::LayoutIntegration::Line::firstBoxIndex const): (WebCore::LayoutIntegration::Line::boxCount const): (WebCore::LayoutIntegration::Line::firstRunIndex const): Deleted. (WebCore::LayoutIntegration::Line::runCount const): Deleted. * layout/integration/LayoutIntegrationLineIteratorModernPath.h: (WebCore::LayoutIntegration::LineIteratorModernPath::firstRun const): (WebCore::LayoutIntegration::LineIteratorModernPath::lastRun const): * layout/integration/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::layout): (WebCore::LayoutIntegration::LineLayout::textRunsFor const): (WebCore::LayoutIntegration::LineLayout::runFor const): (WebCore::LayoutIntegration::LineLayout::firstInlineBoxRect const): (WebCore::LayoutIntegration::LineLayout::paint): (WebCore::LayoutIntegration::LineLayout::hitTest): (WebCore::LayoutIntegration::LineLayout::paintTextBoxUsingPhysicalCoordinates): (WebCore::LayoutIntegration::LineLayout::paintTextRunUsingPhysicalCoordinates): Deleted. * layout/integration/LayoutIntegrationLineLayout.h: * layout/integration/LayoutIntegrationPagination.cpp: (WebCore::LayoutIntegration::makeAdjustedContent): * layout/integration/LayoutIntegrationRunIterator.cpp: (WebCore::LayoutIntegration::PathRun::line const): (WebCore::LayoutIntegration::textRunFor): * layout/integration/LayoutIntegrationRunIterator.h: (WebCore::LayoutIntegration::PathRun::inlineBox const): * layout/integration/LayoutIntegrationRunIteratorModernPath.h: (WebCore::LayoutIntegration::RunIteratorModernPath::RunIteratorModernPath): (WebCore::LayoutIntegration::RunIteratorModernPath::isText const): (WebCore::LayoutIntegration::RunIteratorModernPath::rect const): (WebCore::LayoutIntegration::RunIteratorModernPath::isLineBreak const): (WebCore::LayoutIntegration::RunIteratorModernPath::hasHyphen const): (WebCore::LayoutIntegration::RunIteratorModernPath::text const): (WebCore::LayoutIntegration::RunIteratorModernPath::start const): (WebCore::LayoutIntegration::RunIteratorModernPath::end const): (WebCore::LayoutIntegration::RunIteratorModernPath::length const): (WebCore::LayoutIntegration::RunIteratorModernPath::offsetForPosition const): (WebCore::LayoutIntegration::RunIteratorModernPath::positionForOffset const): (WebCore::LayoutIntegration::RunIteratorModernPath::selectableRange const): (WebCore::LayoutIntegration::RunIteratorModernPath::renderer const): (WebCore::LayoutIntegration::RunIteratorModernPath::traverseNextTextRun): (WebCore::LayoutIntegration::RunIteratorModernPath::traverseNextOnLine): (WebCore::LayoutIntegration::RunIteratorModernPath::traversePreviousOnLine): (WebCore::LayoutIntegration::RunIteratorModernPath::operator== const): (WebCore::LayoutIntegration::RunIteratorModernPath::atEnd const): (WebCore::LayoutIntegration::RunIteratorModernPath::box const): (WebCore::LayoutIntegration::RunIteratorModernPath::traverseNextLeaf): (WebCore::LayoutIntegration::RunIteratorModernPath::traversePreviousLeaf): (WebCore::LayoutIntegration::RunIteratorModernPath::setAtEnd): (WebCore::LayoutIntegration::RunIteratorModernPath::boxes const): (WebCore::LayoutIntegration::RunIteratorModernPath::line const): (WebCore::LayoutIntegration::RunIteratorModernPath::createTextRun const): (WebCore::LayoutIntegration::RunIteratorModernPath::run const): Deleted. (WebCore::LayoutIntegration::RunIteratorModernPath::runs const): Deleted. * layout/layouttree/LayoutTreeBuilder.cpp: (WebCore::Layout::showInlineTreeAndRuns): * rendering/TextBoxPainter.cpp: (WebCore::TextBoxPainter::TextBoxPainter): * rendering/TextBoxPainter.h: * rendering/TextPainter.cpp: (WebCore::TextPainter::clearGlyphDisplayLists): Canonical link: https://commits.webkit.org/242051@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@282961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 2aeaaaa commit fb3bed1

31 files changed

Lines changed: 548 additions & 352 deletions

Source/WebCore/ChangeLog

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,194 @@
1+
2021-09-23 Alan Bujtas <zalan@apple.com>
2+
3+
[LFC][IFC] Move Layout::Run under InlineDisplay and rename it to Box
4+
https://bugs.webkit.org/show_bug.cgi?id=230643
5+
6+
Reviewed by Antti Koivisto.
7+
8+
These fragments of inline content should be considered runs only up to the point where we finished breaking the line. Soon after they gain horizontal (and later vertical) geometries, we
9+
should call them boxes.
10+
11+
* WebCore.xcodeproj/project.pbxproj:
12+
* display/DisplayTreeBuilder.cpp:
13+
(WebCore::Display::TreeBuilder::buildInlineDisplayTree):
14+
* display/css/DisplayBoxFactory.cpp:
15+
(WebCore::Display::BoxFactory::displayBoxForTextRun const):
16+
* display/css/DisplayBoxFactory.h:
17+
* display/css/DisplayTextBox.cpp:
18+
(WebCore::Display::TextBox::TextBox):
19+
(WebCore::Display::m_text):
20+
* display/css/DisplayTextBox.h:
21+
(WebCore::Display::TextBox::expansion const):
22+
(WebCore::Display::TextBox::text const):
23+
* layout/Verification.cpp:
24+
(WebCore::Layout::checkForMatchingNonTextRuns):
25+
(WebCore::Layout::checkForMatchingTextRuns):
26+
(WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
27+
* layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:
28+
(WebCore::Layout::InlineDisplayContentBuilder::build):
29+
(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineContent):
30+
(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineSpanningInlineBoxes):
31+
(WebCore::Layout::InlineDisplayContentBuilder::collectInkOverflowForInlineBoxes):
32+
(WebCore::Layout::InlineDisplayContentBuilder::createRunsAndUpdateGeometryForLineContent): Deleted.
33+
(WebCore::Layout::InlineDisplayContentBuilder::createRunsAndUpdateGeometryForLineSpanningInlineBoxes): Deleted.
34+
(WebCore::Layout::InlineDisplayContentBuilder::collectInkOverflowForInlineBoxRuns): Deleted.
35+
* layout/formattingContexts/inline/InlineDisplayContentBuilder.h:
36+
* layout/formattingContexts/inline/InlineFormattingContext.cpp:
37+
(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
38+
(WebCore::Layout::InlineFormattingContext::lineLayout):
39+
(WebCore::Layout::InlineFormattingContext::computeStaticPositionForOutOfFlowContent):
40+
(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
41+
(WebCore::Layout::InlineFormattingContext::invalidateFormattingState):
42+
* layout/formattingContexts/inline/InlineFormattingState.h:
43+
(WebCore::Layout::InlineFormattingState::lineBoxes const):
44+
(WebCore::Layout::InlineFormattingState::addLineBox):
45+
(WebCore::Layout::InlineFormattingState::boxes const):
46+
(WebCore::Layout::InlineFormattingState::boxes):
47+
(WebCore::Layout::InlineFormattingState::addBoxes):
48+
(WebCore::Layout::InlineFormattingState::clearLineAndBoxes):
49+
(WebCore::Layout::InlineFormattingState::shrinkToFit):
50+
(WebCore::Layout::InlineFormattingState::runs const): Deleted.
51+
(WebCore::Layout::InlineFormattingState::runs): Deleted.
52+
(WebCore::Layout::InlineFormattingState::addRuns): Deleted.
53+
(WebCore::Layout::InlineFormattingState::clearLineAndRuns): Deleted.
54+
* layout/formattingContexts/inline/InlineLine.h:
55+
(WebCore::Layout::Line::Run::expansion const):
56+
(WebCore::Layout::Line::Run::setExpansion):
57+
* layout/formattingContexts/inline/display/InlineLineRun.h:
58+
(WebCore::InlineDisplay::Box::logicalRect const):
59+
(WebCore::InlineDisplay::Box::inkOverflow const):
60+
(WebCore::InlineDisplay::Box::logicalTop const):
61+
(WebCore::InlineDisplay::Box::logicalBottom const):
62+
(WebCore::InlineDisplay::Box::logicalLeft const):
63+
(WebCore::InlineDisplay::Box::logicalRight const):
64+
(WebCore::InlineDisplay::Box::logicalWidth const):
65+
(WebCore::InlineDisplay::Box::logicalHeight const):
66+
(WebCore::InlineDisplay::Box::moveVertically):
67+
(WebCore::InlineDisplay::Box::adjustInkOverflow):
68+
(WebCore::InlineDisplay::Box::layoutBox const):
69+
(WebCore::InlineDisplay::Box::Box):
70+
(WebCore::InlineDisplay::Box::Text::Text):
71+
(WebCore::Layout::Run::Text::start const): Deleted.
72+
(WebCore::Layout::Run::Text::end const): Deleted.
73+
(WebCore::Layout::Run::Text::length const): Deleted.
74+
(WebCore::Layout::Run::Text::originalContent const): Deleted.
75+
(WebCore::Layout::Run::Text::renderedContent const): Deleted.
76+
(WebCore::Layout::Run::Text::hasHyphen const): Deleted.
77+
(WebCore::Layout::Run::isText const): Deleted.
78+
(WebCore::Layout::Run::isSoftLineBreak const): Deleted.
79+
(WebCore::Layout::Run::isLineBreakBox const): Deleted.
80+
(WebCore::Layout::Run::isLineBreak const): Deleted.
81+
(WebCore::Layout::Run::isAtomicInlineLevelBox const): Deleted.
82+
(WebCore::Layout::Run::isInlineBox const): Deleted.
83+
(WebCore::Layout::Run::isNonRootInlineBox const): Deleted.
84+
(WebCore::Layout::Run::isRootInlineBox const): Deleted.
85+
(WebCore::Layout::Run::isGenericInlineLevelBox const): Deleted.
86+
(WebCore::Layout::Run::isInlineLevelBox const): Deleted.
87+
(WebCore::Layout::Run::isNonRootInlineLevelBox const): Deleted.
88+
(WebCore::Layout::Run::type const): Deleted.
89+
(WebCore::Layout::Run::hasContent const): Deleted.
90+
(WebCore::Layout::Run::logicalRect const): Deleted.
91+
(WebCore::Layout::Run::inkOverflow const): Deleted.
92+
(WebCore::Layout::Run::logicalTop const): Deleted.
93+
(WebCore::Layout::Run::logicalBottom const): Deleted.
94+
(WebCore::Layout::Run::logicalLeft const): Deleted.
95+
(WebCore::Layout::Run::logicalRight const): Deleted.
96+
(WebCore::Layout::Run::logicalWidth const): Deleted.
97+
(WebCore::Layout::Run::logicalHeight const): Deleted.
98+
(WebCore::Layout::Run::moveVertically): Deleted.
99+
(WebCore::Layout::Run::adjustInkOverflow): Deleted.
100+
(WebCore::Layout::Run::text): Deleted.
101+
(WebCore::Layout::Run::text const): Deleted.
102+
(WebCore::Layout::Run::expansion const): Deleted.
103+
(WebCore::Layout::Run::layoutBox const): Deleted.
104+
(WebCore::Layout::Run::style const): Deleted.
105+
(WebCore::Layout::Run::lineIndex const): Deleted.
106+
(WebCore::Layout::Run::Run): Deleted.
107+
(WebCore::Layout::Run::Text::Text): Deleted.
108+
* layout/formattingContexts/table/TableFormattingContext.cpp:
109+
(WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):
110+
* layout/integration/LayoutIntegrationInlineContent.cpp:
111+
(WebCore::LayoutIntegration::InlineContent::hasContent const):
112+
(WebCore::LayoutIntegration:: const):
113+
(WebCore::LayoutIntegration::InlineContent::~InlineContent):
114+
(WebCore::LayoutIntegration::InlineContent::indexForBox const):
115+
(WebCore::LayoutIntegration::InlineContent::firstBoxForLayoutBox const):
116+
(WebCore::LayoutIntegration::InlineContent::firstBoxIndexForLayoutBox const):
117+
(WebCore::LayoutIntegration::InlineContent::nonRootInlineBoxIndexesForLayoutBox const):
118+
(WebCore::LayoutIntegration::InlineContent::releaseCaches):
119+
(WebCore::LayoutIntegration::InlineContent::shrinkToFit):
120+
(WebCore::LayoutIntegration::InlineContent::indexForRun const): Deleted.
121+
(WebCore::LayoutIntegration::InlineContent::firstRunForLayoutBox const): Deleted.
122+
(WebCore::LayoutIntegration::InlineContent::firstRunIndexForLayoutBox const): Deleted.
123+
* layout/integration/LayoutIntegrationInlineContent.h:
124+
(WebCore::LayoutIntegration::InlineContent::lineForBox const):
125+
(WebCore::LayoutIntegration::InlineContent::traverseNonRootInlineBoxes):
126+
(WebCore::LayoutIntegration::InlineContent::lineForRun const): Deleted.
127+
* layout/integration/LayoutIntegrationInlineContentBuilder.cpp:
128+
(WebCore::LayoutIntegration::InlineContentBuilder::build const):
129+
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):
130+
* layout/integration/LayoutIntegrationLine.h:
131+
(WebCore::LayoutIntegration::Line::Line):
132+
(WebCore::LayoutIntegration::Line::firstBoxIndex const):
133+
(WebCore::LayoutIntegration::Line::boxCount const):
134+
(WebCore::LayoutIntegration::Line::firstRunIndex const): Deleted.
135+
(WebCore::LayoutIntegration::Line::runCount const): Deleted.
136+
* layout/integration/LayoutIntegrationLineIteratorModernPath.h:
137+
(WebCore::LayoutIntegration::LineIteratorModernPath::firstRun const):
138+
(WebCore::LayoutIntegration::LineIteratorModernPath::lastRun const):
139+
* layout/integration/LayoutIntegrationLineLayout.cpp:
140+
(WebCore::LayoutIntegration::LineLayout::layout):
141+
(WebCore::LayoutIntegration::LineLayout::textRunsFor const):
142+
(WebCore::LayoutIntegration::LineLayout::runFor const):
143+
(WebCore::LayoutIntegration::LineLayout::firstInlineBoxRect const):
144+
(WebCore::LayoutIntegration::LineLayout::paint):
145+
(WebCore::LayoutIntegration::LineLayout::hitTest):
146+
(WebCore::LayoutIntegration::LineLayout::paintTextBoxUsingPhysicalCoordinates):
147+
(WebCore::LayoutIntegration::LineLayout::paintTextRunUsingPhysicalCoordinates): Deleted.
148+
* layout/integration/LayoutIntegrationLineLayout.h:
149+
* layout/integration/LayoutIntegrationPagination.cpp:
150+
(WebCore::LayoutIntegration::makeAdjustedContent):
151+
* layout/integration/LayoutIntegrationRunIterator.cpp:
152+
(WebCore::LayoutIntegration::PathRun::line const):
153+
(WebCore::LayoutIntegration::textRunFor):
154+
* layout/integration/LayoutIntegrationRunIterator.h:
155+
(WebCore::LayoutIntegration::PathRun::inlineBox const):
156+
* layout/integration/LayoutIntegrationRunIteratorModernPath.h:
157+
(WebCore::LayoutIntegration::RunIteratorModernPath::RunIteratorModernPath):
158+
(WebCore::LayoutIntegration::RunIteratorModernPath::isText const):
159+
(WebCore::LayoutIntegration::RunIteratorModernPath::rect const):
160+
(WebCore::LayoutIntegration::RunIteratorModernPath::isLineBreak const):
161+
(WebCore::LayoutIntegration::RunIteratorModernPath::hasHyphen const):
162+
(WebCore::LayoutIntegration::RunIteratorModernPath::text const):
163+
(WebCore::LayoutIntegration::RunIteratorModernPath::start const):
164+
(WebCore::LayoutIntegration::RunIteratorModernPath::end const):
165+
(WebCore::LayoutIntegration::RunIteratorModernPath::length const):
166+
(WebCore::LayoutIntegration::RunIteratorModernPath::offsetForPosition const):
167+
(WebCore::LayoutIntegration::RunIteratorModernPath::positionForOffset const):
168+
(WebCore::LayoutIntegration::RunIteratorModernPath::selectableRange const):
169+
(WebCore::LayoutIntegration::RunIteratorModernPath::renderer const):
170+
(WebCore::LayoutIntegration::RunIteratorModernPath::traverseNextTextRun):
171+
(WebCore::LayoutIntegration::RunIteratorModernPath::traverseNextOnLine):
172+
(WebCore::LayoutIntegration::RunIteratorModernPath::traversePreviousOnLine):
173+
(WebCore::LayoutIntegration::RunIteratorModernPath::operator== const):
174+
(WebCore::LayoutIntegration::RunIteratorModernPath::atEnd const):
175+
(WebCore::LayoutIntegration::RunIteratorModernPath::box const):
176+
(WebCore::LayoutIntegration::RunIteratorModernPath::traverseNextLeaf):
177+
(WebCore::LayoutIntegration::RunIteratorModernPath::traversePreviousLeaf):
178+
(WebCore::LayoutIntegration::RunIteratorModernPath::setAtEnd):
179+
(WebCore::LayoutIntegration::RunIteratorModernPath::boxes const):
180+
(WebCore::LayoutIntegration::RunIteratorModernPath::line const):
181+
(WebCore::LayoutIntegration::RunIteratorModernPath::createTextRun const):
182+
(WebCore::LayoutIntegration::RunIteratorModernPath::run const): Deleted.
183+
(WebCore::LayoutIntegration::RunIteratorModernPath::runs const): Deleted.
184+
* layout/layouttree/LayoutTreeBuilder.cpp:
185+
(WebCore::Layout::showInlineTreeAndRuns):
186+
* rendering/TextBoxPainter.cpp:
187+
(WebCore::TextBoxPainter::TextBoxPainter):
188+
* rendering/TextBoxPainter.h:
189+
* rendering/TextPainter.cpp:
190+
(WebCore::TextPainter::clearGlyphDisplayLists):
191+
1192
2021-09-23 Alan Bujtas <zalan@apple.com>
2193

3194
[IFC][Integration] RenderDeprecatedFlexibleBox::setIsStretchingChildren is unused after r282873

Source/WebCore/Headers.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ set(WebCore_PRIVATE_FRAMEWORK_HEADERS
784784
layout/LayoutUnits.h
785785
layout/MarginTypes.h
786786

787-
layout/formattingContexts/inline/display/InlineLineRun.h
787+
layout/formattingContexts/inline/display/InlineDisplayBox.h
788788
layout/formattingContexts/inline/InlineRect.h
789789

790790
layout/integration/LayoutIntegrationInlineContent.h

Source/WebCore/WebCore.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2214,7 +2214,7 @@
22142214
6FB5E214221F2453003989CF /* ContentChangeObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FB5E212221F2447003989CF /* ContentChangeObserver.h */; settings = {ATTRIBUTES = (Private, ); }; };
22152215
6FB7D2DD250FD828000207AA /* FlexFormattingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FB7D2D9250FD7FC000207AA /* FlexFormattingContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
22162216
6FB7D2DE250FD82E000207AA /* FlexFormattingState.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FB7D2DA250FD7FC000207AA /* FlexFormattingState.h */; settings = {ATTRIBUTES = (Private, ); }; };
2217-
6FC3F9472516756700A49BEA /* InlineLineRun.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FC3F9452516756600A49BEA /* InlineLineRun.h */; settings = {ATTRIBUTES = (Private, ); }; };
2217+
6FC3F9472516756700A49BEA /* InlineDisplayBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FC3F9452516756600A49BEA /* InlineDisplayBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
22182218
6FCBDB97265DF2C80021EA7B /* LayoutContainingBlockChainIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FCBDB95265DF2C70021EA7B /* LayoutContainingBlockChainIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
22192219
6FD09543251115220098877D /* LayoutGeometryRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD09541251115220098877D /* LayoutGeometryRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
22202220
6FE198172178397C00446F08 /* InlineContentBreaker.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FE198152178397C00446F08 /* InlineContentBreaker.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -10214,7 +10214,7 @@
1021410214
6FB7D2D9250FD7FC000207AA /* FlexFormattingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FlexFormattingContext.h; sourceTree = "<group>"; };
1021510215
6FB7D2DA250FD7FC000207AA /* FlexFormattingState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FlexFormattingState.h; sourceTree = "<group>"; };
1021610216
6FBB860520B464B600DAD938 /* FormattingGeometry.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FormattingGeometry.cpp; sourceTree = "<group>"; };
10217-
6FC3F9452516756600A49BEA /* InlineLineRun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineLineRun.h; sourceTree = "<group>"; };
10217+
6FC3F9452516756600A49BEA /* InlineDisplayBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineDisplayBox.h; sourceTree = "<group>"; };
1021810218
6FC53AEB24AF7A8E006059FE /* TableFormattingQuirks.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TableFormattingQuirks.cpp; sourceTree = "<group>"; };
1021910219
6FC5CA9222E3599300B13E11 /* TableFormattingState.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TableFormattingState.cpp; sourceTree = "<group>"; };
1022010220
6FC5CA9422E3599400B13E11 /* TableFormattingContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TableFormattingContext.cpp; sourceTree = "<group>"; };
@@ -18310,8 +18310,8 @@
1831018310
11A1E6FB26FBB6CE00435D36 /* display */ = {
1831118311
isa = PBXGroup;
1831218312
children = (
18313+
6FC3F9452516756600A49BEA /* InlineDisplayBox.h */,
1831318314
6F91420F25152137004E4FEA /* InlineDisplayLine.h */,
18314-
6FC3F9452516756600A49BEA /* InlineLineRun.h */,
1831518315
);
1831618316
path = display;
1831718317
sourceTree = "<group>";
@@ -32908,6 +32908,7 @@
3290832908
E30592641E27A3AD00D57C98 /* InlineClassicScript.h in Headers */,
3290932909
6FE198172178397C00446F08 /* InlineContentBreaker.h in Headers */,
3291032910
111FA1C826F0F30F003B8F16 /* InlineDamage.h in Headers */,
32911+
6FC3F9472516756700A49BEA /* InlineDisplayBox.h in Headers */,
3291132912
11513D0326D981E8004D3FAA /* InlineDisplayContentBuilder.h in Headers */,
3291232913
6F91421125152138004E4FEA /* InlineDisplayLine.h in Headers */,
3291332914
6F7CA3CA208C2B2E002F29AB /* InlineFormattingContext.h in Headers */,
@@ -32923,7 +32924,6 @@
3292332924
11C3227D26D958CE00328F4D /* InlineLineBoxBuilder.h in Headers */,
3292432925
6F6EE74326D44EE300374CDA /* InlineLineBoxVerticalAligner.h in Headers */,
3292532926
6F26EB48234004A5006906E2 /* InlineLineBuilder.h in Headers */,
32926-
6FC3F9472516756700A49BEA /* InlineLineRun.h in Headers */,
3292732927
F45775CE241437D5002DF1A0 /* InlinePathData.h in Headers */,
3292832928
6F40DA822513033A00EC04B7 /* InlineRect.h in Headers */,
3292932929
E4D33F3B252AEECD00837D05 /* InlineRunAndOffset.h in Headers */,

Source/WebCore/display/DisplayTreeBuilder.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -305,31 +305,31 @@ void TreeBuilder::buildInlineDisplayTree(const Layout::LayoutState& layoutState,
305305
{
306306
auto& inlineFormattingState = layoutState.formattingStateForInlineFormattingContext(inlineFormattingRoot);
307307

308-
for (auto& run : inlineFormattingState.runs()) {
309-
if (run.isRootInlineBox()) {
308+
for (auto& box : inlineFormattingState.boxes()) {
309+
if (box.isRootInlineBox()) {
310310
// Not supported yet.
311311
continue;
312312
}
313313

314-
if (run.text()) {
315-
auto& lineGeometry = inlineFormattingState.lines().at(run.lineIndex());
316-
auto textBox = m_boxFactory.displayBoxForTextRun(run, lineGeometry, positioningContext().inFlowContainingBlockContext());
314+
if (box.text()) {
315+
auto& lineGeometry = inlineFormattingState.lines().at(box.lineIndex());
316+
auto textBox = m_boxFactory.displayBoxForTextRun(box, lineGeometry, positioningContext().inFlowContainingBlockContext());
317317
insert(WTFMove(textBox), insertionPosition);
318318
accountForBoxPaintingExtent(*insertionPosition.currentChild);
319319
continue;
320320
}
321321

322-
if (is<Layout::ContainerBox>(run.layoutBox())) {
323-
recursiveBuildDisplayTree(layoutState, run.layoutBox(), insertionPosition);
322+
if (is<Layout::ContainerBox>(box.layoutBox())) {
323+
recursiveBuildDisplayTree(layoutState, box.layoutBox(), insertionPosition);
324324
continue;
325325
}
326326

327327
// FIXME: Workaround for webkit.orgb/b/219335.
328-
if (run.layoutBox().isLineBreakBox() && run.layoutBox().isOutOfFlowPositioned())
328+
if (box.layoutBox().isLineBreakBox() && box.layoutBox().isOutOfFlowPositioned())
329329
continue;
330330

331-
auto geometry = layoutState.geometryForBox(run.layoutBox());
332-
auto displayBox = m_boxFactory.displayBoxForLayoutBox(run.layoutBox(), geometry, positioningContext().inFlowContainingBlockContext());
331+
auto geometry = layoutState.geometryForBox(box.layoutBox());
332+
auto displayBox = m_boxFactory.displayBoxForLayoutBox(box.layoutBox(), geometry, positioningContext().inFlowContainingBlockContext());
333333
insertIntoTree(WTFMove(displayBox), insertionPosition, WillTraverseDescendants::No);
334334
}
335335
}

0 commit comments

Comments
 (0)