[LFC][BFC] Add support for min(max)-width
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Sep 2018 18:03:31 +0000 (18:03 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Sep 2018 18:03:31 +0000 (18:03 +0000)
commit36146477f575cd07540dafcad7f5685b66d7d4fd
tree863c23adc6b9e036d23752146559fb7b3073fd29
parentc372fe16b4542f5f8daa86dabdb23e78b63c7220
[LFC][BFC] Add support for min(max)-width
https://bugs.webkit.org/show_bug.cgi?id=189358

Reviewed by Antti Koivisto.

Source/WebCore:

See https://www.w3.org/TR/CSS22/visudet.html#min-max-widths for details.

Tests: fast/block/block-only/absolute-position-min-max-width.html
       fast/block/block-only/float-min-max-width.html
       fast/block/block-only/inflow-min-max-width.html

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
* layout/FormattingContext.h:
(WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::computedValueIfNotAuto):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
* layout/blockformatting/BlockFormattingContext.h:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):

Tools:

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

LayoutTests:

* fast/block/block-only/absolute-position-min-max-width-expected.txt: Added.
* fast/block/block-only/absolute-position-min-max-width.html: Added.
* fast/block/block-only/float-min-max-width-expected.txt: Added.
* fast/block/block-only/float-min-max-width.html: Added.
* fast/block/block-only/inflow-min-max-width-expected.txt: Added.
* fast/block/block-only/inflow-min-max-width.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/block/block-only/absolute-position-min-max-width-expected.txt [new file with mode: 0644]
LayoutTests/fast/block/block-only/absolute-position-min-max-width.html [new file with mode: 0644]
LayoutTests/fast/block/block-only/float-min-max-width-expected.txt [new file with mode: 0644]
LayoutTests/fast/block/block-only/float-min-max-width.html [new file with mode: 0644]
LayoutTests/fast/block/block-only/inflow-min-max-width-expected.txt [new file with mode: 0644]
LayoutTests/fast/block/block-only/inflow-min-max-width.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
Source/WebCore/layout/blockformatting/BlockFormattingContext.h
Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp
Tools/ChangeLog
Tools/LayoutReloaded/misc/LFC-passing-tests.txt