| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/dom/IntersectionObserver.h" | 5 #include "core/dom/IntersectionObserver.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "core/css/parser/CSSParserTokenRange.h" | 8 #include "core/css/parser/CSSParserTokenRange.h" |
| 9 #include "core/css/parser/CSSTokenizer.h" | 9 #include "core/css/parser/CSSTokenizer.h" |
| 10 #include "core/dom/Element.h" | 10 #include "core/dom/Element.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 default: | 147 default: |
| 148 ASSERT_NOT_REACHED(); | 148 ASSERT_NOT_REACHED(); |
| 149 break; | 149 break; |
| 150 } | 150 } |
| 151 root.document().ensureIntersectionObserverController().addTrackedObserver(*t
his); | 151 root.document().ensureIntersectionObserverController().addTrackedObserver(*t
his); |
| 152 } | 152 } |
| 153 | 153 |
| 154 #if ENABLE(OILPAN) | 154 #if ENABLE(OILPAN) |
| 155 void IntersectionObserver::clearWeakMembers(Visitor* visitor) | 155 void IntersectionObserver::clearWeakMembers(Visitor* visitor) |
| 156 { | 156 { |
| 157 if (ThreadHeap::isHeapObjectAlive(m_root)) | 157 if (Heap::isHeapObjectAlive(m_root)) |
| 158 return; | 158 return; |
| 159 disconnect(); | 159 disconnect(); |
| 160 m_root = nullptr; | 160 m_root = nullptr; |
| 161 } | 161 } |
| 162 #endif | 162 #endif |
| 163 | 163 |
| 164 LayoutObject* IntersectionObserver::rootLayoutObject() const | 164 LayoutObject* IntersectionObserver::rootLayoutObject() const |
| 165 { | 165 { |
| 166 Node* node = rootNode(); | 166 Node* node = rootNode(); |
| 167 if (node->isDocumentNode()) | 167 if (node->isDocumentNode()) |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 | 306 |
| 307 DEFINE_TRACE(IntersectionObserver) | 307 DEFINE_TRACE(IntersectionObserver) |
| 308 { | 308 { |
| 309 visitor->template registerWeakMembers<IntersectionObserver, &IntersectionObs
erver::clearWeakMembers>(this); | 309 visitor->template registerWeakMembers<IntersectionObserver, &IntersectionObs
erver::clearWeakMembers>(this); |
| 310 visitor->trace(m_callback); | 310 visitor->trace(m_callback); |
| 311 visitor->trace(m_observations); | 311 visitor->trace(m_observations); |
| 312 visitor->trace(m_entries); | 312 visitor->trace(m_entries); |
| 313 } | 313 } |
| 314 | 314 |
| 315 } // namespace blink | 315 } // namespace blink |
| OLD | NEW |