| 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( | 11 IntersectionObserverEntry::IntersectionObserverEntry( |
| 12 DOMHighResTimeStamp time, | 12 DOMHighResTimeStamp time, |
| 13 double intersection_ratio, | 13 double intersection_ratio, |
| 14 const IntRect& bounding_client_rect, | 14 const IntRect& bounding_client_rect, |
| 15 const IntRect* root_bounds, | 15 const IntRect* root_bounds, |
| 16 const IntRect& intersection_rect, | 16 const IntRect& intersection_rect, |
| 17 bool is_intersecting, | 17 bool is_intersecting, |
| 18 Element* target) | 18 Element* target) |
| 19 : time_(time), | 19 : time_(time), |
| 20 intersection_ratio_(intersection_ratio), | 20 intersection_ratio_(intersection_ratio), |
| 21 bounding_client_rect_(ClientRect::Create(bounding_client_rect)), | 21 bounding_client_rect_(DOMRect::Create(bounding_client_rect)), |
| 22 root_bounds_(root_bounds ? ClientRect::Create(*root_bounds) : nullptr), | 22 root_bounds_(root_bounds ? DOMRect::Create(*root_bounds) : nullptr), |
| 23 intersection_rect_(ClientRect::Create(intersection_rect)), | 23 intersection_rect_(DOMRect::Create(intersection_rect)), |
| 24 target_(target), | 24 target_(target), |
| 25 is_intersecting_(is_intersecting) | 25 is_intersecting_(is_intersecting) |
| 26 | 26 |
| 27 {} | 27 {} |
| 28 | 28 |
| 29 DEFINE_TRACE(IntersectionObserverEntry) { | 29 DEFINE_TRACE(IntersectionObserverEntry) { |
| 30 visitor->Trace(bounding_client_rect_); | 30 visitor->Trace(bounding_client_rect_); |
| 31 visitor->Trace(root_bounds_); | 31 visitor->Trace(root_bounds_); |
| 32 visitor->Trace(intersection_rect_); | 32 visitor->Trace(intersection_rect_); |
| 33 visitor->Trace(target_); | 33 visitor->Trace(target_); |
| 34 } | 34 } |
| 35 | 35 |
| 36 } // namespace blink | 36 } // namespace blink |
| OLD | NEW |