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

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

Issue 236203020: Separate repaint and layout requirements of StyleDifference (Step 1) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase; Renaming of some methods and small changes in StyleDifference Created 6 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
Index: Source/core/rendering/RenderBlockFlow.cpp
diff --git a/Source/core/rendering/RenderBlockFlow.cpp b/Source/core/rendering/RenderBlockFlow.cpp
index f5de3d72cfd22572cc3fa1b4864e653ffedb9a8a..19b20351959e10f71325e5e2147fae5d4074b71a 100644
--- a/Source/core/rendering/RenderBlockFlow.cpp
+++ b/Source/core/rendering/RenderBlockFlow.cpp
@@ -1818,7 +1818,7 @@ void RenderBlockFlow::styleWillChange(StyleDifference diff, const RenderStyle& n
{
RenderStyle* oldStyle = style();
s_canPropagateFloatIntoSibling = oldStyle ? !isFloatingOrOutOfFlowPositioned() && !avoidsFloats() : false;
- if (oldStyle && parent() && diff == StyleDifferenceLayout && oldStyle->position() != newStyle.position()
+ if (oldStyle && parent() && diff.needsFullLayout() && oldStyle->position() != newStyle.position()
&& containsFloats() && !isFloating() && !isOutOfFlowPositioned() && newStyle.hasOutOfFlowPosition())
markAllDescendantsWithFloatsForLayout();
@@ -1834,7 +1834,7 @@ void RenderBlockFlow::styleDidChange(StyleDifference diff, const RenderStyle* ol
// then mark its descendants with floats for layout and clear all floats from its next
// sibling blocks that exist in our floating objects list. See bug 56299 and 62875.
bool canPropagateFloatIntoSibling = !isFloatingOrOutOfFlowPositioned() && !avoidsFloats();
- if (diff == StyleDifferenceLayout && s_canPropagateFloatIntoSibling && !canPropagateFloatIntoSibling && hasOverhangingFloats()) {
+ if (diff.needsFullLayout() && s_canPropagateFloatIntoSibling && !canPropagateFloatIntoSibling && hasOverhangingFloats()) {
RenderBlockFlow* parentBlockFlow = this;
const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
FloatingObjectSetIterator end = floatingObjectSet.end();
@@ -1859,7 +1859,7 @@ void RenderBlockFlow::styleDidChange(StyleDifference diff, const RenderStyle* ol
parentBlockFlow->markSiblingsWithFloatsForLayout();
}
- if (diff == StyleDifferenceLayout || !oldStyle)
+ if (diff.needsFullLayout() || !oldStyle)
createOrDestroyMultiColumnFlowThreadIfNeeded();
}

Powered by Google App Engine
This is Rietveld 408576698