Changeset 248365 in webkit
- Timestamp:
- Aug 7, 2019 8:32:55 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r248364 r248365 1 2019-08-07 Zalan Bujtas <zalan@apple.com> 2 3 [LFC] Rename FormattingContext::layoutOutOfFlowDescendants to layoutOutOfFlowContent 4 https://bugs.webkit.org/show_bug.cgi?id=200502 5 <rdar://problem/54032534> 6 7 Reviewed by Antti Koivisto. 8 9 The layoutOutOfFlowDescendants name is not entirely accurate. In a formatting context we only 10 lay out the out-of-flow boxes that actually belong to the current formatting context. 11 12 <div style="float: left"> 13 <div id=outer style="position: absolute"> 14 <div id=inner style="position: absolute"></div> 15 </div> 16 </div> 17 18 The float's formatting context only lays out the outer absolutely positioned box. The inner box 19 (which is also an out-of-flow descendant of the float box) is taken care of by the outer box. 20 21 * layout/FormattingContext.cpp: 22 (WebCore::Layout::FormattingContext::layoutOutOfFlowContent const): 23 (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const): 24 (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const): Deleted. 25 * layout/FormattingContext.h: 26 * layout/LayoutState.cpp: 27 (WebCore::Layout::LayoutState::layoutFormattingContextSubtree): 28 * layout/blockformatting/BlockFormattingContext.cpp: 29 (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const): 30 * layout/inlineformatting/InlineFormattingContext.cpp: 31 (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const): 32 1 33 2019-08-07 Zalan Bujtas <zalan@apple.com> 2 34 -
trunk/Source/WebCore/layout/FormattingContext.cpp
r248290 r248365 134 134 } 135 135 136 void FormattingContext::layoutOutOfFlow Descendants() const137 { 138 LOG_WITH_STREAM(FormattingContextLayout, stream << "Start: layout out-of-flow descendants-> context: " << &layoutState() << " root: " << &root());136 void FormattingContext::layoutOutOfFlowContent() const 137 { 138 LOG_WITH_STREAM(FormattingContextLayout, stream << "Start: layout out-of-flow content -> context: " << &layoutState() << " root: " << &root()); 139 139 140 140 for (auto& outOfFlowBox : formattingState().outOfFlowBoxes()) { … … 148 148 149 149 computeOutOfFlowVerticalGeometry(*outOfFlowBox); 150 formattingContext->layoutOutOfFlow Descendants();151 } 152 LOG_WITH_STREAM(FormattingContextLayout, stream << "End: layout out-of-flow descendants-> context: " << &layoutState() << " root: " << &root());150 formattingContext->layoutOutOfFlowContent(); 151 } 152 LOG_WITH_STREAM(FormattingContextLayout, stream << "End: layout out-of-flow content -> context: " << &layoutState() << " root: " << &root()); 153 153 } 154 154 … … 240 240 // margin-left + border-left-width + padding-left + width + padding-right + border-right-width + margin-right = width of containing block 241 241 auto containingBlockWidth = containingBlockDisplayBox.contentBoxWidth(); 242 ASSERT(displayBox.marginStart() + displayBox.borderLeft() + displayBox.paddingLeft().valueOr(0) + displayBox.contentBoxWidth() 243 + displayBox.paddingRight().valueOr(0) + displayBox.borderRight() + displayBox.marginEnd() == containingBlockWidth); 242 ASSERT(displayBox.horizontalMarginBorderAndPadding() + displayBox.contentBoxWidth() == containingBlockWidth); 244 243 } 245 244 -
trunk/Source/WebCore/layout/FormattingContext.h
r248290 r248365 51 51 52 52 virtual void layout() const = 0; 53 void layoutOutOfFlow Descendants() const;53 void layoutOutOfFlowContent() const; 54 54 55 55 struct IntrinsicWidthConstraints { -
trunk/Source/WebCore/layout/LayoutState.cpp
r248364 r248365 86 86 auto formattingContext = createFormattingContext(layoutRoot); 87 87 formattingContext->layout(); 88 formattingContext->layoutOutOfFlow Descendants();88 formattingContext->layoutOutOfFlowContent(); 89 89 } 90 90 -
trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp
r248290 r248365 173 173 LOG_WITH_STREAM(FormattingContextLayout, stream << "[Compute] -> [Height][Margin] -> for layoutBox(" << &layoutBox << ")"); 174 174 computeHeightAndMargin(layoutBox); 175 // Now that we computed the root's height, we can go back and layout the out-of-flow descedants (if any).176 formattingContext->layoutOutOfFlow Descendants();175 // Now that we computed the root's height, we can go back and layout the out-of-flow content. 176 formattingContext->layoutOutOfFlowContent(); 177 177 178 178 // Float related final positioning. -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
r248290 r248365 249 249 // Come back and finalize the root's height and margin. 250 250 computeHeightAndMargin(root); 251 // Now that we computed the root's height, we can go back and layout the out-of-flow descedants (if any).252 formattingContext->layoutOutOfFlow Descendants();251 // Now that we computed the root's height, we can go back and layout the out-of-flow content. 252 formattingContext->layoutOutOfFlowContent(); 253 253 } 254 254
Note: See TracChangeset
for help on using the changeset viewer.