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

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

Issue 1330633003: Intersection Observer first draft Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Lost newline in merge Created 5 years, 2 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IntersectionObserverEntry_h
6 #define IntersectionObserverEntry_h
7
8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "core/dom/ClientRect.h"
10 #include "platform/geometry/FloatRect.h"
11 #include "platform/heap/Handle.h"
12
13 namespace blink {
14
15 class Element;
16
17 class IntersectionObserverEntry : public RefCountedWillBeGarbageCollectedFinaliz ed<IntersectionObserverEntry>, public ScriptWrappable {
18 DEFINE_WRAPPERTYPEINFO();
19 public:
20 static PassRefPtrWillBeRawPtr<IntersectionObserverEntry> create(double, cons t FloatRect&, const FloatRect&, const FloatRect&, Element*);
21
22 ~IntersectionObserverEntry();
23
24 double time() { return m_time; }
25 ClientRect* boundingClientRect() { return ClientRect::create(m_boundingClien tRect); }
26 ClientRect* rootBounds() { return ClientRect::create(m_rootBounds); }
27 ClientRect* intersectionRect() { return ClientRect::create(m_intersectionRec t); }
28 Element* target() { return m_target.get(); }
29
30 DECLARE_VIRTUAL_TRACE();
31
32 protected:
33 IntersectionObserverEntry(double, const FloatRect&, const FloatRect&, const FloatRect&, Element*);
34
35 private:
36 const double m_time;
37 const FloatRect m_boundingClientRect;
38 const FloatRect m_rootBounds;
39 const FloatRect m_intersectionRect;
40 const RefPtrWillBeMember<Element> m_target;
41 };
42
43 } // namespace blink
44
45 #endif // IntersectionObserverEntry_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698