Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1526)

Unified Diff: Source/core/rendering/RenderBlock.cpp

Issue 16896019: Replace RenderArena with PartitionAlloc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index 5fd8b755ff0924efbfbda017f9bd053c0a10c1e2..04a823d97da91f39b2da8261f7517adedac34606 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -242,7 +242,7 @@ RenderBlock::~RenderBlock()
RenderBlock* RenderBlock::createAnonymous(Document* document)
{
- RenderBlock* renderer = new (document->renderArena()) RenderBlock(0);
+ RenderBlock* renderer = new RenderBlock(0);
renderer->setDocumentForAnonymous(document);
return renderer;
}
@@ -287,10 +287,10 @@ void RenderBlock::willBeDestroyed()
parent()->dirtyLinesFromChangedChild(this);
}
- m_lineBoxes.deleteLineBoxes(renderArena());
+ m_lineBoxes.deleteLineBoxes();
if (lineGridBox())
- lineGridBox()->destroy(renderArena());
+ lineGridBox()->destroy();
if (UNLIKELY(gDelayedUpdateScrollInfoSet != 0))
gDelayedUpdateScrollInfoSet->remove(this);
@@ -572,7 +572,7 @@ RenderBlock* RenderBlock::clone() const
cloneBlock->setChildrenInline(childrenInline());
}
else {
- RenderObject* cloneRenderer = toElement(node())->createRenderer(renderArena(), style());
+ RenderObject* cloneRenderer = toElement(node())->createRenderer(style());
cloneBlock = toRenderBlock(cloneRenderer);
cloneBlock->setStyle(style());
@@ -698,10 +698,6 @@ void RenderBlock::splitFlow(RenderObject* beforeChild, RenderBlock* newBlockBox,
// We already know the newBlockBox isn't going to contain inline kids, so avoid wasting
// time in makeChildrenNonInline by just setting this explicitly up front.
newBlockBox->setChildrenInline(false);
-
- // We delayed adding the newChild until now so that the |newBlockBox| would be fully
- // connected, thus allowing newChild access to a renderArena should it need
- // to wrap itself in additional boxes (e.g., table construction).
newBlockBox->addChild(newChild);
// Always just do a full layout in order to ensure that line boxes (especially wrappers for images)
@@ -750,10 +746,6 @@ void RenderBlock::makeChildrenAnonymousColumnBlocks(RenderObject* beforeChild, R
// We already know the newBlockBox isn't going to contain inline kids, so avoid wasting
// time in makeChildrenNonInline by just setting this explicitly up front.
newBlockBox->setChildrenInline(false);
-
- // We delayed adding the newChild until now so that the |newBlockBox| would be fully
- // connected, thus allowing newChild access to a renderArena should it need
- // to wrap itself in additional boxes (e.g., table construction).
newBlockBox->addChild(newChild);
// Always just do a full layout in order to ensure that line boxes (especially wrappers for images)
@@ -991,7 +983,7 @@ void RenderBlock::deleteLineBoxTree()
(*it)->m_originatingLine = 0;
}
}
- m_lineBoxes.deleteLineBoxTree(renderArena());
+ m_lineBoxes.deleteLineBoxTree();
if (AXObjectCache* cache = document()->existingAXObjectCache())
cache->recomputeIsIgnored(this);
@@ -999,7 +991,7 @@ void RenderBlock::deleteLineBoxTree()
RootInlineBox* RenderBlock::createRootInlineBox()
{
- return new (renderArena()) RootInlineBox(this);
+ return new RootInlineBox(this);
}
RootInlineBox* RenderBlock::createAndAppendRootInlineBox()
@@ -1916,9 +1908,9 @@ RenderBoxModelObject* RenderBlock::createReplacementRunIn(RenderBoxModelObject*
RenderBoxModelObject* newRunIn = 0;
if (!runIn->isRenderBlock())
- newRunIn = new (renderArena()) RenderBlock(runIn->node());
+ newRunIn = new RenderBlock(runIn->node());
else
- newRunIn = new (renderArena()) RenderInline(toElement(runIn->node()));
+ newRunIn = new RenderInline(toElement(runIn->node()));
runIn->node()->setRenderer(newRunIn);
newRunIn->setStyle(runIn->style());
@@ -6660,7 +6652,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 RenderTextFragment(textObj->node() ? textObj->node() : textObj->document(), oldText.get(), length, oldText->length() - length);
remainingText->setStyle(textObj->style());
if (remainingText->node())
remainingText->node()->setRenderer(remainingText);
@@ -6672,7 +6664,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 RenderTextFragment(remainingText->node() ? remainingText->node() : remainingText->document(), oldText.get(), 0, length);
letter->setStyle(pseudoStyle);
firstLetter->addChild(letter);

Powered by Google App Engine
This is Rietveld 408576698