| Index: Source/core/dom/IntersectionObserverEntry.cpp
|
| diff --git a/Source/core/dom/IntersectionObserverEntry.cpp b/Source/core/dom/IntersectionObserverEntry.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bbe3a7b519578a204048cf30613bbf6b6ecc6753
|
| --- /dev/null
|
| +++ b/Source/core/dom/IntersectionObserverEntry.cpp
|
| @@ -0,0 +1,45 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "config.h"
|
| +#include "core/dom/IntersectionObserverEntry.h"
|
| +
|
| +#include "core/dom/Element.h"
|
| +
|
| +namespace blink {
|
| +
|
| +PassRefPtrWillBeRawPtr<IntersectionObserverEntry> IntersectionObserverEntry::create(double time, const Vector<FloatRect>& quads, const FloatRect& viewport, Element* target)
|
| +{
|
| + return adoptRefWillBeNoop(new IntersectionObserverEntry(time, quads, viewport, target));
|
| +}
|
| +
|
| +IntersectionObserverEntry::IntersectionObserverEntry(double time, const Vector<FloatRect>& quads, const FloatRect& viewport, Element* target)
|
| + : m_time(time)
|
| + , m_quads(quads)
|
| + , m_viewport(viewport)
|
| + , m_target(target)
|
| +
|
| +{
|
| +}
|
| +
|
| +IntersectionObserverEntry::~IntersectionObserverEntry()
|
| +{
|
| +}
|
| +/*
|
| +const HeapVector<Member<DOMRect>> IntersectionObserverEntry::quads()
|
| +{
|
| + HeapVector<Member<DOMRect>> quads;
|
| + for (const auto quad : m_quads) {
|
| + quads.append(DOMRect::create(quad));
|
| + }
|
| + return quads;
|
| +}
|
| +*/
|
| +DEFINE_TRACE(IntersectionObserverEntry)
|
| +{
|
| + visitor->trace(m_target);
|
| +}
|
| +
|
| +
|
| +} // namespace blink
|
|
|