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

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

Issue 1330633003: Intersection Observer first draft Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix segfault on null input. Created 5 years, 3 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 #include "config.h"
6 #include "core/dom/IntersectionObserverEntry.h"
7
8 #include "core/dom/Element.h"
9
10 namespace blink {
11
12 PassRefPtrWillBeRawPtr<IntersectionObserverEntry> IntersectionObserverEntry::cre ate(double time, const Vector<FloatRect>& quads, const FloatRect& viewport, Elem ent* target)
13 {
14 return adoptRefWillBeNoop(new IntersectionObserverEntry(time, quads, viewpor t, target));
15 }
16
17 IntersectionObserverEntry::IntersectionObserverEntry(double time, const Vector<F loatRect>& quads, const FloatRect& viewport, Element* target)
18 : m_time(time)
19 , m_quads(quads)
20 , m_viewport(viewport)
21 , m_target(target)
22
23 {
24 }
25
26 IntersectionObserverEntry::~IntersectionObserverEntry()
27 {
28 }
29 /*
30 const HeapVector<Member<DOMRect>> IntersectionObserverEntry::quads()
31 {
32 HeapVector<Member<DOMRect>> quads;
33 for (const auto quad : m_quads) {
34 quads.append(DOMRect::create(quad));
35 }
36 return quads;
37 }
38 */
39 DEFINE_TRACE(IntersectionObserverEntry)
40 {
41 visitor->trace(m_target);
42 }
43
44
45 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698