Ensure we compute the min and max height of replaced elements to 'none' or 0 when...
authorbjonesbe@adobe.com <bjonesbe@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jul 2014 17:56:18 +0000 (17:56 +0000)
committerbjonesbe@adobe.com <bjonesbe@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jul 2014 17:56:18 +0000 (17:56 +0000)
commitd4a2a90cd8bfb49e1188fa61881a8d57bf2fd1d2
treeacd6bbb2fbe86506312514d9324f07a73c0bdde9
parent6ba6d2552f16a6cbfa71b74203e5d551af877995
Ensure we compute the min and max height of replaced elements to 'none' or 0 when appropriate.
https://bugs.webkit.org/show_bug.cgi?id=135181

Reviewed by David Hyatt.

Source/WebCore:
If a replaced element has a percentage min or max height specified then that height value should
compute to 'none' for max-height and 0 for min-height when its containing block
does not have a height 'specified explicitly'.

This is based on a Blink patch by Robert Hogan.

Tests: css2.1/20110323/max-height-percentage-003.html
       fast/replaced/max-height-percentage-quirks.html
       fast/replaced/min-height-percentage-quirks.html
       fast/replaced/min-height-percentage.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::logicalHeightComputesAsNone):
(WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
* rendering/RenderBox.h:

LayoutTests:
* css2.1/20110323/max-height-percentage-003-expected.html: Added.
* css2.1/20110323/max-height-percentage-003.html: Added.
* fast/replaced/max-height-percentage-quirks-expected.html: Added.
* fast/replaced/max-height-percentage-quirks.html: Added.
* fast/replaced/min-height-percentage-expected.html: Added.
* fast/replaced/min-height-percentage-quirks-expected.html: Added.
* fast/replaced/min-height-percentage-quirks.html: Added.
* fast/replaced/min-height-percentage.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/css2.1/20110323/max-height-percentage-003-expected.html [new file with mode: 0644]
LayoutTests/css2.1/20110323/max-height-percentage-003.html [new file with mode: 0644]
LayoutTests/fast/replaced/max-height-percentage-quirks-expected.html [new file with mode: 0644]
LayoutTests/fast/replaced/max-height-percentage-quirks.html [new file with mode: 0644]
LayoutTests/fast/replaced/min-height-percentage-expected.html [new file with mode: 0644]
LayoutTests/fast/replaced/min-height-percentage-quirks-expected.html [new file with mode: 0644]
LayoutTests/fast/replaced/min-height-percentage-quirks.html [new file with mode: 0644]
LayoutTests/fast/replaced/min-height-percentage.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h