CSS table with 100% width can overflow their containing block
authorjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Nov 2011 21:06:47 +0000 (21:06 +0000)
committerjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Nov 2011 21:06:47 +0000 (21:06 +0000)
commitc65ce6a269f6fb4217773f9b86151a3cf2bc2548
treea14ab8d496dadb048713a609a8e8d397c277111e
parentc48e18b25368f6f3e6814c08bdbd9883cbef8b33
CSS table with 100% width can overflow their containing block
https://bugs.webkit.org/show_bug.cgi?id=72180

Reviewed by David Hyatt.

Source/WebCore:

Tests: fast/table/table-in-table-percent-width-collapsing-border-quirks-mode.html
       fast/table/table-in-table-percent-width-collapsing-border.html
       fast/table/table-in-table-percent-width-quirks-mode.html
       fast/table/table-in-table-percent-width.html

After r97555, we would include the borders in a CSS table's logical width even if the 'width'
property was a percent. This does not match what Firefox and IE are doing. Thus don't apply
this behavior to percent 'width'.

* rendering/RenderTable.cpp:
(WebCore::RenderTable::computeLogicalWidth):

LayoutTests:

Several tests to check that we don't overflow our containing block with width: 100%.

* fast/table/table-in-table-percent-width-collapsing-border-expected.png: Added.
* fast/table/table-in-table-percent-width-collapsing-border-expected.txt: Added.
* fast/table/table-in-table-percent-width-collapsing-border-quirks-mode-expected.png: Added.
* fast/table/table-in-table-percent-width-collapsing-border-quirks-mode-expected.txt: Added.
* fast/table/table-in-table-percent-width-collapsing-border-quirks-mode.html: Added.
* fast/table/table-in-table-percent-width-collapsing-border.html: Added.
* fast/table/table-in-table-percent-width-expected.png: Added.
* fast/table/table-in-table-percent-width-expected.txt: Added.
* fast/table/table-in-table-percent-width-quirks-mode-expected.png: Added.
* fast/table/table-in-table-percent-width-quirks-mode-expected.txt: Added.
* fast/table/table-in-table-percent-width-quirks-mode.html: Added.
* fast/table/table-in-table-percent-width.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/table/table-in-table-percent-width-collapsing-border-expected.png [new file with mode: 0644]
LayoutTests/fast/table/table-in-table-percent-width-collapsing-border-expected.txt [new file with mode: 0644]
LayoutTests/fast/table/table-in-table-percent-width-collapsing-border-quirks-mode-expected.png [new file with mode: 0644]
LayoutTests/fast/table/table-in-table-percent-width-collapsing-border-quirks-mode-expected.txt [new file with mode: 0644]
LayoutTests/fast/table/table-in-table-percent-width-collapsing-border-quirks-mode.html [new file with mode: 0755]
LayoutTests/fast/table/table-in-table-percent-width-collapsing-border.html [new file with mode: 0755]
LayoutTests/fast/table/table-in-table-percent-width-expected.png [new file with mode: 0644]
LayoutTests/fast/table/table-in-table-percent-width-expected.txt [new file with mode: 0644]
LayoutTests/fast/table/table-in-table-percent-width-quirks-mode-expected.png [new file with mode: 0644]
LayoutTests/fast/table/table-in-table-percent-width-quirks-mode-expected.txt [new file with mode: 0644]
LayoutTests/fast/table/table-in-table-percent-width-quirks-mode.html [new file with mode: 0755]
LayoutTests/fast/table/table-in-table-percent-width.html [new file with mode: 0755]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderTable.cpp