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)
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

index e5a4f0a..32682d4 100644 (file)
@@ -1,3 +1,15 @@
+2012-04-04  Abhishek Arya  <inferno@chromium.org>
+
+        Add helpers to create anonymous table parts.
+        https://bugs.webkit.org/show_bug.cgi?id=83116
+
+        Reviewed by Julien Chaffraix.
+
+        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:
+
 2012-04-04  Dimitri Glazkov  <dglazkov@chromium.org>
 
         [Chromium] Adjust expectations for fast/text/international/spaces-combined-in-vertical-text.html
index b1f1771..fb4df54 100644 (file)
@@ -225,7 +225,7 @@ layer at (0,0) size 785x1217
             RenderTableRow {DIV} at (0,0) size 24x18
               RenderTableCell (anonymous) at (0,0) size 24x18 [r=0 c=0 rs=1 cs=1]
                 RenderText {#text} at (2,0) size 22x18
-                  text run at (2,0) width 22: "abc"
+                  text run at (2,0) width 22 RTL override: "abc"
             RenderTableRow (anonymous) at (0,18) size 24x18
               RenderTableCell {DIV} at (0,18) size 24x18 [r=1 c=0 rs=1 cs=1]
                 RenderText {#text} at (4,0) size 20x18
@@ -237,4 +237,4 @@ layer at (0,0) size 785x1217
             RenderTableRow (anonymous) at (0,0) size 24x18
               RenderTableCell (anonymous) at (0,0) size 24x18 [r=0 c=0 rs=1 cs=1]
                 RenderText {#text} at (0,0) size 24x18
-                  text run at (0,0) width 24: "opq"
+                  text run at (0,0) width 24 RTL override: "opq"
index 9a82e4c..4a9ef00 100644 (file)
@@ -225,7 +225,7 @@ layer at (0,0) size 785x1301
             RenderTableRow {DIV} at (0,0) size 24x20
               RenderTableCell (anonymous) at (0,0) size 24x20 [r=0 c=0 rs=1 cs=1]
                 RenderText {#text} at (2,0) size 22x19
-                  text run at (2,0) width 22: "abc"
+                  text run at (2,0) width 22 RTL override: "abc"
             RenderTableRow (anonymous) at (0,20) size 24x20
               RenderTableCell {DIV} at (0,20) size 24x20 [r=1 c=0 rs=1 cs=1]
                 RenderText {#text} at (5,0) size 19x19
@@ -237,4 +237,4 @@ layer at (0,0) size 785x1301
             RenderTableRow (anonymous) at (0,0) size 24x20
               RenderTableCell (anonymous) at (0,0) size 24x20 [r=0 c=0 rs=1 cs=1]
                 RenderText {#text} at (0,0) size 24x19
-                  text run at (0,0) width 24: "opq"
+                  text run at (0,0) width 24 RTL override: "opq"
index 6be1c7f..6aa29fb 100644 (file)
@@ -1,3 +1,56 @@
+2012-04-04  Abhishek Arya  <inferno@chromium.org>
+
+        Add helpers to create anonymous table parts.
+        https://bugs.webkit.org/show_bug.cgi?id=83116
+
+        Reviewed by Julien Chaffraix.
+
+        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):
+
 2012-04-04  Erik Arvidsson  <arv@chromium.org>
 
         [V8] Add a per context data store and use that for caching boiler plates as well as constructor functions
index 803190d..a1eaa95 100755 (executable)
@@ -781,7 +781,7 @@ RenderObject* RenderBlock::splitTablePartsAroundChild(RenderObject* beforeChild)
 
             // Create an anonymous table container next to our table container.
             RenderBlock* parentBlock = toRenderBlock(table->parent());
-            RenderTable* postTable = parentBlock->createAnonymousTable();
+            RenderTable* postTable = RenderTable::createAnonymousWithParentRenderer(parentBlock);
             parentBlock->children()->insertChildNode(parentBlock, postTable, table->nextSibling());
             
             // Move all the children from beforeChild to the newly created anonymous table container.
@@ -6675,52 +6675,13 @@ void RenderBlock::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& a
         inlineElementContinuation()->addFocusRingRects(rects, flooredLayoutPoint(additionalOffset + inlineElementContinuation()->containingBlock()->location() - location()));
 }
 
-RenderBlock* RenderBlock::createAnonymousBlock(bool isFlexibleBox) const
-{
-    RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(style());
-
-    RenderBlock* newBox = 0;
-    if (isFlexibleBox) {
-        newStyle->setDisplay(BOX);
-        newBox = new (renderArena()) RenderDeprecatedFlexibleBox(document() /* anonymous box */);
-    } else {
-        newStyle->setDisplay(BLOCK);
-        newBox = new (renderArena()) RenderBlock(document() /* anonymous box */);
-    }
-
-    newBox->setStyle(newStyle.release());
-    return newBox;
-}
-
 RenderBlock* RenderBlock::createAnonymousBlockWithSameTypeAs(RenderBlock* otherAnonymousBlock) const
 {
     if (otherAnonymousBlock->isAnonymousColumnsBlock())
         return createAnonymousColumnsBlock();
     if (otherAnonymousBlock->isAnonymousColumnSpanBlock())
         return createAnonymousColumnSpanBlock();
-    return createAnonymousBlock(otherAnonymousBlock->style()->display() == BOX);
-}
-
-RenderBlock* RenderBlock::createAnonymousColumnsBlock() const
-{
-    RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(style());
-    newStyle->inheritColumnPropertiesFrom(style());
-    newStyle->setDisplay(BLOCK);
-
-    RenderBlock* newBox = new (renderArena()) RenderBlock(document() /* anonymous box */);
-    newBox->setStyle(newStyle.release());
-    return newBox;
-}
-
-RenderBlock* RenderBlock::createAnonymousColumnSpanBlock() const
-{
-    RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(style());
-    newStyle->setColumnSpan(ColumnSpanAll);
-    newStyle->setDisplay(BLOCK);
-
-    RenderBlock* newBox = new (renderArena()) RenderBlock(document() /* anonymous box */);
-    newBox->setStyle(newStyle.release());
-    return newBox;
+    return createAnonymousBlock(otherAnonymousBlock->style()->display());
 }
 
 bool RenderBlock::hasNextPage(LayoutUnit logicalOffset, PageBoundaryRule pageBoundaryRule) const
@@ -7453,6 +7414,47 @@ TextRun RenderBlock::constructTextRun(RenderObject* context, const Font& font, c
     return constructTextRun(context, font, string.characters(), string.length(), style, expansion, flags);
 }
 
+RenderBlock* RenderBlock::createAnonymousWithParentRendererAndDisplay(const RenderObject* parent, EDisplay display)
+{
+    RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->style());
+
+    // FIXME: Do we need to cover the new flex box here ?
+    // FIXME: Do we need to convert all our inline displays to block-type in the anonymous logic ?
+    RenderBlock* newBox = 0;
+    if (display == BOX || display == INLINE_BOX) {
+        newStyle->setDisplay(BOX);
+        newBox = new (parent->renderArena()) RenderDeprecatedFlexibleBox(parent->document() /* anonymous box */);
+    } else {
+        newStyle->setDisplay(BLOCK);
+        newBox = new (parent->renderArena()) RenderBlock(parent->document() /* anonymous box */);
+    }
+
+    newBox->setStyle(newStyle.release());
+    return newBox;
+}
+
+RenderBlock* RenderBlock::createAnonymousColumnsWithParentRenderer(const RenderObject* parent)
+{
+    RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->style());
+    newStyle->inheritColumnPropertiesFrom(parent->style());
+    newStyle->setDisplay(BLOCK);
+
+    RenderBlock* newBox = new (parent->renderArena()) RenderBlock(parent->document() /* anonymous box */);
+    newBox->setStyle(newStyle.release());
+    return newBox;
+}
+
+RenderBlock* RenderBlock::createAnonymousColumnSpanWithParentRenderer(const RenderObject* parent)
+{
+    RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->style());
+    newStyle->setColumnSpan(ColumnSpanAll);
+    newStyle->setDisplay(BLOCK);
+
+    RenderBlock* newBox = new (parent->renderArena()) RenderBlock(parent->document() /* anonymous box */);
+    newBox->setStyle(newStyle.release());
+    return newBox;
+}
+
 #ifndef NDEBUG
 
 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* markedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const RenderObject* obj) const
index 977a99b..8fc3511 100644 (file)
@@ -233,11 +233,13 @@ public:
     using RenderBoxModelObject::continuation;
     using RenderBoxModelObject::setContinuation;
 
-    // This function is a convenience helper for creating an anonymous block that inherits its
-    // style from this RenderBlock.
-    RenderBlock* createAnonymousBlock(bool isFlexibleBox = false) const;
-    RenderBlock* createAnonymousColumnsBlock() const;
-    RenderBlock* createAnonymousColumnSpanBlock() const;
+    static RenderBlock* createAnonymousWithParentRendererAndDisplay(const RenderObject*, EDisplay = BLOCK);
+    static RenderBlock* createAnonymousColumnsWithParentRenderer(const RenderObject*);
+    static RenderBlock* createAnonymousColumnSpanWithParentRenderer(const RenderObject*);
+    RenderBlock* createAnonymousBlock(EDisplay display = BLOCK) const { return createAnonymousWithParentRendererAndDisplay(this, display); }
+    RenderBlock* createAnonymousColumnsBlock() const { return createAnonymousColumnsWithParentRenderer(this); }
+    RenderBlock* createAnonymousColumnSpanBlock() const { return createAnonymousColumnSpanWithParentRenderer(this); }
+
     RenderBlock* createAnonymousBlockWithSameTypeAs(RenderBlock* otherAnonymousBlock) const;
     
     static void appendRunsForObject(BidiRunList<BidiRun>&, int start, int end, RenderObject*, InlineBidiResolver&);
index 380c5da..5477f9e 100644 (file)
@@ -49,8 +49,7 @@ void RenderButton::addChild(RenderObject* newChild, RenderObject* beforeChild)
     if (!m_inner) {
         // Create an anonymous block.
         ASSERT(!firstChild());
-        bool isFlexibleBox = style()->display() == BOX || style()->display() == INLINE_BOX;
-        m_inner = createAnonymousBlock(isFlexibleBox);
+        m_inner = createAnonymousBlock(style()->display());
         setupInnerStyle(m_inner->style());
         RenderDeprecatedFlexibleBox::addChild(m_inner);
     }
index d6484c8..4b49625 100755 (executable)
@@ -269,16 +269,6 @@ static bool isBeforeAfterContentGeneratedByAncestor(RenderObject* renderer, Rend
     return false;
 }
 
-RenderTable* RenderObject::createAnonymousTable() const
-{
-    RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(style());
-    newStyle->setDisplay(TABLE);
-
-    RenderTable* table = new (renderArena()) RenderTable(document() /* is anonymous */);
-    table->setStyle(newStyle.release());
-    return table;
-}
-
 void RenderObject::addChild(RenderObject* newChild, RenderObject* beforeChild)
 {
     RenderObjectChildList* children = virtualChildren();
@@ -323,7 +313,7 @@ void RenderObject::addChild(RenderObject* newChild, RenderObject* beforeChild)
         if (afterChild && afterChild->isAnonymous() && afterChild->isTable() && !afterChild->isBeforeContent())
             table = toRenderTable(afterChild);
         else {
-            table = createAnonymousTable();
+            table = RenderTable::createAnonymousWithParentRenderer(this);
             addChild(table, beforeChild);
         }
         table->addChild(newChild);
index 56b6d1c..ac70d13 100644 (file)
@@ -226,8 +226,6 @@ public:
     // normal flow object.
     void handleDynamicFloatPositionChange();
     
-    RenderTable* createAnonymousTable() const;
-    
     // RenderObject tree manipulation
     //////////////////////////////////////////
     virtual bool canHaveChildren() const { return virtualChildren(); }
index 75f35e0..bc8af61 100644 (file)
@@ -192,11 +192,8 @@ void RenderTable::addChild(RenderObject* child, RenderObject* beforeChild)
 
     if (beforeChild && !beforeChild->isTableSection() && beforeChild->style()->display() != TABLE_CAPTION && beforeChild->style()->display() != TABLE_COLUMN_GROUP)
         beforeChild = 0;
-    RenderTableSection* section = new (renderArena()) RenderTableSection(document() /* anonymous */);
-    RefPtr<RenderStyle> newStyle = RenderStyle::create();
-    newStyle->inheritFrom(style());
-    newStyle->setDisplay(TABLE_ROW_GROUP);
-    section->setStyle(newStyle.release());
+
+    RenderTableSection* section = RenderTableSection::createAnonymousWithParentRenderer(this);
     addChild(section, beforeChild);
     section->addChild(child);
 }
@@ -1280,4 +1277,14 @@ bool RenderTable::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
     return false;
 }
 
+RenderTable* RenderTable::createAnonymousWithParentRenderer(const RenderObject* parent)
+{
+    RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->style());
+    newStyle->setDisplay(TABLE);
+
+    RenderTable* newTable = new (parent->renderArena()) RenderTable(parent->document() /* is anonymous */);
+    newTable->setStyle(newStyle.release());
+    return newTable;
+}
+
 }
index bc309f6..639459c 100644 (file)
@@ -211,6 +211,8 @@ public:
             recalcSections();
     }
 
+    static RenderTable* createAnonymousWithParentRenderer(const RenderObject*);
+
 protected:
     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
 
index 139615a..9123255 100644 (file)
@@ -1117,4 +1117,14 @@ void RenderTableCell::scrollbarsChanged(bool horizontalScrollbarChanged, bool ve
         setIntrinsicPaddingAfter(intrinsicPaddingAfter() - scrollbarHeight);
 }
 
+RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const RenderObject* parent)
+{
+    RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->style());
+    newStyle->setDisplay(TABLE_CELL);
+
+    RenderTableCell* newCell = new (parent->renderArena()) RenderTableCell(parent->document() /* is anonymous */);
+    newCell->setStyle(newStyle.release());
+    return newCell;
+}
+
 } // namespace WebCore
index e18372a..d3a9ee9 100644 (file)
@@ -138,6 +138,8 @@ public:
     bool cellWidthChanged() const { return m_cellWidthChanged; }
     void setCellWidthChanged(bool b = true) { m_cellWidthChanged = b; }
 
+    static RenderTableCell* createAnonymousWithParentRenderer(const RenderObject*);
+
 protected:
     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
 
index 1ad8378..0931c0b 100644 (file)
@@ -113,11 +113,7 @@ void RenderTableRow::addChild(RenderObject* child, RenderObject* beforeChild)
             return;
         }
 
-        RenderTableCell* cell = new (renderArena()) RenderTableCell(document() /* anonymous object */);
-        RefPtr<RenderStyle> newStyle = RenderStyle::create();
-        newStyle->inheritFrom(style());
-        newStyle->setDisplay(TABLE_CELL);
-        cell->setStyle(newStyle.release());
+        RenderTableCell* cell = RenderTableCell::createAnonymousWithParentRenderer(this);
         addChild(cell, beforeChild);
         cell->addChild(child);
         return;
@@ -249,4 +245,14 @@ void RenderTableRow::imageChanged(WrappedImagePtr, const IntRect*)
     repaint();
 }
 
+RenderTableRow* RenderTableRow::createAnonymousWithParentRenderer(const RenderObject* parent)
+{
+    RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->style());
+    newStyle->setDisplay(TABLE_ROW);
+
+    RenderTableRow* newRow = new (parent->renderArena()) RenderTableRow(parent->document() /* is anonymous */);
+    newRow->setStyle(newStyle.release());
+    return newRow;
+}
+
 } // namespace WebCore
index f660e9d..9b91e1b 100644 (file)
@@ -42,6 +42,8 @@ public:
     void updateBeforeAndAfterContent();
     void paintOutlineForRowIfNeeded(PaintInfo&, const LayoutPoint&);
 
+    static RenderTableRow* createAnonymousWithParentRenderer(const RenderObject*);
+
 private:
     virtual RenderObjectChildList* virtualChildren() { return children(); }
     virtual const RenderObjectChildList* virtualChildren() const { return children(); }
index 1cb1ecd..32a5ead 100644 (file)
@@ -161,11 +161,7 @@ void RenderTableSection::addChild(RenderObject* child, RenderObject* beforeChild
             return;
         }
 
-        RenderObject* row = new (renderArena()) RenderTableRow(document() /* anonymous table row */);
-        RefPtr<RenderStyle> newStyle = RenderStyle::create();
-        newStyle->inheritFrom(style());
-        newStyle->setDisplay(TABLE_ROW);
-        row->setStyle(newStyle.release());
+        RenderObject* row = RenderTableRow::createAnonymousWithParentRenderer(this);
         addChild(row, beforeChild);
         row->addChild(child);
         return;
@@ -1417,4 +1413,14 @@ CollapsedBorderValue& RenderTableSection::cachedCollapsedBorder(const RenderTabl
     return it->second;
 }
 
+RenderTableSection* RenderTableSection::createAnonymousWithParentRenderer(const RenderObject* parent)
+{
+    RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->style());
+    newStyle->setDisplay(TABLE_ROW_GROUP);
+
+    RenderTableSection* newSection = new (parent->renderArena()) RenderTableSection(parent->document() /* is anonymous */);
+    newSection->setStyle(newStyle.release());
+    return newSection;
+}
+
 } // namespace WebCore
index 9c6869d..1a3fe21 100644 (file)
@@ -162,6 +162,8 @@ public:
     // FIXME: We may want to introduce a structure holding the in-flux layout information.
     int distributeExtraLogicalHeightToRows(int extraLogicalHeight);
 
+    static RenderTableSection* createAnonymousWithParentRenderer(const RenderObject*);
+
 protected:
     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);