Chromium Code Reviews| Index: Source/WebCore/rendering/RenderObject.h |
| diff --git a/Source/WebCore/rendering/RenderObject.h b/Source/WebCore/rendering/RenderObject.h |
| index b5a7da4b667b5d9996a882dfb94f864869f65353..f30d9f08114b379929c4efaadf4bc7b77a6ce4df 100644 |
| --- a/Source/WebCore/rendering/RenderObject.h |
| +++ b/Source/WebCore/rendering/RenderObject.h |
| @@ -148,6 +148,34 @@ typedef WTF::HashSet<const RenderObject*> RenderObjectAncestorLineboxDirtySet; |
| const int showTreeCharacterOffset = 39; |
| #endif |
| +struct StyleChangeState { |
| + // RenderObject |
| + unsigned affectsParentBlock : 1; |
| + |
| + // RenderLayerModelObject |
| + unsigned wasFloating : 1; |
| + unsigned hadLayer : 1; |
| + unsigned hadTransform : 1; |
| + unsigned layerWasSelfPainting : 1; |
| + |
| + // RenderBox |
| + unsigned hadOverflowClip : 1; |
| + |
| + // RenderBlock |
| + unsigned couldPropagateFloatIntoSibling : 1; |
| + |
| + StyleChangeState() : |
| + affectsParentBlock(0), |
|
eseidel
2013/04/05 01:50:36
I take it the compiler doesn't like "false"?
esprehn
2013/04/17 03:29:01
Nah, I was just moving fast. I'll change to false.
|
| + wasFloating(0), |
| + hadLayer(0), |
| + hadTransform(0), |
| + layerWasSelfPainting(0), |
| + hadOverflowClip(0), |
| + couldPropagateFloatIntoSibling(0) |
| + { |
| + } |
| +}; |
| + |
| // Base class for all rendering tree objects. |
| class RenderObject : public CachedImageClient { |
| friend class RenderBlock; |
| @@ -999,9 +1027,9 @@ protected: |
| inline bool layerCreationAllowedForSubtree() const; |
| // Overrides should call the superclass at the end |
| - virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle); |
| + virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle, StyleChangeState&); |
| // Overrides should call the superclass at the start |
| - virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); |
| + virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle, const StyleChangeState&); |
| void propagateStyleToAnonymousChildren(bool blockChildrenOnly = false); |
| void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, BoxSide, |
| @@ -1169,10 +1197,6 @@ private: |
| void setNeedsSimplifiedNormalFlowLayout(bool b) { m_bitfields.setNeedsSimplifiedNormalFlowLayout(b); } |
| void setIsDragging(bool b) { m_bitfields.setIsDragging(b); } |
| void setEverHadLayout(bool b) { m_bitfields.setEverHadLayout(b); } |
| - |
| -private: |
| - // Store state between styleWillChange and styleDidChange |
| - static bool s_affectsParentBlock; |
| }; |
| inline bool RenderObject::documentBeingDestroyed() const |