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

Side by Side Diff: Source/core/rendering/RenderObject.h

Issue 408273003: Reset m_didTransformToRootUpdate flag during invalidationTreeIfNeeded (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reset the flag only after invalidation Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 { 1040 {
1041 m_bitfields.setShouldDoFullPaintInvalidationIfSelfPaintingLayer(b); 1041 m_bitfields.setShouldDoFullPaintInvalidationIfSelfPaintingLayer(b);
1042 1042
1043 if (b) 1043 if (b)
1044 markContainingBlockChainForPaintInvalidation(); 1044 markContainingBlockChainForPaintInvalidation();
1045 } 1045 }
1046 1046
1047 bool onlyNeededPositionedMovementLayout() const { return m_bitfields.onlyNee dedPositionedMovementLayout(); } 1047 bool onlyNeededPositionedMovementLayout() const { return m_bitfields.onlyNee dedPositionedMovementLayout(); }
1048 void setOnlyNeededPositionedMovementLayout(bool b) { m_bitfields.setOnlyNeed edPositionedMovementLayout(b); } 1048 void setOnlyNeededPositionedMovementLayout(bool b) { m_bitfields.setOnlyNeed edPositionedMovementLayout(b); }
1049 1049
1050 void clearPaintInvalidationState(); 1050 virtual void clearPaintInvalidationState();
1051 1051
1052 // layoutDidGetCalled indicates whether this render object was re-laid-out 1052 // layoutDidGetCalled indicates whether this render object was re-laid-out
1053 // since the last call to setLayoutDidGetCalled(false) on this object. 1053 // since the last call to setLayoutDidGetCalled(false) on this object.
1054 bool layoutDidGetCalled() const { return m_bitfields.layoutDidGetCalled(); } 1054 bool layoutDidGetCalled() const { return m_bitfields.layoutDidGetCalled(); }
1055 void setLayoutDidGetCalled(bool b) { m_bitfields.setLayoutDidGetCalled(b); } 1055 void setLayoutDidGetCalled(bool b) { m_bitfields.setLayoutDidGetCalled(b); }
1056 1056
1057 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval idation(); } 1057 bool mayNeedPaintInvalidation() const { return m_bitfields.mayNeedPaintInval idation(); }
1058 void setMayNeedPaintInvalidation(bool b) 1058 void setMayNeedPaintInvalidation(bool b)
1059 { 1059 {
1060 m_bitfields.setMayNeedPaintInvalidation(b); 1060 m_bitfields.setMayNeedPaintInvalidation(b);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 // Add hit-test rects for this renderer only to the provided list. layerOffs et is the offset 1128 // Add hit-test rects for this renderer only to the provided list. layerOffs et is the offset
1129 // of this renderer within the current layer that should be used for each re sult. 1129 // of this renderer within the current layer that should be used for each re sult.
1130 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const { }; 1130 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const { };
1131 1131
1132 virtual InvalidationReason getPaintInvalidationReason(const RenderLayerModel Object& paintInvalidationContainer, 1132 virtual InvalidationReason getPaintInvalidationReason(const RenderLayerModel Object& paintInvalidationContainer,
1133 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva lidationContainer, 1133 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva lidationContainer,
1134 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInva lidationContainer); 1134 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInva lidationContainer);
1135 void incrementallyInvalidatePaint(const RenderLayerModelObject& paintInvalid ationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds); 1135 void incrementallyInvalidatePaint(const RenderLayerModelObject& paintInvalid ationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds);
1136 void fullyInvalidatePaint(const RenderLayerModelObject& paintInvalidationCon tainer, InvalidationReason, const LayoutRect& oldBounds, const LayoutRect& newBo unds); 1136 void fullyInvalidatePaint(const RenderLayerModelObject& paintInvalidationCon tainer, InvalidationReason, const LayoutRect& oldBounds, const LayoutRect& newBo unds);
1137 1137
1138 #if ENABLE(ASSERT)
1139 virtual bool paintInvalidationStateIsDirty() const
1140 {
1141 return layoutDidGetCalled() || shouldDoFullPaintInvalidation() || should DoFullPaintInvalidationIfSelfPaintingLayer()
1142 || onlyNeededPositionedMovementLayout() || neededLayoutBecauseOfChil dren() || mayNeedPaintInvalidation();
1143 }
1144 #endif
1145
1138 private: 1146 private:
1139 const RenderLayerModelObject* enclosingCompositedContainer() const; 1147 const RenderLayerModelObject* enclosingCompositedContainer() const;
1140 1148
1141 RenderBlock* containerForFixedPosition(const RenderLayerModelObject* paintIn validationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const; 1149 RenderBlock* containerForFixedPosition(const RenderLayerModelObject* paintIn validationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const;
1142 1150
1143 RenderFlowThread* locateFlowThreadContainingBlock() const; 1151 RenderFlowThread* locateFlowThreadContainingBlock() const;
1144 void removeFromRenderFlowThread(); 1152 void removeFromRenderFlowThread();
1145 void removeFromRenderFlowThreadRecursive(RenderFlowThread*); 1153 void removeFromRenderFlowThreadRecursive(RenderFlowThread*);
1146 1154
1147 bool hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor() const; 1155 bool hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor() const;
1148 1156
1149 RenderStyle* cachedFirstLineStyle() const; 1157 RenderStyle* cachedFirstLineStyle() const;
1150 StyleDifference adjustStyleDifference(StyleDifference) const; 1158 StyleDifference adjustStyleDifference(StyleDifference) const;
1151 1159
1152 Color selectionColor(int colorProperty) const; 1160 Color selectionColor(int colorProperty) const;
1153 1161
1154 void removeShapeImageClient(ShapeValue*); 1162 void removeShapeImageClient(ShapeValue*);
1155 1163
1156 #if ENABLE(ASSERT) 1164 #if ENABLE(ASSERT)
1157 void checkBlockPositionedObjectsNeedLayout(); 1165 void checkBlockPositionedObjectsNeedLayout();
1158
1159 bool paintInvalidationStateIsDirty() const
1160 {
1161 return layoutDidGetCalled() || shouldDoFullPaintInvalidation() || should DoFullPaintInvalidationIfSelfPaintingLayer()
1162 || onlyNeededPositionedMovementLayout() || neededLayoutBecauseOfChil dren() || mayNeedPaintInvalidation();
1163 }
1164 #endif 1166 #endif
1165 const char* invalidationReasonToString(InvalidationReason) const; 1167 const char* invalidationReasonToString(InvalidationReason) const;
1166 1168
1167 void markContainingBlockChainForPaintInvalidation() 1169 void markContainingBlockChainForPaintInvalidation()
1168 { 1170 {
1169 for (RenderObject* container = this->container(); container && !containe r->shouldCheckForPaintInvalidation(); container = container->container()) 1171 for (RenderObject* container = this->container(); container && !containe r->shouldCheckForPaintInvalidation(); container = container->container())
1170 container->setMayNeedPaintInvalidation(true); 1172 container->setMayNeedPaintInvalidation(true);
1171 } 1173 }
1172 1174
1173 static bool isAllowedToModifyRenderTreeStructure(Document&); 1175 static bool isAllowedToModifyRenderTreeStructure(Document&);
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 void showTree(const blink::RenderObject*); 1545 void showTree(const blink::RenderObject*);
1544 void showLineTree(const blink::RenderObject*); 1546 void showLineTree(const blink::RenderObject*);
1545 void showRenderTree(const blink::RenderObject* object1); 1547 void showRenderTree(const blink::RenderObject* object1);
1546 // We don't make object2 an optional parameter so that showRenderTree 1548 // We don't make object2 an optional parameter so that showRenderTree
1547 // can be called from gdb easily. 1549 // can be called from gdb easily.
1548 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 1550 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
1549 1551
1550 #endif 1552 #endif
1551 1553
1552 #endif // RenderObject_h 1554 #endif // RenderObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698