| 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(OwnPtrWillBePersistent<RenderObjectWeakSet>, set, (adopt
PtrWillBeNoop(new RenderObjectWeakSet()))); |
| 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 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1403 topLevelRect = result; | 1417 topLevelRect = result; |
| 1404 for (RenderObject* current = slowFirstChild(); current; current = current->n
extSibling()) | 1418 for (RenderObject* current = slowFirstChild(); current; current = current->n
extSibling()) |
| 1405 current->addAbsoluteRectForLayer(result); | 1419 current->addAbsoluteRectForLayer(result); |
| 1406 return result; | 1420 return result; |
| 1407 } | 1421 } |
| 1408 | 1422 |
| 1409 void RenderObject::paint(PaintInfo&, const LayoutPoint&) | 1423 void RenderObject::paint(PaintInfo&, const LayoutPoint&) |
| 1410 { | 1424 { |
| 1411 } | 1425 } |
| 1412 | 1426 |
| 1427 void RenderObject::setHadPaintInvalidation() |
| 1428 { |
| 1429 if (firstPaintInvalidationTrackingEnabled()) |
| 1430 renderObjectNeverHadPaintInvalidationSet().remove(this); |
| 1431 } |
| 1432 |
| 1433 bool RenderObject::hadPaintInvalidation() const |
| 1434 { |
| 1435 if (!firstPaintInvalidationTrackingEnabled()) |
| 1436 return true; |
| 1437 |
| 1438 return !renderObjectNeverHadPaintInvalidationSet().contains(this); |
| 1439 } |
| 1440 |
| 1413 const RenderLayerModelObject* RenderObject::containerForPaintInvalidation() cons
t | 1441 const RenderLayerModelObject* RenderObject::containerForPaintInvalidation() cons
t |
| 1414 { | 1442 { |
| 1415 if (!isRooted()) | 1443 if (!isRooted()) |
| 1416 return 0; | 1444 return 0; |
| 1417 | 1445 |
| 1418 return adjustCompositedContainerForSpecialAncestors(enclosingCompositedConta
iner()); | 1446 return adjustCompositedContainerForSpecialAncestors(enclosingCompositedConta
iner()); |
| 1419 } | 1447 } |
| 1420 | 1448 |
| 1421 const RenderLayerModelObject* RenderObject::enclosingCompositedContainer() const | 1449 const RenderLayerModelObject* RenderObject::enclosingCompositedContainer() const |
| 1422 { | 1450 { |
| (...skipping 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3456 { | 3484 { |
| 3457 if (object1) { | 3485 if (object1) { |
| 3458 const blink::RenderObject* root = object1; | 3486 const blink::RenderObject* root = object1; |
| 3459 while (root->parent()) | 3487 while (root->parent()) |
| 3460 root = root->parent(); | 3488 root = root->parent(); |
| 3461 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3489 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 3462 } | 3490 } |
| 3463 } | 3491 } |
| 3464 | 3492 |
| 3465 #endif | 3493 #endif |
| OLD | NEW |