Available height is wrong for positioned elements with "box-sizing: border-box"
authorrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Nov 2017 20:37:35 +0000 (20:37 +0000)
committerrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Nov 2017 20:37:35 +0000 (20:37 +0000)
commit79aee44e58df1497a5f8fed21e7e483f01edc47d
tree22f14dad34e28cf537487709d4b5e8b27df971a3
parent2b000f1b9fdb143d91919e71f841d894d27b398b
Available height is wrong for positioned elements with "box-sizing: border-box"
https://bugs.webkit.org/show_bug.cgi?id=178783

Reviewed by Darin Adler.

Source/WebCore:

These methods were returning a wrong value for positioned items
in combination with "box-sizing: border-box".
The problem was that if the height of the element is given
by its offset properties (top and bottom) we don't need to call
adjustContentBoxLogicalHeightForBoxSizing().

Tests: fast/box-sizing/fill-available.html
       fast/box-sizing/replaced.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeReplacedLogicalHeightUsing const):
(WebCore::RenderBox::availableLogicalHeightUsing const):

LayoutTests:

There are some cases failing in fast/box-sizing/fill-available.html,
this is because of a different bug (see https://webkit.org/b/178790)
as noted down in the text comments.

* fast/box-sizing/fill-available-expected.txt: Added.
* fast/box-sizing/fill-available.html: Added.
* fast/box-sizing/replaced-expected.txt: Added.
* fast/box-sizing/replaced.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/box-sizing/fill-available-expected.txt [new file with mode: 0644]
LayoutTests/fast/box-sizing/fill-available.html [new file with mode: 0644]
LayoutTests/fast/box-sizing/replaced-expected.txt [new file with mode: 0644]
LayoutTests/fast/box-sizing/replaced.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.cpp