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

Side by Side Diff: Source/core/layout/LayoutObject.h

Issue 1294233004: Subtree caching implementation in blink-core (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: s/setSelfNeedsRepaint/setNeedsRepaint/ Created 5 years, 4 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 LayoutRect bounds; 110 LayoutRect bounds;
111 bool draggable; 111 bool draggable;
112 }; 112 };
113 113
114 typedef WTF::HashMap<const DeprecatedPaintLayer*, Vector<LayoutRect>> LayerHitTe stRects; 114 typedef WTF::HashMap<const DeprecatedPaintLayer*, Vector<LayoutRect>> LayerHitTe stRects;
115 115
116 #ifndef NDEBUG 116 #ifndef NDEBUG
117 const int showTreeCharacterOffset = 39; 117 const int showTreeCharacterOffset = 39;
118 #endif 118 #endif
119 119
120 class NonLayoutObjectDisplayItemClientWrapper : public DisplayItemClientWrapper {
pdr. 2015/08/20 22:45:05 I'd prefer not to add this, but it may be needed.
Xianzhu 2015/08/21 00:31:38 In next steps, I'll try to decouple setting of rep
trchen 2015/08/21 00:37:29 It doesn't seem that it is used in this CL. Shall
Xianzhu 2015/08/21 04:54:51 Currently non-LayoutObject clients depend on Displ
121 public:
122 template <typename T>
123 NonLayoutObjectDisplayItemClientWrapper(const T& client)
124 : DisplayItemClientWrapper(client) { }
125
126 NonLayoutObjectDisplayItemClientWrapper(const LayoutObject&) = delete;
127 };
128
120 // Base class for all layout tree objects. 129 // Base class for all layout tree objects.
121 class CORE_EXPORT LayoutObject : public ImageResourceClient { 130 class CORE_EXPORT LayoutObject : public ImageResourceClient {
122 friend class LayoutBlock; 131 friend class LayoutBlock;
123 friend class LayoutBlockFlow; 132 friend class LayoutBlockFlow;
124 friend class DeprecatedPaintLayerReflectionInfo; // For setParent 133 friend class DeprecatedPaintLayerReflectionInfo; // For setParent
125 friend class DeprecatedPaintLayerScrollableArea; // For setParent. 134 friend class DeprecatedPaintLayerScrollableArea; // For setParent.
126 friend class LayoutObjectChildList; 135 friend class LayoutObjectChildList;
127 WTF_MAKE_NONCOPYABLE(LayoutObject); 136 WTF_MAKE_NONCOPYABLE(LayoutObject);
128 public: 137 public:
129 // Anonymous objects should pass the document as their node, and they will t hen automatically be 138 // Anonymous objects should pass the document as their node, and they will t hen automatically be
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 859
851 // Returns the rect bounds needed to invalidate the paint of this object, in the coordinate space of the layoutObject backing of |paintInvalidationContainer | 860 // Returns the rect bounds needed to invalidate the paint of this object, in the coordinate space of the layoutObject backing of |paintInvalidationContainer |
852 LayoutRect boundsRectForPaintInvalidation(const LayoutBoxModelObject* paintI nvalidationContainer, const PaintInvalidationState* = nullptr) const; 861 LayoutRect boundsRectForPaintInvalidation(const LayoutBoxModelObject* paintI nvalidationContainer, const PaintInvalidationState* = nullptr) const;
853 862
854 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space 863 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space
855 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t his coordinaten space is not the same 864 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t his coordinaten space is not the same
856 // as the local coordinate space of |paintInvalidationContainer| in the pres ence of layer squashing. 865 // as the local coordinate space of |paintInvalidationContainer| in the pres ence of layer squashing.
857 void invalidatePaintUsingContainer(const LayoutBoxModelObject& paintInvalida tionContainer, const LayoutRect&, PaintInvalidationReason) const; 866 void invalidatePaintUsingContainer(const LayoutBoxModelObject& paintInvalida tionContainer, const LayoutRect&, PaintInvalidationReason) const;
858 867
859 // Invalidate the paint of a specific subrectangle within a given object. Th e rect |r| is in the object's coordinate space. 868 // Invalidate the paint of a specific subrectangle within a given object. Th e rect |r| is in the object's coordinate space.
860 void invalidatePaintRectangle(const LayoutRect&) const; 869 void invalidatePaintRectangle(const LayoutRect&);
861 void invalidatePaintRectangleNotInvalidatingDisplayItemClients(const LayoutR ect& r) const { invalidatePaintRectangleInternal(r); } 870 void invalidatePaintRectangleNotInvalidatingDisplayItemClients(const LayoutR ect& r) { invalidatePaintRectangleInternal(r); }
862 871
863 // Walk the tree after layout issuing paint invalidations for layoutObjects that have changed or moved, updating bounds that have changed, and clearing pain t invalidation state. 872 // Walk the tree after layout issuing paint invalidations for layoutObjects that have changed or moved, updating bounds that have changed, and clearing pain t invalidation state.
864 virtual void invalidateTreeIfNeeded(PaintInvalidationState&); 873 virtual void invalidateTreeIfNeeded(PaintInvalidationState&);
865 874
866 virtual void invalidatePaintForOverflow(); 875 virtual void invalidatePaintForOverflow();
867 void invalidatePaintForOverflowIfNeeded(); 876 void invalidatePaintForOverflowIfNeeded();
868 877
869 void invalidatePaintIncludingNonCompositingDescendants(); 878 void invalidatePaintIncludingNonCompositingDescendants();
870 void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); 879 void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants();
871 880
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 { 1053 {
1045 return layoutDidGetCalledSinceLastFrame() || mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() || shouldInvalidateSelection(); 1054 return layoutDidGetCalledSinceLastFrame() || mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() || shouldInvalidateSelection();
1046 } 1055 }
1047 1056
1048 virtual bool supportsPaintInvalidationStateCachedOffsets() const { return !h asTransformRelatedProperty() && !hasReflection() && !style()->isFlippedBlocksWri tingMode(); } 1057 virtual bool supportsPaintInvalidationStateCachedOffsets() const { return !h asTransformRelatedProperty() && !hasReflection() && !style()->isFlippedBlocksWri tingMode(); }
1049 1058
1050 virtual LayoutRect viewRect() const; 1059 virtual LayoutRect viewRect() const;
1051 1060
1052 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); } 1061 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); }
1053 1062
1054 void invalidateDisplayItemClient(const DisplayItemClientWrapper&) const; 1063 void invalidateDisplayItemClient(const NonLayoutObjectDisplayItemClientWrapp er&);
1055 void invalidateDisplayItemClientForNonCompositingDescendants() const { inval idateDisplayItemClientForNonCompositingDescendantsOf(*this); } 1064 void invalidateDisplayItemClient(LayoutObject&);
1065 void invalidateDisplayItemClientForNonCompositingDescendants() { invalidateD isplayItemClientForNonCompositingDescendantsOf(*this); }
1056 // A normal object should use invalidateDisplayItemClientForNonCompositingDe scendants() 1066 // A normal object should use invalidateDisplayItemClientForNonCompositingDe scendants()
1057 // to invalidate its descendants which are painted on the same backing. Howe ver, for 1067 // to invalidate its descendants which are painted on the same backing. Howe ver, for
1058 // an object (e.g. LayoutScrollbarPart, custom scroll corner, custom resizer ) which is 1068 // an object (e.g. LayoutScrollbarPart, custom scroll corner, custom resizer ) which is
1059 // not hooked up in the layout tree and not able to find its paint backing, it should 1069 // not hooked up in the layout tree and not able to find its paint backing, it should
1060 // let its owning layout object call the following function. 1070 // let its owning layout object call the following function.
1061 // FIXME: should we hook up scrollbar parts in the layout tree? crbug.com/48 4263. 1071 // FIXME: should we hook up scrollbar parts in the layout tree? crbug.com/48 4263.
1062 void invalidateDisplayItemClientForNonCompositingDescendantsOf(const LayoutO bject&) const; 1072 void invalidateDisplayItemClientForNonCompositingDescendantsOf(LayoutObject& );
1073
1074 bool selfNeedsRepaint() const { return m_bitfields.selfNeedsRepaint(); }
pdr. 2015/08/20 22:45:05 Can you add a comment here explaining this a bit?
Xianzhu 2015/08/21 00:31:38 Done.
1075 void setNeedsRepaint();
1076 bool childNeedsRepaint() const { return m_bitfields.childNeedsRepaint(); }
1077 bool shouldCheckForRepaint() const { return selfNeedsRepaint() || childNeeds Repaint(); }
1078
1079 // Returns true if all repaint flags of the subtree are cleared.
1080 bool clearRepaintFlagsRecursively();
trchen 2015/08/21 00:37:29 In this CL it seems the return value will always b
Xianzhu 2015/08/21 04:54:51 Will remove the return value first.
Xianzhu 2015/08/21 05:52:45 Done.
1063 1081
1064 protected: 1082 protected:
1065 enum LayoutObjectType { 1083 enum LayoutObjectType {
1066 LayoutObjectBr, 1084 LayoutObjectBr,
1067 LayoutObjectCanvas, 1085 LayoutObjectCanvas,
1068 LayoutObjectFieldset, 1086 LayoutObjectFieldset,
1069 LayoutObjectCounter, 1087 LayoutObjectCounter,
1070 LayoutObjectDetailsMarker, 1088 LayoutObjectDetailsMarker,
1071 LayoutObjectEmbeddedObject, 1089 LayoutObjectEmbeddedObject,
1072 LayoutObjectFileUploadControl, 1090 LayoutObjectFileUploadControl,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 } 1200 }
1183 #endif 1201 #endif
1184 1202
1185 virtual void invalidatePaintOfSubtreesIfNeeded(PaintInvalidationState& child PaintInvalidationState); 1203 virtual void invalidatePaintOfSubtreesIfNeeded(PaintInvalidationState& child PaintInvalidationState);
1186 virtual PaintInvalidationReason invalidatePaintIfNeeded(PaintInvalidationSta te&, const LayoutBoxModelObject& paintInvalidationContainer); 1204 virtual PaintInvalidationReason invalidatePaintIfNeeded(PaintInvalidationSta te&, const LayoutBoxModelObject& paintInvalidationContainer);
1187 1205
1188 // When this object is invalidated for paint, this method is called to inval idate any DisplayItemClients 1206 // When this object is invalidated for paint, this method is called to inval idate any DisplayItemClients
1189 // owned by this object, including the object itself, LayoutText/LayoutInlin e line boxes, etc., 1207 // owned by this object, including the object itself, LayoutText/LayoutInlin e line boxes, etc.,
1190 // not including children which will be invalidated normally during invalida teTreeIfNeeded() and 1208 // not including children which will be invalidated normally during invalida teTreeIfNeeded() and
1191 // parts which are invalidated separately (e.g. scrollbars). 1209 // parts which are invalidated separately (e.g. scrollbars).
1192 virtual void invalidateDisplayItemClients(const LayoutBoxModelObject& paintI nvalidationContainer) const; 1210 virtual void invalidateDisplayItemClients(const LayoutBoxModelObject& paintI nvalidationContainer);
1211
1212 virtual bool clearRepaintFlagsOfSubtrees();
1193 1213
1194 void setIsSlowRepaintObject(bool); 1214 void setIsSlowRepaintObject(bool);
1195 1215
1196 private: 1216 private:
1197 const LayoutRect& previousPaintInvalidationRect() const { return m_previousP aintInvalidationRect; } 1217 const LayoutRect& previousPaintInvalidationRect() const { return m_previousP aintInvalidationRect; }
1198 1218
1199 // Adjusts a paint invalidation rect in the space of |m_previousPaintInvalid ationRect| and |m_previousPositionFromPaintInvalidationBacking| 1219 // Adjusts a paint invalidation rect in the space of |m_previousPaintInvalid ationRect| and |m_previousPositionFromPaintInvalidationBacking|
1200 // to be in the space of the |paintInvalidationContainer|, 1220 // to be in the space of the |paintInvalidationContainer|,
1201 // if needed. They can be different only if |paintInvalidationContainer| is a composited scroller. 1221 // if needed. They can be different only if |paintInvalidationContainer| is a composited scroller.
1202 void adjustInvalidationRectForCompositedScrolling(LayoutRect&, const LayoutB oxModelObject& paintInvalidationContainer) const; 1222 void adjustInvalidationRectForCompositedScrolling(LayoutRect&, const LayoutB oxModelObject& paintInvalidationContainer) const;
(...skipping 10 matching lines...) Expand all
1213 void updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers ); 1233 void updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers );
1214 1234
1215 void setNeedsOverflowRecalcAfterStyleChange(); 1235 void setNeedsOverflowRecalcAfterStyleChange();
1216 1236
1217 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make LayoutBox 1237 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make LayoutBox
1218 // recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700. 1238 // recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700.
1219 inline void markContainingBlocksForOverflowRecalc(); 1239 inline void markContainingBlocksForOverflowRecalc();
1220 1240
1221 inline void markContainerChainForPaintInvalidation(); 1241 inline void markContainerChainForPaintInvalidation();
1222 1242
1243 void markContainerChainForRepaint();
1244 void setChildNeedsRepaint();
1245
1223 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject&, PaintIn validationReason); 1246 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject&, PaintIn validationReason);
1224 1247
1225 inline void invalidateContainerPreferredLogicalWidths(); 1248 inline void invalidateContainerPreferredLogicalWidths();
1226 1249
1227 void clearMayNeedPaintInvalidation(); 1250 void clearMayNeedPaintInvalidation();
1228 1251
1229 void setLayoutDidGetCalledSinceLastFrame(); 1252 void setLayoutDidGetCalledSinceLastFrame();
1230 void clearLayoutDidGetCalledSinceLastFrame() { m_bitfields.setLayoutDidGetCa lledSinceLastFrame(false); } 1253 void clearLayoutDidGetCalledSinceLastFrame() { m_bitfields.setLayoutDidGetCa lledSinceLastFrame(false); }
1231 1254
1232 void invalidatePaintIncludingNonCompositingDescendantsInternal(const LayoutB oxModelObject& repaintContainer); 1255 void invalidatePaintIncludingNonCompositingDescendantsInternal(const LayoutB oxModelObject& repaintContainer);
(...skipping 15 matching lines...) Expand all
1248 void removeShapeImageClient(ShapeValue*); 1271 void removeShapeImageClient(ShapeValue*);
1249 1272
1250 #if ENABLE(ASSERT) 1273 #if ENABLE(ASSERT)
1251 void checkBlockPositionedObjectsNeedLayout(); 1274 void checkBlockPositionedObjectsNeedLayout();
1252 #endif 1275 #endif
1253 1276
1254 bool isTextOrSVGChild() const { return isText() || (isSVG() && !isSVGRoot()) ; } 1277 bool isTextOrSVGChild() const { return isText() || (isSVG() && !isSVGRoot()) ; }
1255 1278
1256 static bool isAllowedToModifyLayoutTreeStructure(Document&); 1279 static bool isAllowedToModifyLayoutTreeStructure(Document&);
1257 1280
1258 const LayoutBoxModelObject* invalidatePaintRectangleInternal(const LayoutRec t&) const; 1281 const LayoutBoxModelObject* invalidatePaintRectangleInternal(const LayoutRec t&);
1282
1283 void invalidateDisplayItemClientInternal(const DisplayItemClientWrapper&);
1259 1284
1260 RefPtr<ComputedStyle> m_style; 1285 RefPtr<ComputedStyle> m_style;
1261 1286
1262 // Oilpan: raw pointer back to the owning Node is considered safe. 1287 // Oilpan: raw pointer back to the owning Node is considered safe.
1263 GC_PLUGIN_IGNORE("http://crbug.com/509911") 1288 GC_PLUGIN_IGNORE("http://crbug.com/509911")
1264 Node* m_node; 1289 Node* m_node;
1265 1290
1266 LayoutObject* m_parent; 1291 LayoutObject* m_parent;
1267 LayoutObject* m_previous; 1292 LayoutObject* m_previous;
1268 LayoutObject* m_next; 1293 LayoutObject* m_next;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 , m_layoutDidGetCalledSinceLastFrame(false) 1346 , m_layoutDidGetCalledSinceLastFrame(false)
1322 , m_hasPendingResourceUpdate(false) 1347 , m_hasPendingResourceUpdate(false)
1323 , m_isInsideFlowThread(false) 1348 , m_isInsideFlowThread(false)
1324 , m_subtreeChangeListenerRegistered(false) 1349 , m_subtreeChangeListenerRegistered(false)
1325 , m_notifiedOfSubtreeChange(false) 1350 , m_notifiedOfSubtreeChange(false)
1326 , m_consumesSubtreeChangeNotification(false) 1351 , m_consumesSubtreeChangeNotification(false)
1327 , m_childrenInline(false) 1352 , m_childrenInline(false)
1328 , m_alwaysCreateLineBoxesForLayoutInline(false) 1353 , m_alwaysCreateLineBoxesForLayoutInline(false)
1329 , m_lastBoxDecorationBackgroundObscured(false) 1354 , m_lastBoxDecorationBackgroundObscured(false)
1330 , m_isSlowRepaintObject(false) 1355 , m_isSlowRepaintObject(false)
1356 , m_selfNeedsRepaint(false)
1357 , m_childNeedsRepaint(false)
1331 , m_positionedState(IsStaticallyPositioned) 1358 , m_positionedState(IsStaticallyPositioned)
1332 , m_selectionState(SelectionNone) 1359 , m_selectionState(SelectionNone)
1333 , m_boxDecorationBackgroundState(NoBoxDecorationBackground) 1360 , m_boxDecorationBackgroundState(NoBoxDecorationBackground)
1334 , m_fullPaintInvalidationReason(PaintInvalidationNone) 1361 , m_fullPaintInvalidationReason(PaintInvalidationNone)
1335 { 1362 {
1336 } 1363 }
1337 1364
1338 // 32 bits have been used in the first word, and 16 in the second. 1365 // 32 bits have been used in the first word, and 18 in the second.
1339 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); 1366 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout);
1340 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO verflowForPaint); 1367 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO verflowForPaint);
1341 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation) ; 1368 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation) ;
1342 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelectio n); 1369 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelectio n);
1343 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO fChildren); 1370 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO fChildren);
1344 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem entLayout); 1371 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem entLayout);
1345 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); 1372 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout);
1346 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout); 1373 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout);
1347 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor malFlowLayout); 1374 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor malFlowLayout);
1348 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty); 1375 ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty, PreferredLogicalWidths Dirty);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline); 1408 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline);
1382 1409
1383 // from LayoutInline 1410 // from LayoutInline
1384 ADD_BOOLEAN_BITFIELD(alwaysCreateLineBoxesForLayoutInline, AlwaysCreateL ineBoxesForLayoutInline); 1411 ADD_BOOLEAN_BITFIELD(alwaysCreateLineBoxesForLayoutInline, AlwaysCreateL ineBoxesForLayoutInline);
1385 1412
1386 // For slimming-paint. 1413 // For slimming-paint.
1387 ADD_BOOLEAN_BITFIELD(lastBoxDecorationBackgroundObscured, LastBoxDecorat ionBackgroundObscured); 1414 ADD_BOOLEAN_BITFIELD(lastBoxDecorationBackgroundObscured, LastBoxDecorat ionBackgroundObscured);
1388 1415
1389 ADD_BOOLEAN_BITFIELD(isSlowRepaintObject, IsSlowRepaintObject); 1416 ADD_BOOLEAN_BITFIELD(isSlowRepaintObject, IsSlowRepaintObject);
1390 1417
1418 // For slimming-paint v2.
1419 // TODO(wangxianzhu): Combine repaint flags with paint invalidation flag s when we remove
1420 // old paint invalidation code.
1421 ADD_BOOLEAN_BITFIELD(selfNeedsRepaint, SelfNeedsRepaint);
1422 ADD_BOOLEAN_BITFIELD(childNeedsRepaint, ChildNeedsRepaint);
1423
1391 private: 1424 private:
1392 unsigned m_positionedState : 2; // PositionedState 1425 unsigned m_positionedState : 2; // PositionedState
1393 unsigned m_selectionState : 3; // SelectionState 1426 unsigned m_selectionState : 3; // SelectionState
1394 unsigned m_boxDecorationBackgroundState : 2; // BoxDecorationBackgroundS tate 1427 unsigned m_boxDecorationBackgroundState : 2; // BoxDecorationBackgroundS tate
1395 unsigned m_fullPaintInvalidationReason : 5; // PaintInvalidationReason 1428 unsigned m_fullPaintInvalidationReason : 5; // PaintInvalidationReason
1396 1429
1397 public: 1430 public:
1398 bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOf FlowPositioned; } 1431 bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOf FlowPositioned; }
1399 bool isRelPositioned() const { return m_positionedState == IsRelativelyP ositioned; } 1432 bool isRelPositioned() const { return m_positionedState == IsRelativelyP ositioned; }
1400 bool isStickyPositioned() const { return m_positionedState == IsStickyPo sitioned; } 1433 bool isStickyPositioned() const { return m_positionedState == IsStickyPo sitioned; }
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1670 void showTree(const blink::LayoutObject*); 1703 void showTree(const blink::LayoutObject*);
1671 void showLineTree(const blink::LayoutObject*); 1704 void showLineTree(const blink::LayoutObject*);
1672 void showLayoutTree(const blink::LayoutObject* object1); 1705 void showLayoutTree(const blink::LayoutObject* object1);
1673 // We don't make object2 an optional parameter so that showLayoutTree 1706 // We don't make object2 an optional parameter so that showLayoutTree
1674 // can be called from gdb easily. 1707 // can be called from gdb easily.
1675 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 1708 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
1676 1709
1677 #endif 1710 #endif
1678 1711
1679 #endif // LayoutObject_h 1712 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698