| 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/ExceptionCode.h" | 10 #include "core/dom/ExceptionCode.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 default: | 150 default: |
| 151 ASSERT_NOT_REACHED(); | 151 ASSERT_NOT_REACHED(); |
| 152 break; | 152 break; |
| 153 } | 153 } |
| 154 root.document().ensureIntersectionObserverController().addTrackedObserver(*t
his); | 154 root.document().ensureIntersectionObserverController().addTrackedObserver(*t
his); |
| 155 } | 155 } |
| 156 | 156 |
| 157 #if ENABLE(OILPAN) | 157 #if ENABLE(OILPAN) |
| 158 void IntersectionObserver::clearWeakMembers(Visitor* visitor) | 158 void IntersectionObserver::clearWeakMembers(Visitor* visitor) |
| 159 { | 159 { |
| 160 if (Heap::isHeapObjectAlive(m_root)) | 160 if (ThreadHeap::isHeapObjectAlive(m_root)) |
| 161 return; | 161 return; |
| 162 disconnect(); | 162 disconnect(); |
| 163 m_root = nullptr; | 163 m_root = nullptr; |
| 164 } | 164 } |
| 165 #endif | 165 #endif |
| 166 | 166 |
| 167 LayoutObject* IntersectionObserver::rootLayoutObject() const | 167 LayoutObject* IntersectionObserver::rootLayoutObject() const |
| 168 { | 168 { |
| 169 Node* node = rootNode(); | 169 Node* node = rootNode(); |
| 170 if (node->isDocumentNode()) | 170 if (node->isDocumentNode()) |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 { | 318 { |
| 319 #if ENABLE(OILPAN) | 319 #if ENABLE(OILPAN) |
| 320 visitor->template registerWeakMembers<IntersectionObserver, &IntersectionObs
erver::clearWeakMembers>(this); | 320 visitor->template registerWeakMembers<IntersectionObserver, &IntersectionObs
erver::clearWeakMembers>(this); |
| 321 #endif | 321 #endif |
| 322 visitor->trace(m_callback); | 322 visitor->trace(m_callback); |
| 323 visitor->trace(m_observations); | 323 visitor->trace(m_observations); |
| 324 visitor->trace(m_entries); | 324 visitor->trace(m_entries); |
| 325 } | 325 } |
| 326 | 326 |
| 327 } // namespace blink | 327 } // namespace blink |
| OLD | NEW |