Changeset 270198 in webkit
- Timestamp:
- Nov 27, 2020, 9:45:58 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
display/DisplayTreeBuilder.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r270197 r270198 1 2020-11-27 Simon Fraser <simon.fraser@apple.com> 2 3 [LFC Display] A ContainerBox can establish an inline formatting context and have box children 4 https://bugs.webkit.org/show_bug.cgi?id=218736 5 6 Reviewed by Zalan Bujtas. 7 8 If a layout box establishes an inline formatting context, then the only descendant container 9 boxes that we should make display boxes for while traversing non-inline descendants 10 are those which are out of flow. 11 12 * display/DisplayTreeBuilder.cpp: 13 (WebCore::Display::TreeBuilder::recursiveBuildDisplayTree const): 14 1 15 2020-11-27 Adrian Perez de Castro <aperez@igalia.com> 2 16 -
trunk/Source/WebCore/display/DisplayTreeBuilder.cpp
r269822 r270198 142 142 143 143 auto positionForChildren = InsertionPosition { downcast<ContainerBox>(*insertionPosition.currentChild) }; 144 144 145 enum class DescendantBoxInclusion { AllBoxes, OutOfFlowOnly }; 146 auto boxInclusion = DescendantBoxInclusion::AllBoxes; 147 145 148 if (layoutContainerBox.establishesInlineFormattingContext()) { 146 149 buildInlineDisplayTree(layoutState, offsetFromRoot, downcast<Layout::ContainerBox>(layoutContainerBox), positionForChildren); 147 return; 148 } 150 boxInclusion = DescendantBoxInclusion::OutOfFlowOnly; 151 } 152 153 auto includeBox = [](DescendantBoxInclusion boxInclusion, const Layout::Box& box) { 154 switch (boxInclusion) { 155 case DescendantBoxInclusion::AllBoxes: return true; 156 case DescendantBoxInclusion::OutOfFlowOnly: return !box.isInFlow(); 157 } 158 return false; 159 }; 149 160 150 161 for (auto& child : Layout::childrenOfType<Layout::Box>(layoutContainerBox)) { 151 if ( layoutState.hasBoxGeometry(child))162 if (includeBox(boxInclusion, child) && layoutState.hasBoxGeometry(child)) 152 163 recursiveBuildDisplayTree(layoutState, offsetFromRoot, child, positionForChildren); 153 164 }
Note:
See TracChangeset
for help on using the changeset viewer.