Changeset 231952 in webkit
- Timestamp:
- May 18, 2018 7:30:44 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r231950 r231952 1 2018-05-18 Zalan Bujtas <zalan@apple.com> 2 3 [LFC] Implement width computation for non-replaced floating elements. 4 https://bugs.webkit.org/show_bug.cgi?id=185759 5 6 Reviewed by Antti Koivisto. 7 8 * layout/FormattingContext.cpp: 9 (WebCore::Layout::FormattingContext::computeFloatingWidth const): 10 (WebCore::Layout::FormattingContext::computeFloatingNonReplacedWidth const): 11 * layout/FormattingContext.h: 12 1 13 2018-05-18 Antoine Quint <graouts@apple.com> 2 14 -
trunk/Source/WebCore/layout/FormattingContext.cpp
r231897 r231952 91 91 { 92 92 if (!layoutBox.replaced()) { 93 ASSERT_NOT_IMPLEMENTED_YET();93 computeFloatingNonReplacedWidth(layoutContext, layoutBox, displayBox); 94 94 return; 95 95 } … … 296 296 } 297 297 298 void FormattingContext::computeFloatingNonReplacedWidth(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const 299 { 300 ASSERT(layoutBox.isFloatingPositioned() && !layoutBox.replaced()); 301 // 10.3.5 Floating, non-replaced elements 302 303 // If 'width' is computed as 'auto', the used value is the "shrink-to-fit" width. 304 auto width = layoutBox.style().logicalWidth(); 305 displayBox.setWidth(width.isAuto() ? shrinkToFitWidth(layoutContext, layoutBox) : LayoutUnit(width.value())); 306 } 307 298 308 void FormattingContext::computeOutOfFlowNonReplacedWidth(LayoutContext& layoutContext, const Box& layoutBox, Display::Box& displayBox) const 299 309 { -
trunk/Source/WebCore/layout/FormattingContext.h
r231894 r231952 95 95 void computeOutOfFlowReplacedWidth(LayoutContext&, const Box&, Display::Box&) const; 96 96 97 void computeFloatingNonReplacedWidth(LayoutContext&, const Box&, Display::Box&) const; 98 97 99 LayoutUnit contentHeightForFormattingContextRoot(LayoutContext&, const Box&) const; 98 100 LayoutUnit shrinkToFitWidth(LayoutContext&, const Box&) const;
Note: See TracChangeset
for help on using the changeset viewer.