Commit fb3bed1
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-d52691b4dbfc1 parent 2aeaaaa commit fb3bed1
31 files changed
Lines changed: 548 additions & 352 deletions
File tree
- Source/WebCore
- WebCore.xcodeproj
- display
- css
- layout
- formattingContexts
- inline
- display
- table
- integration
- layouttree
- rendering
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
1 | 192 | | |
2 | 193 | | |
3 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
787 | | - | |
| 787 | + | |
788 | 788 | | |
789 | 789 | | |
790 | 790 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2214 | 2214 | | |
2215 | 2215 | | |
2216 | 2216 | | |
2217 | | - | |
| 2217 | + | |
2218 | 2218 | | |
2219 | 2219 | | |
2220 | 2220 | | |
| |||
10214 | 10214 | | |
10215 | 10215 | | |
10216 | 10216 | | |
10217 | | - | |
| 10217 | + | |
10218 | 10218 | | |
10219 | 10219 | | |
10220 | 10220 | | |
| |||
18310 | 18310 | | |
18311 | 18311 | | |
18312 | 18312 | | |
| 18313 | + | |
18313 | 18314 | | |
18314 | | - | |
18315 | 18315 | | |
18316 | 18316 | | |
18317 | 18317 | | |
| |||
32908 | 32908 | | |
32909 | 32909 | | |
32910 | 32910 | | |
| 32911 | + | |
32911 | 32912 | | |
32912 | 32913 | | |
32913 | 32914 | | |
| |||
32923 | 32924 | | |
32924 | 32925 | | |
32925 | 32926 | | |
32926 | | - | |
32927 | 32927 | | |
32928 | 32928 | | |
32929 | 32929 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
309 | | - | |
| 308 | + | |
| 309 | + | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
315 | | - | |
316 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
323 | | - | |
| 322 | + | |
| 323 | + | |
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
332 | | - | |
| 331 | + | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| |||
0 commit comments