[LFC][IFC] Add intrinsic width support for basic inline containers
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Feb 2019 20:37:03 +0000 (20:37 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Feb 2019 20:37:03 +0000 (20:37 +0000)
commit81c12869db6c08753608fbc1615699dbb402ec1d
treec47331e630ed6e6b40ca6b942e0e96fac28ae098
parent39734b17482f7c1eeefdcb4214c928ba82fbf045
[LFC][IFC] Add intrinsic width support for basic inline containers
https://bugs.webkit.org/show_bug.cgi?id=194473

Reviewed by Antti Koivisto.

Source/WebCore:

Preferred width computation logic is very similar to normal layout.
One of the main difference is that the preferred width codepath does not provide valid containing block width.
This patch implement basic inline container support by passing nullopt containing block width in UsedHorizontalValues.

* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layout const):
(WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const):
(WebCore::Layout::InlineFormattingContext::computeBorderAndPadding const):
(WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPadding const):
(WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const):
(WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
(WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox const):
* layout/inlineformatting/InlineFormattingContext.h:

Tools:

Expand tests coverage (11 new tests -> 798)

* LayoutReloaded/misc/LFC-passing-tests.txt: not sure why run-singly keeps producing different ordering.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
Source/WebCore/layout/inlineformatting/InlineFormattingContext.h
Tools/ChangeLog
Tools/LayoutReloaded/misc/LFC-passing-tests.txt