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

Unified Diff: Source/core/dom/Element.h

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 side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/Element.h
diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h
index dce3454562c6bd32ca41d2e0319f4ffc5fe56a8a..9897387864bb23cdd81954f2454f9192830f3103 100644
--- a/Source/core/dom/Element.h
+++ b/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;
@@ -87,6 +88,7 @@ enum ElementFlags {
enum class ShadowRootType;
typedef WillBeHeapVector<RefPtrWillBeMember<Attr>> AttrNodeList;
+typedef WillBeHeapVector<RawPtrWillBeMember<IntersectionObserver>> IntersectionObserverList;
class CORE_EXPORT Element : public ContainerNode {
DEFINE_WRAPPERTYPEINFO();
@@ -515,6 +517,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);
@@ -661,6 +668,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());

Powered by Google App Engine
This is Rietveld 408576698