Changeset 249292 in webkit
- Timestamp:
- Aug 29, 2019, 2:26:23 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
layout/blockformatting/BlockFormattingContext.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r249290 r249292 1 2019-08-29 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][BFC] BlockFormattingContext::usedAvailableWidthForFloatAvoider should only be called on float avoiders. 4 https://bugs.webkit.org/show_bug.cgi?id=201238 5 <rdar://problem/54807663> 6 7 Reviewed by Antti Koivisto. 8 9 Make the horizontal available space logic for float avoiders more explicit/readable. 10 11 * layout/blockformatting/BlockFormattingContext.cpp: 12 (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider const): 13 (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const): 14 1 15 2019-08-29 Zalan Bujtas <zalan@apple.com> 2 16 -
trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp
r249288 r249292 123 123 // Normally the available width for an in-flow block level box is the width of the containing block's content box. 124 124 // However (and can't find it anywhere in the spec) non-floating positioned float avoider block level boxes are constrained by existing floats. 125 if (!layoutBox.isFloatAvoider() || layoutBox.isFloatingPositioned()) 126 return { }; 125 ASSERT(layoutBox.isFloatAvoider()); 127 126 auto& floatingState = floatingContext.floatingState(); 128 127 if (floatingState.isEmpty()) … … 164 163 computeStaticVerticalPosition(floatingContext, layoutBox); 165 164 166 computeWidthAndMargin(layoutBox, usedAvailableWidthForFloatAvoider(floatingContext, layoutBox)); 165 Optional<LayoutUnit> usedAvailableWidthForFloatAvoider; 166 auto horizontalAvailableSpaceIsConstrainedByExistingFloats = layoutBox.isFloatAvoider() && !layoutBox.isFloatingPositioned(); 167 if (horizontalAvailableSpaceIsConstrainedByExistingFloats) 168 usedAvailableWidthForFloatAvoider = this->usedAvailableWidthForFloatAvoider(floatingContext, layoutBox); 169 computeWidthAndMargin(layoutBox, usedAvailableWidthForFloatAvoider); 167 170 computeStaticHorizontalPosition(layoutBox); 168 171 // Swich over to the new formatting context (the one that the root creates).
Note:
See TracChangeset
for help on using the changeset viewer.