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

Unified Diff: sky/engine/core/rendering/RenderBlock.cpp

Issue 1077473002: Stop rendering text inside flex boxes. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: make p default to display: paragraph Created 5 years, 8 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
« no previous file with comments | « sky/engine/core/rendering/RenderBlock.h ('k') | sky/engine/core/rendering/RenderObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBlock.cpp
diff --git a/sky/engine/core/rendering/RenderBlock.cpp b/sky/engine/core/rendering/RenderBlock.cpp
index 7594bcbe5ca0467cb8e0b42cb193658e722ca62c..f70c0888fef056c9c6446f6d6f26c336603b1825 100644
--- a/sky/engine/core/rendering/RenderBlock.cpp
+++ b/sky/engine/core/rendering/RenderBlock.cpp
@@ -200,40 +200,15 @@ void RenderBlock::styleDidChange(StyleDifference diff, const RenderStyle* oldSty
{
RenderBox::styleDidChange(diff, oldStyle);
- RenderStyle* newStyle = style();
- propagateStyleToAnonymousChildren(true);
-
// It's possible for our border/padding to change, but for the overall logical width of the block to
// end up being the same. We keep track of this change so in layoutBlock, we can know to set relayoutChildren=true.
- m_hasBorderOrPaddingLogicalWidthChanged = oldStyle && diff.needsFullLayout() && needsLayout() && borderOrPaddingLogicalWidthChanged(oldStyle, newStyle);
-}
-
-void RenderBlock::addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, RenderObject* beforeChild)
-{
- if (beforeChild && beforeChild->parent() != this) {
- RenderObject* beforeChildContainer = beforeChild->parent();
- ASSERT(beforeChildContainer->parent() == this);
- ASSERT(beforeChildContainer->isAnonymousBlock());
- addChild(newChild, beforeChildContainer);
- return;
- }
-
- // TODO(ojan): What should we do in this case? For now we insert an anonymous paragraph.
- // This only happens if we have a text node directly inside a non-paragraph.
- if (!isRenderParagraph() && newChild->isInline()) {
- RenderBlock* newBox = createAnonymousBlock();
- ASSERT(newBox->isRenderParagraph());
- RenderBox::addChild(newBox, beforeChild);
- newBox->addChild(newChild);
- return;
- }
-
- RenderBox::addChild(newChild, beforeChild);
+ m_hasBorderOrPaddingLogicalWidthChanged = oldStyle && diff.needsFullLayout() && needsLayout() && borderOrPaddingLogicalWidthChanged(oldStyle, style());
}
void RenderBlock::addChild(RenderObject* newChild, RenderObject* beforeChild)
{
- addChildIgnoringAnonymousColumnBlocks(newChild, beforeChild);
+ ASSERT(isRenderParagraph() || !newChild->isInline());
+ RenderBox::addChild(newChild, beforeChild);
}
void RenderBlock::deleteLineBoxTree()
@@ -1609,16 +1584,6 @@ const char* RenderBlock::renderName() const
return "RenderBlock";
}
-// FIXME(sky): Clean up callers now that we no longer use the EDisplay argument.
-RenderBlock* RenderBlock::createAnonymousWithParentRendererAndDisplay(const RenderObject* parent, EDisplay)
-{
- RenderBlock* newBox = RenderParagraph::createAnonymous(parent->document());
- RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay(parent->style(), PARAGRAPH);
- parent->updateAnonymousChildStyle(newBox, newStyle.get());
- newBox->setStyle(newStyle.release());
- return newBox;
-}
-
static bool recalcNormalFlowChildOverflowIfNeeded(RenderObject* renderer)
{
if (renderer->isOutOfFlowPositioned() || !renderer->needsOverflowRecalcAfterStyleChange())
« no previous file with comments | « sky/engine/core/rendering/RenderBlock.h ('k') | sky/engine/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698