Reviewed by David Hyatt.
authorrobert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Sep 2011 19:31:31 +0000 (19:31 +0000)
committerrobert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Sep 2011 19:31:31 +0000 (19:31 +0000)
commitec941c9f52dd06a5a399724e2c233b31faade3e6
tree0fa5a937d4b2b91c9f98280f087bbbf4bf22f9e6
parentc8bf6391ccc0351d605cad941ea19b4ce22f96ef
Reviewed by David Hyatt.

Replaced elements squeezed when width is specified as percentage inside a table with Auto layout
https://bugs.webkit.org/show_bug.cgi?id=29447

Source/WebCore:

If inserting a 'replaced' element (e.g. image, plugin) in a table cell that is not descendant from
a block with fixed layout then do not squeeze the element, let it use its intrinsic width and height.

Test: fast/replaced/table-percent-width.html

* rendering/RenderBox.cpp:
(WebCore::avoidSqueezingWidth):
(WebCore::avoidSqueezingHeight):
(WebCore::RenderBox::containingBlockReplacedLogicalWidthForContent):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
* rendering/RenderBox.h:

LayoutTests:

* fast/replaced/table-percent-width.html: Added.
* fast/replaced/table-percent-width-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/replaced/table-percent-width-expected.txt [new file with mode: 0644]
LayoutTests/fast/replaced/table-percent-width.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h