[LFC][IFC] Add support for intrinsic width calculation
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Nov 2018 14:23:54 +0000 (14:23 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Nov 2018 14:23:54 +0000 (14:23 +0000)
commit88fcec30410529a62fec6bdcce3f3aac30fb0c98
treee8b265cbabe083aee4700cde5cd451149d475066
parent90ca53acf0eca871cb86fce73f38a18baffd098f
[LFC][IFC] Add support for intrinsic width calculation
https://bugs.webkit.org/show_bug.cgi?id=191144

Reviewed by Antti Koivisto.

Source/WebCore:

This is the inline formatting version of the shrink-to-fit computation. It generates inline runs
and uses InlineLineBreaker to compute min/max width. This is very similar to ::layout.

Test: fast/inline/simple-shrink-to-fit-inline-block.html

* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layout const):
(WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const):
(WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const):
(WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
(WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox const):
(WebCore::Layout::InlineFormattingContext::collectInlineContent const):
(WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const):
(WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForInlineBox const): Deleted.
* layout/inlineformatting/InlineFormattingContext.h:

Tools:

* LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

* fast/inline/simple-shrink-to-fit-inline-block-expected.txt: Added.
* fast/inline/simple-shrink-to-fit-inline-block.html: Added.
* platform/ios/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/inline/simple-shrink-to-fit-inline-block-expected.txt [new file with mode: 0644]
LayoutTests/fast/inline/simple-shrink-to-fit-inline-block.html [new file with mode: 0644]
LayoutTests/platform/ios/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
Source/WebCore/layout/inlineformatting/InlineFormattingContext.h
Tools/ChangeLog
Tools/LayoutReloaded/misc/LFC-passing-tests.txt