OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 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) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. |
7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 #include "core/rendering/compositing/CompositedLayerMapping.h" | 77 #include "core/rendering/compositing/CompositedLayerMapping.h" |
78 #include "core/rendering/compositing/RenderLayerCompositor.h" | 78 #include "core/rendering/compositing/RenderLayerCompositor.h" |
79 #include "core/rendering/style/ContentData.h" | 79 #include "core/rendering/style/ContentData.h" |
80 #include "core/rendering/style/ShadowList.h" | 80 #include "core/rendering/style/ShadowList.h" |
81 #include "platform/JSONValues.h" | 81 #include "platform/JSONValues.h" |
82 #include "platform/Partitions.h" | 82 #include "platform/Partitions.h" |
83 #include "platform/RuntimeEnabledFeatures.h" | 83 #include "platform/RuntimeEnabledFeatures.h" |
84 #include "platform/TraceEvent.h" | 84 #include "platform/TraceEvent.h" |
85 #include "platform/TracedValue.h" | 85 #include "platform/TracedValue.h" |
86 #include "platform/geometry/TransformState.h" | 86 #include "platform/geometry/TransformState.h" |
87 #include "platform/graphics/FirstPaintInvalidationTracking.h" | |
87 #include "platform/graphics/GraphicsContext.h" | 88 #include "platform/graphics/GraphicsContext.h" |
88 #include "wtf/RefCountedLeakCounter.h" | 89 #include "wtf/RefCountedLeakCounter.h" |
89 #include "wtf/text/StringBuilder.h" | 90 #include "wtf/text/StringBuilder.h" |
90 #include "wtf/text/WTFString.h" | 91 #include "wtf/text/WTFString.h" |
91 #include <algorithm> | 92 #include <algorithm> |
92 #ifndef NDEBUG | 93 #ifndef NDEBUG |
93 #include <stdio.h> | 94 #include <stdio.h> |
94 #endif | 95 #endif |
95 | 96 |
96 namespace blink { | 97 namespace blink { |
97 | 98 |
98 namespace { | 99 namespace { |
99 | 100 |
100 static bool gModifyRenderTreeStructureAnyState = false; | 101 static bool gModifyRenderTreeStructureAnyState = false; |
101 | 102 |
103 typedef WillBeHeapHashSet<RawPtrWillBeWeakMember<const RenderObject> > RenderObj ectWeakSet; | |
104 RenderObjectWeakSet& renderObjectNeverHadPaintInvalidationSet() | |
105 { | |
106 DEFINE_STATIC_LOCAL(RenderObjectWeakSet, set, ()); | |
tkent
2014/09/10 00:03:27
This set doesn't look traceable. Needs Persistent
kouhei (in TOK)
2014/09/10 23:46:28
Done.
| |
107 return set; | |
108 } | |
109 | |
102 } // namespace | 110 } // namespace |
103 | 111 |
104 using namespace HTMLNames; | 112 using namespace HTMLNames; |
105 | 113 |
106 #if ENABLE(ASSERT) | 114 #if ENABLE(ASSERT) |
107 | 115 |
108 RenderObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope(Rende rObject& renderObject) | 116 RenderObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope(Rende rObject& renderObject) |
109 : m_renderObject(renderObject) | 117 : m_renderObject(renderObject) |
110 , m_preexistingForbidden(m_renderObject.isSetNeedsLayoutForbidden()) | 118 , m_preexistingForbidden(m_renderObject.isSetNeedsLayoutForbidden()) |
111 { | 119 { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
226 , m_next(nullptr) | 234 , m_next(nullptr) |
227 #if ENABLE(ASSERT) | 235 #if ENABLE(ASSERT) |
228 , m_hasAXObject(false) | 236 , m_hasAXObject(false) |
229 , m_setNeedsLayoutForbidden(false) | 237 , m_setNeedsLayoutForbidden(false) |
230 #if ENABLE(OILPAN) | 238 #if ENABLE(OILPAN) |
231 , m_didCallDestroy(false) | 239 , m_didCallDestroy(false) |
232 #endif | 240 #endif |
233 #endif | 241 #endif |
234 , m_bitfields(node) | 242 , m_bitfields(node) |
235 { | 243 { |
244 if (firstPaintInvalidationTrackingEnabled()) | |
245 renderObjectNeverHadPaintInvalidationSet().add(this); | |
246 | |
236 #ifndef NDEBUG | 247 #ifndef NDEBUG |
237 renderObjectCounter.increment(); | 248 renderObjectCounter.increment(); |
238 #endif | 249 #endif |
239 ++s_instanceCount; | 250 ++s_instanceCount; |
240 } | 251 } |
241 | 252 |
242 RenderObject::~RenderObject() | 253 RenderObject::~RenderObject() |
243 { | 254 { |
255 if (firstPaintInvalidationTrackingEnabled()) | |
256 renderObjectNeverHadPaintInvalidationSet().remove(this); | |
257 | |
244 ASSERT(!m_hasAXObject); | 258 ASSERT(!m_hasAXObject); |
245 #if ENABLE(OILPAN) | 259 #if ENABLE(OILPAN) |
246 ASSERT(m_didCallDestroy); | 260 ASSERT(m_didCallDestroy); |
247 #endif | 261 #endif |
248 #ifndef NDEBUG | 262 #ifndef NDEBUG |
249 renderObjectCounter.decrement(); | 263 renderObjectCounter.decrement(); |
250 #endif | 264 #endif |
251 --s_instanceCount; | 265 --s_instanceCount; |
252 } | 266 } |
253 | 267 |
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1402 topLevelRect = result; | 1416 topLevelRect = result; |
1403 for (RenderObject* current = slowFirstChild(); current; current = current->n extSibling()) | 1417 for (RenderObject* current = slowFirstChild(); current; current = current->n extSibling()) |
1404 current->addAbsoluteRectForLayer(result); | 1418 current->addAbsoluteRectForLayer(result); |
1405 return result; | 1419 return result; |
1406 } | 1420 } |
1407 | 1421 |
1408 void RenderObject::paint(PaintInfo&, const LayoutPoint&) | 1422 void RenderObject::paint(PaintInfo&, const LayoutPoint&) |
1409 { | 1423 { |
1410 } | 1424 } |
1411 | 1425 |
1426 void RenderObject::setHadPaintInvalidation() | |
1427 { | |
1428 if (firstPaintInvalidationTrackingEnabled()) | |
1429 renderObjectNeverHadPaintInvalidationSet().remove(this); | |
1430 } | |
1431 | |
1432 bool RenderObject::hadPaintInvalidation() const | |
1433 { | |
1434 if (!firstPaintInvalidationTrackingEnabled()) | |
1435 return true; | |
1436 | |
1437 return !renderObjectNeverHadPaintInvalidationSet().contains(this); | |
1438 } | |
1439 | |
1412 const RenderLayerModelObject* RenderObject::containerForPaintInvalidation() cons t | 1440 const RenderLayerModelObject* RenderObject::containerForPaintInvalidation() cons t |
1413 { | 1441 { |
1414 if (!isRooted()) | 1442 if (!isRooted()) |
1415 return 0; | 1443 return 0; |
1416 | 1444 |
1417 return adjustCompositedContainerForSpecialAncestors(enclosingCompositedConta iner()); | 1445 return adjustCompositedContainerForSpecialAncestors(enclosingCompositedConta iner()); |
1418 } | 1446 } |
1419 | 1447 |
1420 const RenderLayerModelObject* RenderObject::enclosingCompositedContainer() const | 1448 const RenderLayerModelObject* RenderObject::enclosingCompositedContainer() const |
1421 { | 1449 { |
(...skipping 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3455 { | 3483 { |
3456 if (object1) { | 3484 if (object1) { |
3457 const blink::RenderObject* root = object1; | 3485 const blink::RenderObject* root = object1; |
3458 while (root->parent()) | 3486 while (root->parent()) |
3459 root = root->parent(); | 3487 root = root->parent(); |
3460 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3488 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3461 } | 3489 } |
3462 } | 3490 } |
3463 | 3491 |
3464 #endif | 3492 #endif |
OLD | NEW |