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

Unified Diff: third_party/WebKit/Source/core/dom/Element.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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Element.h
diff --git a/third_party/WebKit/Source/core/dom/Element.h b/third_party/WebKit/Source/core/dom/Element.h
index 61a4cc34516c49638284624cbcbd5ef8473c5483..423b383b1a11ac7dc6812fd69e8b961a8ea464e6 100644
--- a/third_party/WebKit/Source/core/dom/Element.h
+++ b/third_party/WebKit/Source/core/dom/Element.h
@@ -56,6 +56,7 @@ class ElementRareData;
class ElementShadow;
class ExceptionState;
class Image;
+class IntersectionObserver;
class IntSize;
class Locale;
class MutableStylePropertySet;
@@ -88,6 +89,7 @@ enum ElementFlags {
enum class ShadowRootType;
typedef WillBeHeapVector<RefPtrWillBeMember<Attr>> AttrNodeList;
+typedef WillBeHeapVector<RawPtrWillBeMember<IntersectionObserver>> IntersectionObserverList;
class CORE_EXPORT Element : public ContainerNode {
DEFINE_WRAPPERTYPEINFO();
@@ -522,6 +524,11 @@ public:
SpellcheckAttributeState spellcheckAttributeState() const;
+ void registerIntersectionObserver(IntersectionObserver*);
+ void unregisterIntersectionObserver(IntersectionObserver*);
+ bool hasIntersectionObserver() const override { return m_intersectionObservers.size() > 0; }
+ IntersectionObserverList& intersectionObservers() { return m_intersectionObservers; }
+
protected:
Element(const QualifiedName& tagName, Document*, ConstructionType);
@@ -668,6 +675,7 @@ private:
v8::Local<v8::Object> wrapCustomElement(v8::Isolate*, v8::Local<v8::Object> creationContext);
RefPtrWillBeMember<ElementData> m_elementData;
+ IntersectionObserverList m_intersectionObservers;
};
DEFINE_NODE_TYPE_CASTS(Element, isElementNode());
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698