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

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

Issue 10383285: Merge 116174 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 7 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/WebCore/rendering/RenderBlock.cpp
===================================================================
--- Source/WebCore/rendering/RenderBlock.cpp (revision 118007)
+++ Source/WebCore/rendering/RenderBlock.cpp (working copy)
@@ -1143,7 +1143,7 @@
// to clear out inherited column properties by just making a new style, and to also clear the
// column span flag if it is set.
ASSERT(!inlineChildrenBlock->continuation());
- RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(style());
+ RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(style(), BLOCK);
children()->removeChildNode(this, inlineChildrenBlock, inlineChildrenBlock->hasLayer());
inlineChildrenBlock->setStyle(newStyle);
@@ -7274,28 +7274,27 @@
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 ?
+ EDisplay newDisplay;
RenderBlock* newBox = 0;
if (display == BOX || display == INLINE_BOX) {
- newStyle->setDisplay(BOX);
newBox = new (parent->renderArena()) RenderDeprecatedFlexibleBox(parent->document() /* anonymous box */);
+ newDisplay = BOX;
} else {
- newStyle->setDisplay(BLOCK);
newBox = new (parent->renderArena()) RenderBlock(parent->document() /* anonymous box */);
+ newDisplay = BLOCK;
}
+ RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(parent->style(), newDisplay);
newBox->setStyle(newStyle.release());
return newBox;
}
RenderBlock* RenderBlock::createAnonymousColumnsWithParentRenderer(const RenderObject* parent)
{
- RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->style());
+ RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(parent->style(), BLOCK);
newStyle->inheritColumnPropertiesFrom(parent->style());
- newStyle->setDisplay(BLOCK);
RenderBlock* newBox = new (parent->renderArena()) RenderBlock(parent->document() /* anonymous box */);
newBox->setStyle(newStyle.release());
@@ -7304,9 +7303,8 @@
RenderBlock* RenderBlock::createAnonymousColumnSpanWithParentRenderer(const RenderObject* parent)
{
- RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->style());
+ RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(parent->style(), BLOCK);
newStyle->setColumnSpan(ColumnSpanAll);
- newStyle->setDisplay(BLOCK);
RenderBlock* newBox = new (parent->renderArena()) RenderBlock(parent->document() /* anonymous box */);
newBox->setStyle(newStyle.release());
« no previous file with comments | « LayoutTests/fast/block/block-add-child-crash-expected.txt ('k') | Source/WebCore/rendering/RenderInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698