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

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

Issue 748943002: remove childrenInline & setChildrenInline (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: cr comments Created 6 years, 1 month 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/RenderObject.h ('k') | sky/engine/core/rendering/RenderParagraph.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderObject.cpp
diff --git a/sky/engine/core/rendering/RenderObject.cpp b/sky/engine/core/rendering/RenderObject.cpp
index 914e2f1b4b95a6d97d6b73da2d77751f8966db4b..15d9801093357d4af74833b9b5b7001905f9ca4d 100644
--- a/sky/engine/core/rendering/RenderObject.cpp
+++ b/sky/engine/core/rendering/RenderObject.cpp
@@ -1640,17 +1640,6 @@ void RenderObject::selectionStartEnd(int& spos, int& epos) const
view()->selectionStartEnd(spos, epos);
}
-void RenderObject::handleDynamicFloatPositionChange()
-{
- // FIXME(sky): Inline this function.
-
- // We have gone from not affecting the inline status of the parent flow to suddenly
- // having an impact. See if there is a mismatch between the parent flow's
- // childrenInline() state and our state.
- setInline(style()->isDisplayInlineType());
- ASSERT(isInline() == parent()->childrenInline());
-}
-
StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff) const
{
// If transform changed, and the layer does not paint into its own separate backing, then we need to invalidate paints.
@@ -1813,8 +1802,12 @@ static inline bool areCursorsEqual(const RenderStyle* a, const RenderStyle* b)
void RenderObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
- if (s_affectsParentBlock)
- handleDynamicFloatPositionChange();
+ if (s_affectsParentBlock) {
+ // An object that was floating or positioned became a normal flow object again. We have to make sure the
+ // render tree updates as needed to accommodate the new normal flow object.
+ setInline(style()->isDisplayInlineType());
+ ASSERT(isInline() == parent()->isRenderParagraph());
+ }
if (!m_parent)
return;
@@ -2178,7 +2171,7 @@ void RenderObject::insertedIntoTree()
addLayers(layer);
}
- if (parent()->childrenInline())
+ if (parent()->isRenderParagraph())
parent()->dirtyLinesFromChangedChild(this);
}
@@ -2190,7 +2183,7 @@ void RenderObject::willBeRemovedFromTree()
if (slowFirstChild() || hasLayer())
removeLayers(parent()->enclosingLayer());
- if (isOutOfFlowPositioned() && parent()->childrenInline())
+ if (isOutOfFlowPositioned() && parent()->isRenderParagraph())
parent()->dirtyLinesFromChangedChild(this);
}
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | sky/engine/core/rendering/RenderParagraph.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698