[LFC] The used containing block width value is optional
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2019 14:46:36 +0000 (14:46 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2019 14:46:36 +0000 (14:46 +0000)
commit30d6fd27723381044f885a6feb4f6dafe8bb017b
treebcb741b602a034bad8f59f4041861f96a15c5683
parent9c6358334323debff4a0ac773708a924a4e745b6
[LFC] The used containing block width value is optional
https://bugs.webkit.org/show_bug.cgi?id=194428

Reviewed by Antti Koivisto.

The preferred width codepath cannot provide a valid used containing block width value.

"The percentage is calculated with respect to the width of the generated box's containing block.
If the containing block's width depends on this element's width, then the resulting layout is undefined in CSS 2.2."

Let's use 0 as used value for now.

* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::computedPadding):
(WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin):
* layout/LayoutUnits.h:
(WebCore::Layout::UsedHorizontalValues::UsedHorizontalValues):
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
* page/FrameViewLayoutContext.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/layout/FormattingContextGeometry.cpp
Source/WebCore/layout/LayoutUnits.h
Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp
Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp