Chromium Code Reviews| Index: Source/WebCore/rendering/RenderBlock.cpp |
| diff --git a/Source/WebCore/rendering/RenderBlock.cpp b/Source/WebCore/rendering/RenderBlock.cpp |
| index 4bed6e0f78aeff01608812eaab7d2ecda08a92e3..99dcc26440faf40133a54e5e96e0a38931fc95f4 100644 |
| --- a/Source/WebCore/rendering/RenderBlock.cpp |
| +++ b/Source/WebCore/rendering/RenderBlock.cpp |
| @@ -122,8 +122,6 @@ static DelayedUpdateScrollInfoSet* gDelayedUpdateScrollInfoSet = 0; |
| static bool gColumnFlowSplitEnabled = true; |
| -bool RenderBlock::s_canPropagateFloatIntoSibling = false; |
|
eseidel
2013/04/05 01:50:36
Makes me wonder where this was ever cleared....
esprehn
2013/04/17 03:29:01
It never was, we just always call styleWillChange
|
| - |
| // This class helps dispatching the 'overflow' event on layout change. overflow can be set on RenderBoxes, yet the existing code |
| // only works on RenderBlocks. If this change, this class should be shared with other RenderBoxes. |
| class OverflowEventDispatcher { |
| @@ -303,10 +301,11 @@ void RenderBlock::willBeDestroyed() |
| RenderBox::willBeDestroyed(); |
| } |
| -void RenderBlock::styleWillChange(StyleDifference diff, const RenderStyle* newStyle) |
| +void RenderBlock::styleWillChange(StyleDifference diff, const RenderStyle* newStyle, StyleChangeState& state) |
| { |
| RenderStyle* oldStyle = style(); |
| - s_canPropagateFloatIntoSibling = oldStyle ? !isFloatingOrOutOfFlowPositioned() && !avoidsFloats() : false; |
| + if (oldStyle) |
| + state.couldPropagateFloatIntoSibling = !isFloatingOrOutOfFlowPositioned() && !avoidsFloats(); |
| setReplaced(newStyle->isDisplayInlineType()); |
| @@ -335,7 +334,7 @@ void RenderBlock::styleWillChange(StyleDifference diff, const RenderStyle* newSt |
| markAllDescendantsWithFloatsForLayout(); |
| } |
| - RenderBox::styleWillChange(diff, newStyle); |
| + RenderBox::styleWillChange(diff, newStyle, state); |
| } |
| static bool borderOrPaddingLogicalWidthChanged(const RenderStyle* oldStyle, const RenderStyle* newStyle) |
| @@ -352,10 +351,10 @@ static bool borderOrPaddingLogicalWidthChanged(const RenderStyle* oldStyle, cons |
| || oldStyle->paddingBottom() != newStyle->paddingBottom(); |
| } |
| -void RenderBlock::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) |
| +void RenderBlock::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle, const StyleChangeState& state) |
| { |
| - RenderBox::styleDidChange(diff, oldStyle); |
| - |
| + RenderBox::styleDidChange(diff, oldStyle, state); |
| + |
| RenderStyle* newStyle = style(); |
| #if ENABLE(CSS_EXCLUSIONS) |
| @@ -382,7 +381,7 @@ void RenderBlock::styleDidChange(StyleDifference diff, const RenderStyle* oldSty |
| // 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 == StyleDifferenceLayout && state.couldPropagateFloatIntoSibling && !canPropagateFloatIntoSibling && hasOverhangingFloats()) { |
| RenderBlock* parentBlock = this; |
| const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); |
| FloatingObjectSetIterator end = floatingObjectSet.end(); |