| 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/IntersectionObserverEntry.h" | 5 #include "core/dom/IntersectionObserverEntry.h" |
| 6 | 6 |
| 7 #include "core/dom/Element.h" | 7 #include "core/dom/Element.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| 11 IntersectionObserverEntry::IntersectionObserverEntry(DOMHighResTimeStamp time, d
ouble intersectionRatio, const IntRect& boundingClientRect, const IntRect* rootB
ounds, const IntRect& intersectionRect, Element* target) | 11 IntersectionObserverEntry::IntersectionObserverEntry(DOMHighResTimeStamp time, d
ouble intersectionRatio, const IntRect& boundingClientRect, const IntRect* rootB
ounds, const IntRect& intersectionRect, Element* target) |
| 12 : m_time(time) | 12 : m_time(time) |
| 13 , m_intersectionRatio(intersectionRatio) | 13 , m_intersectionRatio(intersectionRatio) |
| 14 , m_boundingClientRect(ClientRect::create(boundingClientRect)) | 14 , m_boundingClientRect(ClientRect::create(boundingClientRect)) |
| 15 , m_rootBounds(rootBounds ? ClientRect::create(*rootBounds) : nullptr) | 15 , m_rootBounds(rootBounds ? ClientRect::create(*rootBounds) : nullptr) |
| 16 , m_intersectionRect(ClientRect::create(intersectionRect)) | 16 , m_intersectionRect(ClientRect::create(intersectionRect)) |
| 17 , m_target(target) | 17 , m_target(target) |
| 18 | 18 |
| 19 { | 19 { |
| 20 } | 20 } |
| 21 | 21 |
| 22 IntersectionObserverEntry::~IntersectionObserverEntry() | |
| 23 { | |
| 24 } | |
| 25 | |
| 26 DEFINE_TRACE(IntersectionObserverEntry) | 22 DEFINE_TRACE(IntersectionObserverEntry) |
| 27 { | 23 { |
| 28 visitor->trace(m_boundingClientRect); | 24 visitor->trace(m_boundingClientRect); |
| 29 visitor->trace(m_rootBounds); | 25 visitor->trace(m_rootBounds); |
| 30 visitor->trace(m_intersectionRect); | 26 visitor->trace(m_intersectionRect); |
| 31 visitor->trace(m_target); | 27 visitor->trace(m_target); |
| 32 } | 28 } |
| 33 | 29 |
| 34 } // namespace blink | 30 } // namespace blink |
| OLD | NEW |