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

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

Issue 267053002: ASSERT on renderer lifecycle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 1095
1096 Color selectionColor(int colorProperty) const; 1096 Color selectionColor(int colorProperty) const;
1097 1097
1098 void removeShapeImageClient(ShapeValue*); 1098 void removeShapeImageClient(ShapeValue*);
1099 1099
1100 #ifndef NDEBUG 1100 #ifndef NDEBUG
1101 void checkBlockPositionedObjectsNeedLayout(); 1101 void checkBlockPositionedObjectsNeedLayout();
1102 #endif 1102 #endif
1103 const char* invalidationReasonToString(InvalidationReason) const; 1103 const char* invalidationReasonToString(InvalidationReason) const;
1104 1104
1105 static bool isAllowedToModifyRenderTreeStructure(Document&);
1106
1105 RefPtr<RenderStyle> m_style; 1107 RefPtr<RenderStyle> m_style;
1106 1108
1107 Node* m_node; 1109 Node* m_node;
1108 1110
1109 RenderObject* m_parent; 1111 RenderObject* m_parent;
1110 RenderObject* m_previous; 1112 RenderObject* m_previous;
1111 RenderObject* m_next; 1113 RenderObject* m_next;
1112 1114
1113 #ifndef NDEBUG 1115 #ifndef NDEBUG
1114 unsigned m_hasAXObject : 1; 1116 unsigned m_hasAXObject : 1;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 static bool s_affectsParentBlock; 1270 static bool s_affectsParentBlock;
1269 1271
1270 // This stores the repaint rect from the previous layout. 1272 // This stores the repaint rect from the previous layout.
1271 LayoutRect m_previousRepaintRect; 1273 LayoutRect m_previousRepaintRect;
1272 1274
1273 // This stores the position in the repaint container's coordinate. 1275 // This stores the position in the repaint container's coordinate.
1274 // It is used to detect renderer shifts that forces a full invalidation. 1276 // It is used to detect renderer shifts that forces a full invalidation.
1275 LayoutPoint m_previousPositionFromRepaintContainer; 1277 LayoutPoint m_previousPositionFromRepaintContainer;
1276 }; 1278 };
1277 1279
1280 // FIXME: remove this once the render object lifecycle ASSERTS are no longer hit .
1281 class DeprecatedDisableModifyRenderTreeStructureAsserts {
1282 WTF_MAKE_NONCOPYABLE(DeprecatedDisableModifyRenderTreeStructureAsserts);
1283 public:
1284 DeprecatedDisableModifyRenderTreeStructureAsserts();
1285
1286 static bool canModifyRenderTreeStateInAnyState();
1287
1288 private:
1289 TemporaryChange<bool> m_disabler;
1290 };
1291
1278 // Allow equality comparisons of RenderObject's by reference or pointer, interch angeably. 1292 // Allow equality comparisons of RenderObject's by reference or pointer, interch angeably.
1279 inline bool operator==(const RenderObject& a, const RenderObject& b) { return &a == &b; } 1293 inline bool operator==(const RenderObject& a, const RenderObject& b) { return &a == &b; }
1280 inline bool operator==(const RenderObject& a, const RenderObject* b) { return &a == b; } 1294 inline bool operator==(const RenderObject& a, const RenderObject* b) { return &a == b; }
1281 inline bool operator==(const RenderObject* a, const RenderObject& b) { return a == &b; } 1295 inline bool operator==(const RenderObject* a, const RenderObject& b) { return a == &b; }
1282 inline bool operator!=(const RenderObject& a, const RenderObject& b) { return !( a == b); } 1296 inline bool operator!=(const RenderObject& a, const RenderObject& b) { return !( a == b); }
1283 inline bool operator!=(const RenderObject& a, const RenderObject* b) { return !( a == b); } 1297 inline bool operator!=(const RenderObject& a, const RenderObject* b) { return !( a == b); }
1284 inline bool operator!=(const RenderObject* a, const RenderObject& b) { return !( a == b); } 1298 inline bool operator!=(const RenderObject* a, const RenderObject& b) { return !( a == b); }
1285 1299
1286 inline bool RenderObject::documentBeingDestroyed() const 1300 inline bool RenderObject::documentBeingDestroyed() const
1287 { 1301 {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 void showTree(const WebCore::RenderObject*); 1475 void showTree(const WebCore::RenderObject*);
1462 void showLineTree(const WebCore::RenderObject*); 1476 void showLineTree(const WebCore::RenderObject*);
1463 void showRenderTree(const WebCore::RenderObject* object1); 1477 void showRenderTree(const WebCore::RenderObject* object1);
1464 // We don't make object2 an optional parameter so that showRenderTree 1478 // We don't make object2 an optional parameter so that showRenderTree
1465 // can be called from gdb easily. 1479 // can be called from gdb easily.
1466 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); 1480 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2);
1467 1481
1468 #endif 1482 #endif
1469 1483
1470 #endif // RenderObject_h 1484 #endif // RenderObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698