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

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: Add a complex-subtree-update test 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 LayoutRect bounds; 108 LayoutRect bounds;
109 bool draggable; 109 bool draggable;
110 }; 110 };
111 111
112 typedef WTF::HashMap<const DeprecatedPaintLayer*, Vector<LayoutRect>> LayerHitTe stRects; 112 typedef WTF::HashMap<const DeprecatedPaintLayer*, Vector<LayoutRect>> LayerHitTe stRects;
113 113
114 #ifndef NDEBUG 114 #ifndef NDEBUG
115 const int showTreeCharacterOffset = 39; 115 const int showTreeCharacterOffset = 39;
116 #endif 116 #endif
117 117
118 class NonLayoutObjectDisplayItemClientWrapper : public DisplayItemClientWrapper {
119 public:
120 template <typename T>
121 NonLayoutObjectDisplayItemClientWrapper(const T& client)
122 : DisplayItemClientWrapper(client) { }
123
124 NonLayoutObjectDisplayItemClientWrapper(const LayoutObject&) = delete;
125 };
126
118 // Base class for all layout tree objects. 127 // Base class for all layout tree objects.
119 class CORE_EXPORT LayoutObject : public ImageResourceClient { 128 class CORE_EXPORT LayoutObject : public ImageResourceClient {
120 friend class LayoutBlock; 129 friend class LayoutBlock;
121 friend class LayoutBlockFlow; 130 friend class LayoutBlockFlow;
122 friend class DeprecatedPaintLayerReflectionInfo; // For setParent 131 friend class DeprecatedPaintLayerReflectionInfo; // For setParent
123 friend class DeprecatedPaintLayerScrollableArea; // For setParent. 132 friend class DeprecatedPaintLayerScrollableArea; // For setParent.
124 friend class LayoutObjectChildList; 133 friend class LayoutObjectChildList;
125 WTF_MAKE_NONCOPYABLE(LayoutObject); 134 WTF_MAKE_NONCOPYABLE(LayoutObject);
126 public: 135 public:
127 // Anonymous objects should pass the document as their node, and they will t hen automatically be 136 // Anonymous objects should pass the document as their node, and they will t hen automatically be
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 858
850 // Returns the rect bounds needed to invalidate the paint of this object, in the coordinate space of the layoutObject backing of |paintInvalidationContainer | 859 // Returns the rect bounds needed to invalidate the paint of this object, in the coordinate space of the layoutObject backing of |paintInvalidationContainer |
851 LayoutRect boundsRectForPaintInvalidation(const LayoutBoxModelObject* paintI nvalidationContainer, const PaintInvalidationState* = nullptr) const; 860 LayoutRect boundsRectForPaintInvalidation(const LayoutBoxModelObject* paintI nvalidationContainer, const PaintInvalidationState* = nullptr) const;
852 861
853 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space 862 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space
854 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t his coordinaten space is not the same 863 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t his coordinaten space is not the same
855 // as the local coordinate space of |paintInvalidationContainer| in the pres ence of layer squashing. 864 // as the local coordinate space of |paintInvalidationContainer| in the pres ence of layer squashing.
856 void invalidatePaintUsingContainer(const LayoutBoxModelObject& paintInvalida tionContainer, const LayoutRect&, PaintInvalidationReason) const; 865 void invalidatePaintUsingContainer(const LayoutBoxModelObject& paintInvalida tionContainer, const LayoutRect&, PaintInvalidationReason) const;
857 866
858 // Invalidate the paint of a specific subrectangle within a given object. Th e rect |r| is in the object's coordinate space. 867 // Invalidate the paint of a specific subrectangle within a given object. Th e rect |r| is in the object's coordinate space.
859 void invalidatePaintRectangle(const LayoutRect&) const; 868 void invalidatePaintRectangle(const LayoutRect&);
860 void invalidatePaintRectangleNotInvalidatingDisplayItemClients(const LayoutR ect& r) const { invalidatePaintRectangleInternal(r); } 869 void invalidatePaintRectangleNotInvalidatingDisplayItemClients(const LayoutR ect& r) { invalidatePaintRectangleInternal(r); }
861 870
862 // 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. 871 // 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.
863 virtual void invalidateTreeIfNeeded(PaintInvalidationState&); 872 virtual void invalidateTreeIfNeeded(PaintInvalidationState&);
864 873
865 virtual void invalidatePaintForOverflow(); 874 virtual void invalidatePaintForOverflow();
866 void invalidatePaintForOverflowIfNeeded(); 875 void invalidatePaintForOverflowIfNeeded();
867 876
868 void invalidatePaintIncludingNonCompositingDescendants(); 877 void invalidatePaintIncludingNonCompositingDescendants();
869 void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); 878 void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants();
870 879
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 { 1045 {
1037 return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() || shouldInvalidateSelection() || m_bitfields.childShouldCheckForPaintInvalidation( ); 1046 return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() || shouldInvalidateSelection() || m_bitfields.childShouldCheckForPaintInvalidation( );
1038 } 1047 }
1039 1048
1040 virtual bool supportsPaintInvalidationStateCachedOffsets() const { return !h asTransformRelatedProperty() && !hasReflection() && !style()->isFlippedBlocksWri tingMode(); } 1049 virtual bool supportsPaintInvalidationStateCachedOffsets() const { return !h asTransformRelatedProperty() && !hasReflection() && !style()->isFlippedBlocksWri tingMode(); }
1041 1050
1042 virtual LayoutRect viewRect() const; 1051 virtual LayoutRect viewRect() const;
1043 1052
1044 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); } 1053 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); }
1045 1054
1046 void invalidateDisplayItemClient(const DisplayItemClientWrapper&) const; 1055 void invalidateDisplayItemClient(const NonLayoutObjectDisplayItemClientWrapp er&);
1047 void invalidateDisplayItemClientForNonCompositingDescendants() const { inval idateDisplayItemClientForNonCompositingDescendantsOf(*this); } 1056 void invalidateDisplayItemClient(LayoutObject&);
1057 void invalidateDisplayItemClientForNonCompositingDescendants() { invalidateD isplayItemClientForNonCompositingDescendantsOf(*this); }
1048 // A normal object should use invalidateDisplayItemClientForNonCompositingDe scendants() 1058 // A normal object should use invalidateDisplayItemClientForNonCompositingDe scendants()
1049 // to invalidate its descendants which are painted on the same backing. Howe ver, for 1059 // to invalidate its descendants which are painted on the same backing. Howe ver, for
1050 // an object (e.g. LayoutScrollbarPart, custom scroll corner, custom resizer ) which is 1060 // an object (e.g. LayoutScrollbarPart, custom scroll corner, custom resizer ) which is
1051 // not hooked up in the layout tree and not able to find its paint backing, it should 1061 // not hooked up in the layout tree and not able to find its paint backing, it should
1052 // let its owning layout object call the following function. 1062 // let its owning layout object call the following function.
1053 // FIXME: should we hook up scrollbar parts in the layout tree? crbug.com/48 4263. 1063 // FIXME: should we hook up scrollbar parts in the layout tree? crbug.com/48 4263.
1054 void invalidateDisplayItemClientForNonCompositingDescendantsOf(const LayoutO bject&) const; 1064 void invalidateDisplayItemClientForNonCompositingDescendantsOf(LayoutObject& );
1065
1066 // Slimming paint v2 tracks whether a LayoutObject is invalid instead of usi ng invalidation rects.
1067 // For more information, see: https://docs.google.com/a/chromium.org/documen t/d/1FTqk3MwUAS1qLJsnA9zgfDbeqAQBdLYC4GJ9jpN-xdA
1068 bool selfNeedsRepaint() const { return m_bitfields.selfNeedsRepaint(); }
1069 void setNeedsRepaint();
1070 bool childNeedsRepaint() const { return m_bitfields.childNeedsRepaint(); }
1071 bool shouldCheckForRepaint() const { return selfNeedsRepaint() || childNeeds Repaint(); }
1072
1073 void clearRepaintFlagsRecursively();
1055 1074
1056 protected: 1075 protected:
1057 enum LayoutObjectType { 1076 enum LayoutObjectType {
1058 LayoutObjectBr, 1077 LayoutObjectBr,
1059 LayoutObjectCanvas, 1078 LayoutObjectCanvas,
1060 LayoutObjectFieldset, 1079 LayoutObjectFieldset,
1061 LayoutObjectCounter, 1080 LayoutObjectCounter,
1062 LayoutObjectDetailsMarker, 1081 LayoutObjectDetailsMarker,
1063 LayoutObjectEmbeddedObject, 1082 LayoutObjectEmbeddedObject,
1064 LayoutObjectFileUploadControl, 1083 LayoutObjectFileUploadControl,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 } 1191 }
1173 #endif 1192 #endif
1174 1193
1175 virtual void invalidatePaintOfSubtreesIfNeeded(PaintInvalidationState& child PaintInvalidationState); 1194 virtual void invalidatePaintOfSubtreesIfNeeded(PaintInvalidationState& child PaintInvalidationState);
1176 virtual PaintInvalidationReason invalidatePaintIfNeeded(PaintInvalidationSta te&, const LayoutBoxModelObject& paintInvalidationContainer); 1195 virtual PaintInvalidationReason invalidatePaintIfNeeded(PaintInvalidationSta te&, const LayoutBoxModelObject& paintInvalidationContainer);
1177 1196
1178 // When this object is invalidated for paint, this method is called to inval idate any DisplayItemClients 1197 // When this object is invalidated for paint, this method is called to inval idate any DisplayItemClients
1179 // owned by this object, including the object itself, LayoutText/LayoutInlin e line boxes, etc., 1198 // owned by this object, including the object itself, LayoutText/LayoutInlin e line boxes, etc.,
1180 // not including children which will be invalidated normally during invalida teTreeIfNeeded() and 1199 // not including children which will be invalidated normally during invalida teTreeIfNeeded() and
1181 // parts which are invalidated separately (e.g. scrollbars). 1200 // parts which are invalidated separately (e.g. scrollbars).
1182 virtual void invalidateDisplayItemClients(const LayoutBoxModelObject& paintI nvalidationContainer) const; 1201 virtual void invalidateDisplayItemClients(const LayoutBoxModelObject& paintI nvalidationContainer);
1202
1203 virtual void clearRepaintFlagsOfSubtrees();
1183 1204
1184 void setIsSlowRepaintObject(bool); 1205 void setIsSlowRepaintObject(bool);
1185 1206
1186 private: 1207 private:
1187 const LayoutRect& previousPaintInvalidationRect() const { return m_previousP aintInvalidationRect; } 1208 const LayoutRect& previousPaintInvalidationRect() const { return m_previousP aintInvalidationRect; }
1188 1209
1189 // Adjusts a paint invalidation rect in the space of |m_previousPaintInvalid ationRect| and |m_previousPositionFromPaintInvalidationBacking| 1210 // Adjusts a paint invalidation rect in the space of |m_previousPaintInvalid ationRect| and |m_previousPositionFromPaintInvalidationBacking|
1190 // to be in the space of the |paintInvalidationContainer|, 1211 // to be in the space of the |paintInvalidationContainer|,
1191 // if needed. They can be different only if |paintInvalidationContainer| is a composited scroller. 1212 // if needed. They can be different only if |paintInvalidationContainer| is a composited scroller.
1192 void adjustInvalidationRectForCompositedScrolling(LayoutRect&, const LayoutB oxModelObject& paintInvalidationContainer) const; 1213 void adjustInvalidationRectForCompositedScrolling(LayoutRect&, const LayoutB oxModelObject& paintInvalidationContainer) const;
(...skipping 10 matching lines...) Expand all
1203 void updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers ); 1224 void updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers );
1204 1225
1205 void setNeedsOverflowRecalcAfterStyleChange(); 1226 void setNeedsOverflowRecalcAfterStyleChange();
1206 1227
1207 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make LayoutBox 1228 // FIXME: This should be 'markContaingBoxChainForOverflowRecalc when we make LayoutBox
1208 // recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700. 1229 // recomputeOverflow-capable. crbug.com/437012 and crbug.com/434700.
1209 inline void markContainingBlocksForOverflowRecalc(); 1230 inline void markContainingBlocksForOverflowRecalc();
1210 1231
1211 inline void markContainerChainForPaintInvalidation(); 1232 inline void markContainerChainForPaintInvalidation();
1212 1233
1234 void markContainerChainForChildNeedsRepaint();
1235 void setChildNeedsRepaint();
1236
1213 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject&, PaintIn validationReason); 1237 inline void invalidateSelectionIfNeeded(const LayoutBoxModelObject&, PaintIn validationReason);
1214 1238
1215 inline void invalidateContainerPreferredLogicalWidths(); 1239 inline void invalidateContainerPreferredLogicalWidths();
1216 1240
1217 void invalidatePaintIncludingNonCompositingDescendantsInternal(const LayoutB oxModelObject& repaintContainer); 1241 void invalidatePaintIncludingNonCompositingDescendantsInternal(const LayoutB oxModelObject& repaintContainer);
1218 1242
1219 LayoutRect previousSelectionRectForPaintInvalidation() const; 1243 LayoutRect previousSelectionRectForPaintInvalidation() const;
1220 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&); 1244 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&);
1221 1245
1222 const LayoutBoxModelObject* enclosingCompositedContainer() const; 1246 const LayoutBoxModelObject* enclosingCompositedContainer() const;
(...skipping 10 matching lines...) Expand all
1233 void removeShapeImageClient(ShapeValue*); 1257 void removeShapeImageClient(ShapeValue*);
1234 1258
1235 #if ENABLE(ASSERT) 1259 #if ENABLE(ASSERT)
1236 void checkBlockPositionedObjectsNeedLayout(); 1260 void checkBlockPositionedObjectsNeedLayout();
1237 #endif 1261 #endif
1238 1262
1239 bool isTextOrSVGChild() const { return isText() || (isSVG() && !isSVGRoot()) ; } 1263 bool isTextOrSVGChild() const { return isText() || (isSVG() && !isSVGRoot()) ; }
1240 1264
1241 static bool isAllowedToModifyLayoutTreeStructure(Document&); 1265 static bool isAllowedToModifyLayoutTreeStructure(Document&);
1242 1266
1243 const LayoutBoxModelObject* invalidatePaintRectangleInternal(const LayoutRec t&) const; 1267 const LayoutBoxModelObject* invalidatePaintRectangleInternal(const LayoutRec t&);
1268
1269 void invalidateDisplayItemClientInternal(const DisplayItemClientWrapper&);
1244 1270
1245 RefPtr<ComputedStyle> m_style; 1271 RefPtr<ComputedStyle> m_style;
1246 1272
1247 // Oilpan: raw pointer back to the owning Node is considered safe. 1273 // Oilpan: raw pointer back to the owning Node is considered safe.
1248 GC_PLUGIN_IGNORE("http://crbug.com/509911") 1274 GC_PLUGIN_IGNORE("http://crbug.com/509911")
1249 Node* m_node; 1275 Node* m_node;
1250 1276
1251 LayoutObject* m_parent; 1277 LayoutObject* m_parent;
1252 LayoutObject* m_previous; 1278 LayoutObject* m_previous;
1253 LayoutObject* m_next; 1279 LayoutObject* m_next;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 , m_ancestorLineBoxDirty(false) 1330 , m_ancestorLineBoxDirty(false)
1305 , m_hasPendingResourceUpdate(false) 1331 , m_hasPendingResourceUpdate(false)
1306 , m_isInsideFlowThread(false) 1332 , m_isInsideFlowThread(false)
1307 , m_subtreeChangeListenerRegistered(false) 1333 , m_subtreeChangeListenerRegistered(false)
1308 , m_notifiedOfSubtreeChange(false) 1334 , m_notifiedOfSubtreeChange(false)
1309 , m_consumesSubtreeChangeNotification(false) 1335 , m_consumesSubtreeChangeNotification(false)
1310 , m_childrenInline(false) 1336 , m_childrenInline(false)
1311 , m_alwaysCreateLineBoxesForLayoutInline(false) 1337 , m_alwaysCreateLineBoxesForLayoutInline(false)
1312 , m_lastBoxDecorationBackgroundObscured(false) 1338 , m_lastBoxDecorationBackgroundObscured(false)
1313 , m_isSlowRepaintObject(false) 1339 , m_isSlowRepaintObject(false)
1340 , m_selfNeedsRepaint(false)
1341 , m_childNeedsRepaint(false)
1314 , m_positionedState(IsStaticallyPositioned) 1342 , m_positionedState(IsStaticallyPositioned)
1315 , m_selectionState(SelectionNone) 1343 , m_selectionState(SelectionNone)
1316 , m_boxDecorationBackgroundState(NoBoxDecorationBackground) 1344 , m_boxDecorationBackgroundState(NoBoxDecorationBackground)
1317 , m_fullPaintInvalidationReason(PaintInvalidationNone) 1345 , m_fullPaintInvalidationReason(PaintInvalidationNone)
1318 { 1346 {
1319 } 1347 }
1320 1348
1321 // 32 bits have been used in the first word, and 16 in the second. 1349 // 32 bits have been used in the first word, and 18 in the second.
1322 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout); 1350 ADD_BOOLEAN_BITFIELD(selfNeedsLayout, SelfNeedsLayout);
1323 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO verflowForPaint); // TODO(wangxianzhu): Remove for slimming paint v2. 1351 ADD_BOOLEAN_BITFIELD(shouldInvalidateOverflowForPaint, ShouldInvalidateO verflowForPaint); // TODO(wangxianzhu): Remove for slimming paint v2.
1324 ADD_BOOLEAN_BITFIELD(childShouldCheckForPaintInvalidation, ChildShouldCh eckForPaintInvalidation); 1352 ADD_BOOLEAN_BITFIELD(childShouldCheckForPaintInvalidation, ChildShouldCh eckForPaintInvalidation);
1325 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation) ; 1353 ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation) ;
1326 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelectio n); // TODO(wangxianzhu): Remove for slimming paint v2. 1354 ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelectio n); // TODO(wangxianzhu): Remove for slimming paint v2.
1327 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO fChildren); // TODO(wangxianzhu): Remove for slimming paint v2. 1355 ADD_BOOLEAN_BITFIELD(neededLayoutBecauseOfChildren, NeededLayoutBecauseO fChildren); // TODO(wangxianzhu): Remove for slimming paint v2.
1328 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem entLayout); 1356 ADD_BOOLEAN_BITFIELD(needsPositionedMovementLayout, NeedsPositionedMovem entLayout);
1329 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout); 1357 ADD_BOOLEAN_BITFIELD(normalChildNeedsLayout, NormalChildNeedsLayout);
1330 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout); 1358 ADD_BOOLEAN_BITFIELD(posChildNeedsLayout, PosChildNeedsLayout);
1331 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor malFlowLayout); 1359 ADD_BOOLEAN_BITFIELD(needsSimplifiedNormalFlowLayout, NeedsSimplifiedNor malFlowLayout);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline); 1391 ADD_BOOLEAN_BITFIELD(childrenInline, ChildrenInline);
1364 1392
1365 // from LayoutInline 1393 // from LayoutInline
1366 ADD_BOOLEAN_BITFIELD(alwaysCreateLineBoxesForLayoutInline, AlwaysCreateL ineBoxesForLayoutInline); 1394 ADD_BOOLEAN_BITFIELD(alwaysCreateLineBoxesForLayoutInline, AlwaysCreateL ineBoxesForLayoutInline);
1367 1395
1368 // For slimming-paint. 1396 // For slimming-paint.
1369 ADD_BOOLEAN_BITFIELD(lastBoxDecorationBackgroundObscured, LastBoxDecorat ionBackgroundObscured); 1397 ADD_BOOLEAN_BITFIELD(lastBoxDecorationBackgroundObscured, LastBoxDecorat ionBackgroundObscured);
1370 1398
1371 ADD_BOOLEAN_BITFIELD(isSlowRepaintObject, IsSlowRepaintObject); 1399 ADD_BOOLEAN_BITFIELD(isSlowRepaintObject, IsSlowRepaintObject);
1372 1400
1401 // For slimming-paint v2.
1402 // TODO(wangxianzhu): Combine repaint flags with paint invalidation flag s when we remove
1403 // old paint invalidation code.
1404 ADD_BOOLEAN_BITFIELD(selfNeedsRepaint, SelfNeedsRepaint);
1405 ADD_BOOLEAN_BITFIELD(childNeedsRepaint, ChildNeedsRepaint);
1406
1373 private: 1407 private:
1374 unsigned m_positionedState : 2; // PositionedState 1408 unsigned m_positionedState : 2; // PositionedState
1375 unsigned m_selectionState : 3; // SelectionState 1409 unsigned m_selectionState : 3; // SelectionState
1376 unsigned m_boxDecorationBackgroundState : 2; // BoxDecorationBackgroundS tate 1410 unsigned m_boxDecorationBackgroundState : 2; // BoxDecorationBackgroundS tate
1377 unsigned m_fullPaintInvalidationReason : 5; // PaintInvalidationReason 1411 unsigned m_fullPaintInvalidationReason : 5; // PaintInvalidationReason
1378 1412
1379 public: 1413 public:
1380 bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOf FlowPositioned; } 1414 bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOf FlowPositioned; }
1381 bool isRelPositioned() const { return m_positionedState == IsRelativelyP ositioned; } 1415 bool isRelPositioned() const { return m_positionedState == IsRelativelyP ositioned; }
1382 bool isStickyPositioned() const { return m_positionedState == IsStickyPo sitioned; } 1416 bool isStickyPositioned() const { return m_positionedState == IsStickyPo sitioned; }
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 void showTree(const blink::LayoutObject*); 1690 void showTree(const blink::LayoutObject*);
1657 void showLineTree(const blink::LayoutObject*); 1691 void showLineTree(const blink::LayoutObject*);
1658 void showLayoutTree(const blink::LayoutObject* object1); 1692 void showLayoutTree(const blink::LayoutObject* object1);
1659 // We don't make object2 an optional parameter so that showLayoutTree 1693 // We don't make object2 an optional parameter so that showLayoutTree
1660 // can be called from gdb easily. 1694 // can be called from gdb easily.
1661 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 1695 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
1662 1696
1663 #endif 1697 #endif
1664 1698
1665 #endif // LayoutObject_h 1699 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698