Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Side by Side Diff: third_party/WebKit/Source/core/dom/IntersectionObserverEntry.cpp

Issue 2662993002: [IntersectionObserver] Add isIntersecting field. (Closed)
Patch Set: webexposed Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 intersectionRatio, 13 double intersectionRatio,
14 const IntRect& boundingClientRect, 14 const IntRect& boundingClientRect,
15 const IntRect* rootBounds, 15 const IntRect* rootBounds,
16 const IntRect& intersectionRect, 16 const IntRect& intersectionRect,
17 bool isIntersecting,
17 Element* target) 18 Element* target)
18 : m_time(time), 19 : m_time(time),
19 m_intersectionRatio(intersectionRatio), 20 m_intersectionRatio(intersectionRatio),
20 m_boundingClientRect(ClientRect::create(boundingClientRect)), 21 m_boundingClientRect(ClientRect::create(boundingClientRect)),
21 m_rootBounds(rootBounds ? ClientRect::create(*rootBounds) : nullptr), 22 m_rootBounds(rootBounds ? ClientRect::create(*rootBounds) : nullptr),
22 m_intersectionRect(ClientRect::create(intersectionRect)), 23 m_intersectionRect(ClientRect::create(intersectionRect)),
23 m_target(target) 24 m_target(target),
25 m_isIntersecting(isIntersecting)
24 26
25 {} 27 {}
26 28
27 DEFINE_TRACE(IntersectionObserverEntry) { 29 DEFINE_TRACE(IntersectionObserverEntry) {
28 visitor->trace(m_boundingClientRect); 30 visitor->trace(m_boundingClientRect);
29 visitor->trace(m_rootBounds); 31 visitor->trace(m_rootBounds);
30 visitor->trace(m_intersectionRect); 32 visitor->trace(m_intersectionRect);
31 visitor->trace(m_target); 33 visitor->trace(m_target);
32 } 34 }
33 35
34 } // namespace blink 36 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698