CTTE: Pass RenderArena around by reference.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Sep 2013 11:05:01 +0000 (11:05 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Sep 2013 11:05:01 +0000 (11:05 +0000)
<https://webkit.org/b/121470>

Reviewed by Antti Koivisto.

Pass the RenderArena around by reference in all render tree code.
This code will never be running without an arena.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155944 268f45cc-cd09-0410-ab3c-d52691b4dbfc

35 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/rendering/BidiRun.cpp
Source/WebCore/rendering/BidiRun.h
Source/WebCore/rendering/InlineBox.cpp
Source/WebCore/rendering/InlineBox.h
Source/WebCore/rendering/InlineFlowBox.cpp
Source/WebCore/rendering/InlineFlowBox.h
Source/WebCore/rendering/InlineTextBox.cpp
Source/WebCore/rendering/InlineTextBox.h
Source/WebCore/rendering/LayoutState.cpp
Source/WebCore/rendering/LayoutState.h
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlockLineLayout.cpp
Source/WebCore/rendering/RenderButton.cpp
Source/WebCore/rendering/RenderFullScreen.cpp
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayer.h
Source/WebCore/rendering/RenderLineBoxList.cpp
Source/WebCore/rendering/RenderLineBoxList.h
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RenderRubyRun.cpp
Source/WebCore/rendering/RenderTable.cpp
Source/WebCore/rendering/RenderTableSection.cpp
Source/WebCore/rendering/RenderText.cpp
Source/WebCore/rendering/RootInlineBox.cpp
Source/WebCore/rendering/RootInlineBox.h
Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp
Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp
Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp
Source/WebCore/rendering/mathml/RenderMathMLRow.cpp
Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp

index 5992dc5..ee2927e 100644 (file)
@@ -1,3 +1,13 @@
+2013-09-17  Andreas Kling  <akling@apple.com>
+
+        CTTE: Pass RenderArena around by reference.
+        <https://webkit.org/b/121470>
+
+        Reviewed by Antti Koivisto.
+
+        Pass the RenderArena around by reference in all render tree code.
+        This code will never be running without an arena.
+
 2013-09-17  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] GObject DOM symbols file is not generated for video related classes
index bd5b601..d7cb542 100644 (file)
@@ -1234,7 +1234,6 @@ __ZN7WebCore9HTMLNames9selectTagE
 __ZN7WebCore9HTMLNames9styleAttrE
 __ZN7WebCore9HTMLNames9valueAttrE
 __ZN7WebCore9InlineBox10attachLineEv
-__ZN7WebCore9InlineBox10deleteLineEPNS_11RenderArenaE
 __ZN7WebCore9InlineBox11extractLineEv
 __ZN7WebCore9InlineBox11nodeAtPointERKNS_14HitTestRequestERNS_13HitTestResultERKNS_15HitTestLocationERKNS_11LayoutPointENS_10LayoutUnitESC_
 __ZN7WebCore9InlineBox14adjustPositionEff
@@ -1242,7 +1241,6 @@ __ZN7WebCore9InlineBox14dirtyLineBoxesEv
 __ZN7WebCore9InlineBox14selectionStateEv
 __ZN7WebCore9InlineBox16placeEllipsisBoxEbfffRfRb
 __ZN7WebCore9InlineBox5paintERNS_9PaintInfoERKNS_11LayoutPointENS_10LayoutUnitES6_
-__ZN7WebCore9InlineBox7destroyEPNS_11RenderArenaE
 __ZN7WebCore9InlineBoxdlEPvm
 __ZN7WebCore9JSElement6s_infoE
 __ZN7WebCore9PageCache11setCapacityEi
index 322e868..e98aac1 100644 (file)
@@ -43,22 +43,22 @@ void BidiRun::destroy()
 #ifndef NDEBUG
     inBidiRunDestroy = true;
 #endif
-    RenderArena* renderArena = m_object->renderArena();
+    RenderArena& renderArena = m_object->renderArena();
     delete this;
 #ifndef NDEBUG
     inBidiRunDestroy = false;
 #endif
 
     // Recover the size left there for us by operator delete and free the memory.
-    renderArena->free(*reinterpret_cast<size_t*>(this), this);
+    renderArena.free(*reinterpret_cast<size_t*>(this), this);
 }
 
-void* BidiRun::operator new(size_t sz, RenderArena* renderArena)
+void* BidiRun::operator new(size_t sz, RenderArena& renderArena)
 {
 #ifndef NDEBUG
     bidiRunCounter.increment();
 #endif
-    return renderArena->allocate(sz);
+    return renderArena.allocate(sz);
 }
 
 void BidiRun::operator delete(void* ptr, size_t sz)
index e1c7252..9bf8ed3 100644 (file)
@@ -50,7 +50,7 @@ struct BidiRun : BidiCharacterRun {
     void destroy();
 
     // Overloaded new operator.
-    void* operator new(size_t, RenderArena*);
+    void* operator new(size_t, RenderArena&);
 
     // Overridden to prevent the normal delete from being called.
     void operator delete(void*, size_t);
index 2ff2c1a..c8f5518 100644 (file)
@@ -69,7 +69,7 @@ void InlineBox::remove()
         parent()->removeChild(this);
 }
 
-void InlineBox::destroy(RenderArena* renderArena)
+void InlineBox::destroy(RenderArena& renderArena)
 {
 #if !ASSERT_DISABLED
     inInlineBoxDetach = true;
@@ -80,12 +80,12 @@ void InlineBox::destroy(RenderArena* renderArena)
 #endif
 
     // Recover the size left there for us by operator delete and free the memory.
-    renderArena->free(*(size_t *)this, this);
+    renderArena.free(*(size_t *)this, this);
 }
 
-void* InlineBox::operator new(size_t sz, RenderArena* renderArena)
+void* InlineBox::operator new(size_t sz, RenderArena& renderArena)
 {
-    return renderArena->allocate(sz);
+    return renderArena.allocate(sz);
 }
 
 void InlineBox::operator delete(void* ptr, size_t sz)
@@ -181,7 +181,7 @@ void InlineBox::dirtyLineBoxes()
         curr->markDirty();
 }
 
-void InlineBox::deleteLine(RenderArena* arena)
+void InlineBox::deleteLine(RenderArena& arena)
 {
     if (!m_bitfields.extracted() && m_renderer.isBox())
         toRenderBox(renderer()).setInlineBoxWrapper(0);
index 71eb985..8e6cad9 100644 (file)
@@ -63,9 +63,9 @@ public:
 
     virtual ~InlineBox();
 
-    virtual void destroy(RenderArena*);
+    virtual void destroy(RenderArena&);
 
-    virtual void deleteLine(RenderArena*);
+    virtual void deleteLine(RenderArena&);
     virtual void extractLine();
     virtual void attachLine();
 
@@ -98,7 +98,7 @@ public:
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom);
 
     // Overloaded new operator.
-    void* operator new(size_t, RenderArena*);
+    void* operator new(size_t, RenderArena&);
 
     // Overridden to prevent the normal delete from being called.
     void operator delete(void*, size_t);
index e4d464c..1eedcc9 100644 (file)
@@ -201,7 +201,7 @@ void InlineFlowBox::removeChild(InlineBox* child)
     checkConsistency();
 }
 
-void InlineFlowBox::deleteLine(RenderArena* arena)
+void InlineFlowBox::deleteLine(RenderArena& arena)
 {
     InlineBox* child = firstChild();
     InlineBox* next = 0;
index 2da00bd..041aadc 100644 (file)
@@ -96,7 +96,7 @@ public:
     }
 
     void addToLine(InlineBox* child);
-    virtual void deleteLine(RenderArena*) OVERRIDE FINAL;
+    virtual void deleteLine(RenderArena&) OVERRIDE FINAL;
     virtual void extractLine() OVERRIDE FINAL;
     virtual void attachLine() OVERRIDE FINAL;
     virtual void adjustPosition(float dx, float dy);
index d9ce752..35d0232 100644 (file)
@@ -65,7 +65,7 @@ COMPILE_ASSERT(sizeof(InlineTextBox) == sizeof(SameSizeAsInlineTextBox), InlineT
 typedef WTF::HashMap<const InlineTextBox*, LayoutRect> InlineTextBoxOverflowMap;
 static InlineTextBoxOverflowMap* gTextBoxesWithOverflow;
 
-void InlineTextBox::destroy(RenderArena* arena)
+void InlineTextBox::destroy(RenderArena& arena)
 {
     if (!knownToHaveNoOverflow() && gTextBoxesWithOverflow)
         gTextBoxesWithOverflow->remove(this);
@@ -232,7 +232,7 @@ LayoutRect InlineTextBox::localSelectionRect(int startPos, int endPos)
     return LayoutRect(topPoint, LayoutSize(width, height));
 }
 
-void InlineTextBox::deleteLine(RenderArena* arena)
+void InlineTextBox::deleteLine(RenderArena& arena)
 {
     textRenderer().removeTextBox(this);
     destroy(arena);
index 21db469..aa9f792 100644 (file)
@@ -57,7 +57,7 @@ public:
     {
     }
 
-    virtual void destroy(RenderArena*) OVERRIDE FINAL;
+    virtual void destroy(RenderArena&) OVERRIDE FINAL;
 
     InlineTextBox* prevTextBox() const { return m_prevTextBox; }
     InlineTextBox* nextTextBox() const { return m_nextTextBox; }
@@ -125,7 +125,7 @@ public:
     RenderText& textRenderer() const;
 
 private:
-    virtual void deleteLine(RenderArena*) OVERRIDE FINAL;
+    virtual void deleteLine(RenderArena&) OVERRIDE FINAL;
     virtual void extractLine() OVERRIDE FINAL;
     virtual void attachLine() OVERRIDE FINAL;
 
index d060ecf..56e4334 100644 (file)
@@ -172,7 +172,7 @@ LayoutState::LayoutState(RenderObject* root)
 static bool inLayoutStateDestroy;
 #endif
 
-void LayoutState::destroy(RenderArena* renderArena)
+void LayoutState::destroy(RenderArena& renderArena)
 {
 #ifndef NDEBUG
     inLayoutStateDestroy = true;
@@ -181,12 +181,12 @@ void LayoutState::destroy(RenderArena* renderArena)
 #ifndef NDEBUG
     inLayoutStateDestroy = false;
 #endif
-    renderArena->free(*(size_t*)this, this);
+    renderArena.free(*(size_t*)this, this);
 }
 
-void* LayoutState::operator new(size_t sz, RenderArena* renderArena)
+void* LayoutState::operator new(size_t sz, RenderArena& renderArena)
 {
-    return renderArena->allocate(sz);
+    return renderArena.allocate(sz);
 }
 
 void LayoutState::operator delete(void* ptr, size_t sz)
index d476490..e47230b 100644 (file)
@@ -69,10 +69,10 @@ public:
     LayoutState(LayoutState*, RenderBox*, const LayoutSize& offset, LayoutUnit pageHeight, bool pageHeightChanged, ColumnInfo*);
     explicit LayoutState(RenderObject*);
 
-    void destroy(RenderArena*);
+    void destroy(RenderArena&);
 
     // Overloaded new operator.
-    void* operator new(size_t, RenderArena*);
+    void* operator new(size_t, RenderArena&);
 
     // Overridden to prevent the normal delete from being called.
     void operator delete(void*, size_t);
index 18789f3..c48edf8 100644 (file)
@@ -530,7 +530,7 @@ RenderBlock* RenderBlock::clone() const
         cloneBlock = createAnonymousBlock();
         cloneBlock->setChildrenInline(childrenInline());
     } else {
-        RenderObject* cloneRenderer = element()->createRenderer(*renderArena(), *style());
+        RenderObject* cloneRenderer = element()->createRenderer(renderArena(), *style());
         cloneBlock = toRenderBlock(cloneRenderer);
         cloneBlock->setStyle(style());
 
@@ -1760,9 +1760,9 @@ RenderBoxModelObject* RenderBlock::createReplacementRunIn(RenderBoxModelObject*
 
     RenderBoxModelObject* newRunIn = 0;
     if (!runIn->isRenderBlockFlow())
-        newRunIn = new (*renderArena()) RenderBlockFlow(runIn->element());
+        newRunIn = new (renderArena()) RenderBlockFlow(runIn->element());
     else
-        newRunIn = new (*renderArena()) RenderInline(runIn->element());
+        newRunIn = new (renderArena()) RenderInline(runIn->element());
 
     runIn->element()->setRenderer(newRunIn);
     newRunIn->setStyle(runIn->style());
@@ -5900,7 +5900,7 @@ void RenderBlock::createFirstLetterRenderer(RenderObject* firstLetterBlock, Rend
         // Construct a text fragment for the text after the first letter.
         // This text fragment might be empty.
         RenderTextFragment* remainingText = 
-            new (*renderArena()) RenderTextFragment(textObj->node() ? textObj->node() : &textObj->document(), oldText.get(), length, oldText->length() - length);
+            new (renderArena()) RenderTextFragment(textObj->node() ? textObj->node() : &textObj->document(), oldText.get(), length, oldText->length() - length);
         remainingText->setStyle(textObj->style());
         if (remainingText->node())
             remainingText->node()->setRenderer(remainingText);
@@ -5912,7 +5912,7 @@ void RenderBlock::createFirstLetterRenderer(RenderObject* firstLetterBlock, Rend
         
         // construct text fragment for the first letter
         RenderTextFragment* letter = 
-            new (*renderArena()) RenderTextFragment(remainingText->node() ? remainingText->node() : &remainingText->document(), oldText.get(), 0, length);
+            new (renderArena()) RenderTextFragment(remainingText->node() ? remainingText->node() : &remainingText->document(), oldText.get(), 0, length);
         letter->setStyle(pseudoStyle);
         firstLetter->addChild(letter);
 
index 6a9dd54..66125ac 100644 (file)
@@ -1195,7 +1195,7 @@ RootInlineBox* RenderBlock::createLineBoxesFromBidiRuns(BidiRunList<BidiRun>& bi
     return lineBox;
 }
 
-static void deleteLineRange(LineLayoutState& layoutState, RenderArena* arena, RootInlineBox* startLine, RootInlineBox* stopLine = 0)
+static void deleteLineRange(LineLayoutState& layoutState, RenderArena& arena, RootInlineBox* startLine, RootInlineBox* stopLine = 0)
 {
     RootInlineBox* boxToDelete = startLine;
     while (boxToDelete && boxToDelete != stopLine) {
index 85285e1..70043c5 100644 (file)
@@ -156,7 +156,7 @@ void RenderButton::setText(const String& str)
         if (m_buttonText)
             m_buttonText->setText(str.impl());
         else {
-            m_buttonText = new (*renderArena()) RenderTextFragment(&document(), str.impl());
+            m_buttonText = new (renderArena()) RenderTextFragment(&document(), str.impl());
             m_buttonText->setStyle(style());
             addChild(m_buttonText);
         }
index 94d467f..c56ce82 100644 (file)
@@ -182,7 +182,7 @@ void RenderFullScreen::createPlaceholder(PassRefPtr<RenderStyle> style, const La
         style->setHeight(Length(frameRect.height(), Fixed));
 
     if (!m_placeholder) {
-        m_placeholder = new (*renderArena()) RenderFullScreenPlaceholder(this);
+        m_placeholder = new (renderArena()) RenderFullScreenPlaceholder(this);
         m_placeholder->setStyle(style);
         if (parent()) {
             parent()->addChild(m_placeholder, this);
index 44e440f..ccf3f9b 100644 (file)
@@ -334,7 +334,7 @@ void RenderInline::addChildIgnoringContinuation(RenderObject* newChild, RenderOb
 
 RenderInline* RenderInline::clone() const
 {
-    RenderInline* cloneInline = new (*renderArena()) RenderInline(element());
+    RenderInline* cloneInline = new (renderArena()) RenderInline(element());
     cloneInline->setStyle(style());
     cloneInline->setFlowThreadState(flowThreadState());
     return cloneInline;
index 35e0d00..e9debd5 100644 (file)
@@ -1733,9 +1733,9 @@ void RenderLayer::beginTransparencyLayers(GraphicsContext* context, const Render
     }
 }
 
-void* RenderLayer::operator new(size_t sz, RenderArena* renderArena)
+void* RenderLayer::operator new(size_t sz, RenderArena& renderArena)
 {
-    return renderArena->allocate(sz);
+    return renderArena.allocate(sz);
 }
 
 void RenderLayer::operator delete(void* ptr, size_t sz)
@@ -1744,12 +1744,12 @@ void RenderLayer::operator delete(void* ptr, size_t sz)
     *(size_t *)ptr = sz;
 }
 
-void RenderLayer::destroy(RenderArena* renderArena)
+void RenderLayer::destroy(RenderArena& renderArena)
 {
     delete this;
 
     // Recover the size left there for us by operator delete and free the memory.
-    renderArena->free(*(size_t *)this, this);
+    renderArena.free(*(size_t *)this, this);
 }
 
 void RenderLayer::addChild(RenderLayer* child, RenderLayer* beforeChild)
index b57bc65..3056cc0 100644 (file)
@@ -750,7 +750,7 @@ public:
 
     // Overloaded new operator. Derived classes must override operator new
     // in order to allocate out of the RenderArena.
-    void* operator new(size_t, RenderArena*);
+    void* operator new(size_t, RenderArena&);
 
     // Overridden to prevent the normal delete from being called.
     void operator delete(void*, size_t);
@@ -1118,8 +1118,8 @@ private:
     friend class RenderLayerCompositor;
     friend class RenderLayerModelObject;
 
-    // Only safe to call from RenderBoxModelObject::destroyLayer(RenderArena*)
-    void destroy(RenderArena*);
+    // Only safe to call from RenderBoxModelObject::destroyLayer(RenderArena&)
+    void destroy(RenderArena&);
 
     LayoutUnit overflowTop() const;
     LayoutUnit overflowBottom() const;
index 1cbe2eb..64300b9 100644 (file)
@@ -64,7 +64,7 @@ void RenderLineBoxList::appendLineBox(InlineFlowBox* box)
     checkConsistency();
 }
 
-void RenderLineBoxList::deleteLineBoxTree(RenderArena* arena)
+void RenderLineBoxList::deleteLineBoxTree(RenderArena& arena)
 {
     InlineFlowBox* line = m_firstLineBox;
     InlineFlowBox* nextLine;
@@ -127,7 +127,7 @@ void RenderLineBoxList::removeLineBox(InlineFlowBox* box)
     checkConsistency();
 }
 
-void RenderLineBoxList::deleteLineBoxes(RenderArena* arena)
+void RenderLineBoxList::deleteLineBoxes(RenderArena& arena)
 {
     if (m_firstLineBox) {
         InlineFlowBox* next;
index 0f9c657..3d9e7fd 100644 (file)
@@ -55,8 +55,8 @@ public:
 
     void appendLineBox(InlineFlowBox*);
 
-    void deleteLineBoxTree(RenderArena*);
-    void deleteLineBoxes(RenderArena*);
+    void deleteLineBoxTree(RenderArena&);
+    void deleteLineBoxes(RenderArena&);
 
     void extractLineBox(InlineFlowBox*);
     void attachLineBox(InlineFlowBox*);
index 4d4f15c..79d801c 100644 (file)
@@ -243,7 +243,7 @@ void RenderMenuList::setText(const String& s)
         if (!m_buttonText || !m_buttonText->isBR()) {
             if (m_buttonText)
                 m_buttonText->destroy();
-            m_buttonText = new (*renderArena()) RenderBR(&document());
+            m_buttonText = new (renderArena()) RenderBR(&document());
             m_buttonText->setStyle(style());
             addChild(m_buttonText);
         }
@@ -253,7 +253,7 @@ void RenderMenuList::setText(const String& s)
         else {
             if (m_buttonText)
                 m_buttonText->destroy();
-            m_buttonText = new (*renderArena()) RenderText(&document(), s.impl());
+            m_buttonText = new (renderArena()) RenderText(&document(), s.impl());
             m_buttonText->setStyle(style());
             addChild(m_buttonText);
         }
index 318f916..69a8c35 100644 (file)
@@ -2840,7 +2840,7 @@ void RenderObject::removeShapeImageClient(ShapeValue* shapeValue)
 }
 #endif
 
-void RenderObject::arenaDelete(RenderArena* arena, void* base)
+void RenderObject::arenaDelete(RenderArena& arena, void* base)
 {
     if (m_style) {
         for (const FillLayer* bgLayer = m_style->backgroundLayers(); bgLayer; bgLayer = bgLayer->next()) {
@@ -2874,7 +2874,7 @@ void RenderObject::arenaDelete(RenderArena* arena, void* base)
 #endif
 
     // Recover the size left there for us by operator delete and free the memory.
-    arena->free(*(size_t*)base, base);
+    arena.free(*(size_t*)base, base);
 }
 
 VisiblePosition RenderObject::positionForPoint(const LayoutPoint&)
index c4fd9e3..6f987d5 100644 (file)
@@ -339,7 +339,7 @@ private:
     void* operator new(size_t) throw();
 
 public:
-    RenderArena* renderArena() const { return document().renderArena(); }
+    RenderArena& renderArena() const { return *document().renderArena(); }
 
     bool isPseudoElement() const { return node() && node()->isPseudoElement(); }
 
@@ -1023,7 +1023,7 @@ protected:
 
     void clearLayoutRootIfNeeded() const;
     virtual void willBeDestroyed();
-    void arenaDelete(RenderArena*, void* objectBase);
+    void arenaDelete(RenderArena&, void* objectBase);
 
     virtual bool canBeReplacedWithInlineRunIn() const;
 
index a2f0950..65f44dd 100644 (file)
@@ -210,7 +210,7 @@ RenderRubyBase* RenderRubyRun::createRubyBase() const
 RenderRubyRun* RenderRubyRun::staticCreateRubyRun(const RenderObject* parentRuby)
 {
     ASSERT(parentRuby && parentRuby->isRuby());
-    RenderRubyRun* rr = new (*parentRuby->renderArena()) RenderRubyRun();
+    RenderRubyRun* rr = new (parentRuby->renderArena()) RenderRubyRun();
     rr->setDocumentForAnonymous(parentRuby->document());
     RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(parentRuby->style(), INLINE_BLOCK);
     rr->setStyle(newStyle.release());
index 7605ee1..78f022f 100644 (file)
@@ -1414,7 +1414,7 @@ bool RenderTable::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
 RenderTable* RenderTable::createAnonymousWithParentRenderer(const RenderObject* parent)
 {
     RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(parent->style(), TABLE);
-    RenderTable* newTable = new (*parent->renderArena()) RenderTable(0);
+    RenderTable* newTable = new (parent->renderArena()) RenderTable(0);
     newTable->setDocumentForAnonymous(parent->document());
     newTable->setStyle(newStyle.release());
     return newTable;
index 6683577..24769e1 100644 (file)
@@ -1437,7 +1437,7 @@ CollapsedBorderValue& RenderTableSection::cachedCollapsedBorder(const RenderTabl
 RenderTableSection* RenderTableSection::createAnonymousWithParentRenderer(const RenderObject* parent)
 {
     RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(parent->style(), TABLE_ROW_GROUP);
-    RenderTableSection* newSection = new (*parent->renderArena()) RenderTableSection(0);
+    RenderTableSection* newSection = new (parent->renderArena()) RenderTableSection(0);
     newSection->setDocumentForAnonymous(parent->document());
     newSection->setStyle(newStyle.release());
     return newSection;
index e684a86..1d8d459 100644 (file)
@@ -307,7 +307,7 @@ void RenderText::removeTextBox(InlineTextBox* box)
 void RenderText::deleteTextBoxes()
 {
     if (firstTextBox()) {
-        RenderArena* arena = renderArena();
+        RenderArena& arena = renderArena();
         InlineTextBox* next;
         for (InlineTextBox* curr = firstTextBox(); curr; curr = next) {
             next = curr->nextTextBox();
index 629b00d..3b6ec5a 100644 (file)
@@ -66,13 +66,13 @@ RootInlineBox::RootInlineBox(RenderBlock& block)
 }
 
 
-void RootInlineBox::destroy(RenderArena* arena)
+void RootInlineBox::destroy(RenderArena& arena)
 {
     detachEllipsisBox(arena);
     InlineFlowBox::destroy(arena);
 }
 
-void RootInlineBox::detachEllipsisBox(RenderArena* arena)
+void RootInlineBox::detachEllipsisBox(RenderArena& arena)
 {
     if (hasEllipsisBox()) {
         EllipsisBox* box = gEllipsisBoxMap->take(this);
index 8f578f6..de70fa0 100644 (file)
@@ -38,11 +38,11 @@ class RootInlineBox : public InlineFlowBox {
 public:
     explicit RootInlineBox(RenderBlock&);
 
-    virtual void destroy(RenderArena*) OVERRIDE FINAL;
+    virtual void destroy(RenderArena&) OVERRIDE FINAL;
 
     virtual bool isRootInlineBox() const OVERRIDE FINAL { return true; }
 
-    void detachEllipsisBox(RenderArena*);
+    void detachEllipsisBox(RenderArena&);
 
     RootInlineBox* nextRootBox() const { return static_cast<RootInlineBox*>(m_nextLineBox); }
     RootInlineBox* prevRootBox() const { return static_cast<RootInlineBox*>(m_prevLineBox); }
index b9400fe..3c56c3d 100644 (file)
@@ -65,7 +65,7 @@ void RenderMathMLBlock::computePreferredLogicalWidths()
 RenderMathMLBlock* RenderMathMLBlock::createAnonymousMathMLBlock(EDisplay display)
 {
     RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(style(), display);
-    RenderMathMLBlock* newBlock = new (*renderArena()) RenderMathMLBlock(0);
+    RenderMathMLBlock* newBlock = new (renderArena()) RenderMathMLBlock(0);
     newBlock->setDocumentForAnonymous(document());
     newBlock->setStyle(newStyle.release());
     return newBlock;
index c18cebe..1e4aeb2 100644 (file)
@@ -89,7 +89,7 @@ RenderMathMLOperator* RenderMathMLFenced::createMathMLOperator(UChar uChar, Rend
     newStyle->setMarginEnd(Length((operatorType == RenderMathMLOperator::Fence ? gFenceMarginEms : gSeparatorMarginEndEms) * style()->fontSize(), Fixed));
     if (operatorType == RenderMathMLOperator::Fence)
         newStyle->setMarginStart(Length(gFenceMarginEms * style()->fontSize(), Fixed));
-    RenderMathMLOperator* newOperator = new (*renderArena()) RenderMathMLOperator(element(), uChar);
+    RenderMathMLOperator* newOperator = new (renderArena()) RenderMathMLOperator(element(), uChar);
     newOperator->setOperatorType(operatorType);
     newOperator->setStyle(newStyle.release());
     return newOperator;
index 0615adc..2e3e84c 100644 (file)
@@ -205,7 +205,7 @@ void RenderMathMLOperator::updateFromElement()
     // Either stretch is disabled or we don't have a stretchable character over the minimum height
     if (stretchDisabled || !shouldStack) {
         m_isStacked = false;
-        RenderBlock* container = new (*renderArena()) RenderMathMLBlock(element());
+        RenderBlock* container = new (renderArena()) RenderMathMLBlock(element());
         // This container doesn't offer any useful information to accessibility.
         toRenderMathMLBlock(container)->setIgnoreInAccessibilityTree(true);
         
@@ -229,9 +229,9 @@ void RenderMathMLOperator::updateFromElement()
         // Build the text of the operator.
         RenderText* text = 0;
         if (m_operator) 
-            text = new (*renderArena()) RenderText(element(), StringImpl::create(&m_operator, 1));
+            text = new (renderArena()) RenderText(element(), StringImpl::create(&m_operator, 1));
         else
-            text = new (*renderArena()) RenderText(element(), element()->textContent().replace(hyphenMinus, minusSign).impl());
+            text = new (renderArena()) RenderText(element(), element()->textContent().replace(hyphenMinus, minusSign).impl());
         // If we can't figure out the text, leave it blank.
         if (text) {
             RefPtr<RenderStyle> textStyle = RenderStyle::create();
@@ -298,13 +298,13 @@ PassRefPtr<RenderStyle> RenderMathMLOperator::createStackableStyle(int maxHeight
 
 RenderBlock* RenderMathMLOperator::createGlyph(UChar glyph, int maxHeightForRenderer, int charRelative)
 {
-    RenderBlock* container = new (*renderArena()) RenderMathMLBlock(element());
+    RenderBlock* container = new (renderArena()) RenderMathMLBlock(element());
     toRenderMathMLBlock(container)->setIgnoreInAccessibilityTree(true);
     container->setStyle(createStackableStyle(maxHeightForRenderer));
     addChild(container);
     RenderBlock* parent = container;
     if (charRelative) {
-        RenderBlock* charBlock = new (*renderArena()) RenderBlockFlow(element());
+        RenderBlock* charBlock = new (renderArena()) RenderBlockFlow(element());
         RefPtr<RenderStyle> charStyle = RenderStyle::create();
         charStyle->inheritFrom(container->style());
         charStyle->setDisplay(INLINE_BLOCK);
@@ -315,7 +315,7 @@ RenderBlock* RenderMathMLOperator::createGlyph(UChar glyph, int maxHeightForRend
         parent = charBlock;
     }
     
-    RenderText* text = new (*renderArena()) RenderText(element(), StringImpl::create(&glyph, 1));
+    RenderText* text = new (renderArena()) RenderText(element(), StringImpl::create(&glyph, 1));
     text->setStyle(container->style());
     parent->addChild(text);
     return container;
index ebc574d..25fb75b 100644 (file)
@@ -45,7 +45,7 @@ RenderMathMLRow::RenderMathMLRow(Element* element)
 RenderMathMLRow* RenderMathMLRow::createAnonymousWithParentRenderer(const RenderObject* parent)
 {
     RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(parent->style(), FLEX);
-    RenderMathMLRow* newMRow = new (*parent->renderArena()) RenderMathMLRow(0);
+    RenderMathMLRow* newMRow = new (parent->renderArena()) RenderMathMLRow(0);
     newMRow->setDocumentForAnonymous(parent->document());
     newMRow->setStyle(newStyle.release());
     return newMRow;
index 15c944b..2084fe9 100644 (file)
@@ -363,7 +363,7 @@ int RenderMathMLScripts::firstLineBoxBaseline() const
 RenderMathMLScriptsWrapper* RenderMathMLScriptsWrapper::createAnonymousWrapper(RenderMathMLScripts* renderObject, WrapperType type)
 {
     RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(renderObject->style(), FLEX);
-    RenderMathMLScriptsWrapper* newBlock = new (*renderObject->renderArena()) RenderMathMLScriptsWrapper(0, type);
+    RenderMathMLScriptsWrapper* newBlock = new (renderObject->renderArena()) RenderMathMLScriptsWrapper(0, type);
     newBlock->setDocumentForAnonymous(renderObject->document());
     newBlock->setStyle(newStyle.release());
     return newBlock;