Add helpers to create anonymous table parts.
authorinferno@chromium.org <inferno@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Apr 2012 22:41:56 +0000 (22:41 +0000)
committerinferno@chromium.org <inferno@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Apr 2012 22:41:56 +0000 (22:41 +0000)
commit8f1b459e1612db77339d9dc18e75de681cdac871
treeb84a84e7994076ad788ec7858b9bb7387c2454e9
parentb6c93afa279ead6e4f0dc6b44821bad0c087b23f
Add helpers to create anonymous table parts.
https://bugs.webkit.org/show_bug.cgi?id=83116

Reviewed by Julien Chaffraix.

Source/WebCore:

The patch introduces helpers to create anonymous table parts by
introducing a new static function createAnonymousWithParentRenderer.
The function builds a new anonymous wrapper of the same type as the class,
inheriting style properties from parent and sets a display based on
argument/default values. Also we streamline the RenderBlock functions
to match this naming convention.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::createAnonymousBlockWithSameTypeAs):
(WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
(WebCore):
(WebCore::RenderBlock::createAnonymousColumnsWithParentRendererAndDisplay):
(WebCore::RenderBlock::createAnonymousColumnSpanWithParentRendererAndDisplay):
* rendering/RenderBlock.h:
(RenderBlock):
(WebCore::RenderBlock::createAnonymousBlock):
(WebCore::RenderBlock::createAnonymousColumnsBlock):
(WebCore::RenderBlock::createAnonymousColumnSpanBlock):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::addChild):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::addChild):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::addChild):
(WebCore::RenderTable::createAnonymousWithParentRendererAndDisplay):
(WebCore):
* rendering/RenderTable.h:
(RenderTable):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::createAnonymousWithParentRendererAndDisplay):
(WebCore):
* rendering/RenderTableCell.h:
(RenderTableCell):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::addChild):
(WebCore::RenderTableRow::createAnonymousWithParentRendererAndDisplay):
(WebCore):
* rendering/RenderTableRow.h:
(RenderTableRow):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::addChild):
(WebCore::RenderTableSection::createAnonymousWithParentRendererAndDisplay):
(WebCore):
* rendering/RenderTableSection.h:
(RenderTableSection):

LayoutTests:

Rebaselining tests because we now correctly inherit the bidi override.

* platform/chromium-mac/fast/css/bidi-override-in-anonymous-block-expected.txt:
* platform/chromium-win/fast/css/bidi-override-in-anonymous-block-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/chromium-mac/fast/css/bidi-override-in-anonymous-block-expected.txt
LayoutTests/platform/chromium-win/fast/css/bidi-override-in-anonymous-block-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderButton.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RenderTable.cpp
Source/WebCore/rendering/RenderTable.h
Source/WebCore/rendering/RenderTableCell.cpp
Source/WebCore/rendering/RenderTableCell.h
Source/WebCore/rendering/RenderTableRow.cpp
Source/WebCore/rendering/RenderTableRow.h
Source/WebCore/rendering/RenderTableSection.cpp
Source/WebCore/rendering/RenderTableSection.h