Chromium Code Reviews| OLD | NEW |
|---|---|
| (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/IntRect.h" | |
| 11 #include "platform/heap/Handle.h" | |
| 12 | |
| 13 namespace blink { | |
| 14 | |
| 15 class Element; | |
| 16 | |
| 17 class IntersectionObserverEntry : public GarbageCollectedFinalized<IntersectionO bserverEntry>, public ScriptWrappable { | |
| 18 DEFINE_WRAPPERTYPEINFO(); | |
| 19 public: | |
| 20 IntersectionObserverEntry(double, const IntRect&, const IntRect&, const IntR ect&, Element*); | |
| 21 ~IntersectionObserverEntry(); | |
| 22 | |
| 23 double time() { return m_time; } | |
| 24 ClientRect* boundingClientRect() { return ClientRect::create(m_boundingClien tRect); } | |
|
esprehn
2015/12/12 00:14:16
these objects need to be stable, you want to store
szager1
2015/12/16 19:15:37
Done, and added this check to LayoutTests/intersec
| |
| 25 ClientRect* rootBounds() { return ClientRect::create(m_rootBounds); } | |
|
esprehn
2015/12/12 00:14:16
ditto
szager1
2015/12/16 19:15:37
Done.
| |
| 26 ClientRect* intersectionRect() { return ClientRect::create(m_intersectionRec t); } | |
| 27 Element* target() { return m_target.get(); } | |
| 28 | |
| 29 DECLARE_VIRTUAL_TRACE(); | |
| 30 | |
| 31 private: | |
| 32 const double m_time; | |
| 33 const IntRect m_boundingClientRect; | |
| 34 const IntRect m_rootBounds; | |
| 35 const IntRect m_intersectionRect; | |
| 36 const RefPtrWillBeMember<Element> m_target; | |
| 37 }; | |
| 38 | |
| 39 } // namespace blink | |
| 40 | |
| 41 #endif // IntersectionObserverEntry_h | |
| OLD | NEW |