Incorrect layout of :before and :after content, with display
authorAbhishek Arya <inferno@chromium.org>
Thu, 25 Aug 2011 16:58:38 +0000 (16:58 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Wed, 31 Aug 2011 18:48:56 +0000 (15:48 -0300)
commit8c18b0803f4c82e27c9d7298189546410f75aaf5
tree68625f58aae37fdd2ecc40ee906094821418ec99
parentb1e2f8114848070530774f516d55c6f4a72eb803
Incorrect layout of :before and :after content, with display
table, table-row and table-cell.
https://bugs.webkit.org/show_bug.cgi?id=66699

Reviewed by David Hyatt.

Source/WebCore:

Tests: fast/table/table-after-child-in-table.html
       fast/table/table-before-child-in-table.html
       fast/table/table-cell-after-child-in-block.html
       fast/table/table-cell-after-child-in-table.html
       fast/table/table-cell-before-child-in-block.html
       fast/table/table-cell-before-child-in-table.html
       fast/table/table-row-after-child-in-block.html
       fast/table/table-row-after-child-in-table.html
       fast/table/table-row-before-child-in-block.html
       fast/table/table-row-before-child-in-table.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
Fix the looping condition to detect :after child correctly.
isAnonymousBlock() does not apply to tables, instead
using isAnonymous().
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::addChild): Don't add the new child
in the generatedContainer with :before, :after content.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::addChild): Don't add the new child
in the generatedContainer with :before, :after content.

LayoutTests:

* fast/table/table-after-child-in-table.html: Added.
* fast/table/table-before-child-in-table.html: Added.
* fast/table/table-cell-after-child-in-block.html: Added.
* fast/table/table-cell-after-child-in-table.html: Added.
* fast/table/table-cell-before-child-in-block.html: Added.
* fast/table/table-cell-before-child-in-table.html: Added.
* fast/table/table-row-after-child-in-block.html: Added.
* fast/table/table-row-after-child-in-table.html: Added.
* fast/table/table-row-before-child-in-block.html: Added.
* fast/table/table-row-before-child-in-table.html: Added.
* platform/mac/fast/table/table-after-child-in-table-expected.png: Added.
* platform/mac/fast/table/table-after-child-in-table-expected.txt: Added.
* platform/mac/fast/table/table-before-child-in-table-expected.png: Added.
* platform/mac/fast/table/table-before-child-in-table-expected.txt: Added.
* platform/mac/fast/table/table-cell-after-child-in-block-expected.png: Added.
* platform/mac/fast/table/table-cell-after-child-in-block-expected.txt: Added.
* platform/mac/fast/table/table-cell-after-child-in-table-expected.png: Added.
* platform/mac/fast/table/table-cell-after-child-in-table-expected.txt: Added.
* platform/mac/fast/table/table-cell-before-child-in-block-expected.png: Added.
* platform/mac/fast/table/table-cell-before-child-in-block-expected.txt: Added.
* platform/mac/fast/table/table-cell-before-child-in-table-expected.png: Added.
* platform/mac/fast/table/table-cell-before-child-in-table-expected.txt: Added.
* platform/mac/fast/table/table-row-after-child-in-block-expected.png: Added.
* platform/mac/fast/table/table-row-after-child-in-block-expected.txt: Added.
* platform/mac/fast/table/table-row-after-child-in-table-expected.png: Added.
* platform/mac/fast/table/table-row-after-child-in-table-expected.txt: Added.
* platform/mac/fast/table/table-row-before-child-in-block-expected.png: Added.
* platform/mac/fast/table/table-row-before-child-in-block-expected.txt: Added.
* platform/mac/fast/table/table-row-before-child-in-table-expected.png: Added.
* platform/mac/fast/table/table-row-before-child-in-table-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@93794 268f45cc-cd09-0410-ab3c-d52691b4dbfc
35 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/table/table-after-child-in-table.html [new file with mode: 0644]
LayoutTests/fast/table/table-before-child-in-table.html [new file with mode: 0644]
LayoutTests/fast/table/table-cell-after-child-in-block.html [new file with mode: 0644]
LayoutTests/fast/table/table-cell-after-child-in-table.html [new file with mode: 0644]
LayoutTests/fast/table/table-cell-before-child-in-block.html [new file with mode: 0644]
LayoutTests/fast/table/table-cell-before-child-in-table.html [new file with mode: 0644]
LayoutTests/fast/table/table-row-after-child-in-block.html [new file with mode: 0644]
LayoutTests/fast/table/table-row-after-child-in-table.html [new file with mode: 0644]
LayoutTests/fast/table/table-row-before-child-in-block.html [new file with mode: 0644]
LayoutTests/fast/table/table-row-before-child-in-table.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-after-child-in-table-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-after-child-in-table-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-before-child-in-table-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-before-child-in-table-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-cell-after-child-in-block-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-cell-after-child-in-block-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-cell-after-child-in-table-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-cell-after-child-in-table-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-cell-before-child-in-block-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-cell-before-child-in-block-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-cell-before-child-in-table-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-cell-before-child-in-table-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-row-after-child-in-block-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-row-after-child-in-block-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-row-after-child-in-table-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-row-after-child-in-table-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-row-before-child-in-block-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-row-before-child-in-block-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-row-before-child-in-table-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/table/table-row-before-child-in-table-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderTableRow.cpp
Source/WebCore/rendering/RenderTableSection.cpp