CSS 2.1 failure: border-collapse-offset-002.htm fails
authorrobert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Jan 2012 15:12:55 +0000 (15:12 +0000)
committerrobert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Jan 2012 15:12:55 +0000 (15:12 +0000)
commit13b7b13f8e7a983530d82b5d51551a1f003e3117
tree8d8bfc329f0893fa9cc6a5556d1a67ea44796be0
parent74d0a6706b71c6ff920cda7741246c1e145fb2bc
CSS 2.1 failure: border-collapse-offset-002.htm fails
https://bugs.webkit.org/show_bug.cgi?id=71705

Reviewed by Julien Chaffraix.

Source/WebCore:

Tests: css2.1/20110323/border-collapse-offset-002-expected.html
       fast/css/caption-width-absolute-position-offset-top.htm
       fast/css/caption-width-absolute-position.htm
       fast/css/caption-width-fixed-position-offset-top.htm
       fast/css/caption-width-fixed-position.htm
       fast/css/caption-width-relative-position-offset-top.htm
       fast/css/caption-width-relative-position.htm

Table captions are implemented as children of the table but have a special
requirement to expand to the full width of the table rather than just the 'available'
width, i.e. the full width minus padding and borders.

To accomodate this create a RenderTableCaption object that reimplements containingBlockLogicalWidthForContent()
to return the full width of the containing block (i.e. the table) rather than the available width.

* CMakeLists.txt: Add RenderTableCaption.[cpp|h]
* GNUmakefile.list.am: Add RenderTableCaption.[cpp|h]
* Target.pri: Add RenderTableCaption.[cpp|h]
* WebCore.gypi: Add RenderTableCaption.[cpp|h]
* WebCore.vcproj/WebCore.vcproj: Add RenderTableCaption.[cpp|h]
* WebCore.xcodeproj/project.pbxproj: Add RenderTableCaption.[cpp|h]
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): Use RenderTableCaption
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject): Add RenderTableCaption.[cpp|h]
(WebCore::RenderObject::addChild): ditto
* rendering/RenderObject.h:
(WebCore::RenderObject::isTableCaption):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::addChild):
* rendering/RenderTable.h:
* rendering/RenderTableCaption.cpp: Added.
(WebCore::RenderTableCaption::RenderTableCaption): Implement RenderTableCaption
(WebCore::RenderTableCaption::~RenderTableCaption):
(WebCore::RenderTableCaption::containingBlockLogicalWidthForContent): Return the containing block's full width rather than it's available width.
* rendering/RenderTableCaption.h: Added.
(WebCore::RenderTableCaption::isTableCaption):
(WebCore::toRenderTableCaption):
* rendering/RenderingAllInOne.cpp:

LayoutTests:

Table captions now use the width of the table rather than the width of the table minus
the borders. This allows captions to center accurately but unfortunately a lot of mozilla
table tests need to be rebaselined as many of them use captions for explaining the purpose
of individual test files!

Add border-collapse-offset-002.htm which now renders correctly.

* css2.1/20110323/border-collapse-offset-002-expected.html: Added.
* css2.1/20110323/border-collapse-offset-002.htm: Added.
* fast/css/caption-width-absolute-position-expected.png: Added.
* fast/css/caption-width-absolute-position-expected.txt: Added.
* fast/css/caption-width-absolute-position-offset-top-expected.png: Added.
* fast/css/caption-width-absolute-position-offset-top-expected.txt: Added.
* fast/css/caption-width-absolute-position-offset-top.htm: Added.
* fast/css/caption-width-absolute-position.htm: Added.
* fast/css/caption-width-fixed-position-expected.png: Added.
* fast/css/caption-width-fixed-position-expected.txt: Added.
* fast/css/caption-width-fixed-position-offset-top-expected.png: Added.
* fast/css/caption-width-fixed-position-offset-top-expected.txt: Added.
* fast/css/caption-width-fixed-position-offset-top.htm: Added.
* fast/css/caption-width-fixed-position.htm: Added.
* fast/css/caption-width-relative-position-expected.png: Added.
* fast/css/caption-width-relative-position-expected.txt: Added.
* fast/css/caption-width-relative-position-offset-top-expected.png: Added.
* fast/css/caption-width-relative-position-offset-top-expected.txt: Added.
* fast/css/caption-width-relative-position-offset-top.htm: Added.
* fast/css/caption-width-relative-position.htm: Added.
* platform/chromium/test_expectations.txt: Suppress affected table tests until rebaselined.
* platform/gtk/test_expectations.txt: ditto
* platform/mac/test_expectations.txt: ditto
* platform/qt/test_expectations.txt: ditto
* platform/win/test_expectations.txt: ditto

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@103875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
41 files changed:
LayoutTests/ChangeLog
LayoutTests/css2.1/20110323/border-collapse-offset-002-expected.html [new file with mode: 0644]
LayoutTests/css2.1/20110323/border-collapse-offset-002.htm [new file with mode: 0644]
LayoutTests/fast/css/caption-width-absolute-position-expected.png [new file with mode: 0644]
LayoutTests/fast/css/caption-width-absolute-position-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/caption-width-absolute-position-offset-top-expected.png [new file with mode: 0644]
LayoutTests/fast/css/caption-width-absolute-position-offset-top-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/caption-width-absolute-position-offset-top.htm [new file with mode: 0644]
LayoutTests/fast/css/caption-width-absolute-position.htm [new file with mode: 0644]
LayoutTests/fast/css/caption-width-fixed-position-expected.png [new file with mode: 0644]
LayoutTests/fast/css/caption-width-fixed-position-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/caption-width-fixed-position-offset-top-expected.png [new file with mode: 0644]
LayoutTests/fast/css/caption-width-fixed-position-offset-top-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/caption-width-fixed-position-offset-top.htm [new file with mode: 0644]
LayoutTests/fast/css/caption-width-fixed-position.htm [new file with mode: 0644]
LayoutTests/fast/css/caption-width-relative-position-expected.png [new file with mode: 0644]
LayoutTests/fast/css/caption-width-relative-position-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/caption-width-relative-position-offset-top-expected.png [new file with mode: 0644]
LayoutTests/fast/css/caption-width-relative-position-offset-top-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/caption-width-relative-position-offset-top.htm [new file with mode: 0644]
LayoutTests/fast/css/caption-width-relative-position.htm [new file with mode: 0644]
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/gtk/test_expectations.txt
LayoutTests/platform/mac/test_expectations.txt
LayoutTests/platform/qt/test_expectations.txt
LayoutTests/platform/win/test_expectations.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RenderTable.cpp
Source/WebCore/rendering/RenderTable.h
Source/WebCore/rendering/RenderTableCaption.cpp [new file with mode: 0644]
Source/WebCore/rendering/RenderTableCaption.h [new file with mode: 0644]
Source/WebCore/rendering/RenderingAllInOne.cpp