[LFC][BFC] Display::Box interface should reflect that padding is optional.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Aug 2018 14:40:31 +0000 (14:40 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Aug 2018 14:40:31 +0000 (14:40 +0000)
commit4c679e9a05c2c9030731831cbb88a4a51f905685
treec4248d74bdeffd5f297199be68cf24941cdc7fa3
parent79a0cc4fc7cbf7fa366ced23be2cd0793782098c
[LFC][BFC] Display::Box interface should reflect that padding is optional.
https://bugs.webkit.org/show_bug.cgi?id=188630

Reviewed by Antti Koivisto.

Certain type of boxes can't have paddings (see Layout::Box::isPaddingApplicable).

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeBorderAndPadding const):
(WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
* layout/displaytree/DisplayBox.h:
(WebCore::Display::Box::width const):
(WebCore::Display::Box::height const):
(WebCore::Display::Box::contentBoxTop const):
(WebCore::Display::Box::contentBoxLeft const):
(WebCore::Display::Box::setPadding):
(WebCore::Display::Box::paddingTop const):
(WebCore::Display::Box::paddingLeft const):
(WebCore::Display::Box::paddingBottom const):
(WebCore::Display::Box::paddingRight const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/layout/FormattingContext.cpp
Source/WebCore/layout/FormattingContextGeometry.cpp
Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp
Source/WebCore/layout/displaytree/DisplayBox.h