[LFC] Add support for min/max-height percentage values.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Sep 2018 02:27:37 +0000 (02:27 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Sep 2018 02:27:37 +0000 (02:27 +0000)
commit9f005501f539b64b634abf37cbaaaf58ca34244c
tree624f46c4d6bb20a813d33da13260f55aea830169
parentd752953fe4f3a824ac4f2d8dab14500d5f789523
[LFC] Add support for min/max-height percentage values.
https://bugs.webkit.org/show_bug.cgi?id=189391

Reviewed by Antti Koivisto.

Source/WebCore:

The percentage is calculated with respect to the height of the generated box's containing block.
If the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element
is not absolutely positioned, the percentage value is treated as '0' (for 'min-height') or 'none' (for 'max-height').

Test: fast/block/block-only/min-max-height-percentage.html

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
* layout/FormattingContext.h:
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::computedValueIfNotAuto):
(WebCore::Layout::FormattingContext::Geometry::computedMaxHeight):
(WebCore::Layout::FormattingContext::Geometry::computedMinHeight):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):

Tools:

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

LayoutTests:

* fast/block/block-only/min-max-height-percentage-expected.txt: Added.
* fast/block/block-only/min-max-height-percentage.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235773 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/block/block-only/min-max-height-percentage-expected.txt [new file with mode: 0644]
LayoutTests/fast/block/block-only/min-max-height-percentage.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/layout/FormattingContext.cpp
Source/WebCore/layout/FormattingContext.h
Source/WebCore/layout/FormattingContextGeometry.cpp
Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp
Tools/ChangeLog
Tools/LayoutReloaded/misc/LFC-passing-tests.txt