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

Unified Diff: Source/core/dom/Document.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/Document.h
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h
index 8512bdd52e7dff453044d5204a900f7dbe332ad8..e2ca009b604041c552ee59b72177c85ecebe19dc 100644
--- a/Source/core/dom/Document.h
+++ b/Source/core/dom/Document.h
@@ -124,6 +124,7 @@ class HTMLScriptElement;
class HitTestRequest;
class IdleRequestCallback;
class InputDeviceCapabilities;
+class IntersectionObserver;
class LayoutPoint;
class LiveNodeListBase;
class Locale;
@@ -172,6 +173,8 @@ struct IconURL;
using MouseEventWithHitTestResults = EventWithHitTestResults<PlatformMouseEvent>;
using ExceptionCode = int;
+using IntersectionObservers = WillBeHeapListHashSet<RefPtrWillBeMember<IntersectionObserver>>;
+
enum StyleResolverUpdateMode {
// Discards the StyleResolver and rebuilds it.
FullStyleUpdate,
@@ -677,6 +680,9 @@ public:
bool hasMutationObservers() const { return m_mutationObserverTypes; }
void addMutationObserverTypes(MutationObserverOptions types) { m_mutationObserverTypes |= types; }
+ void activateIntersectionObserver(IntersectionObserver&);
+ void resumeSuspendedIntersectionObservers();
+
void updateViewportDescription();
void processReferrerPolicy(const String& policy);
@@ -1060,6 +1066,8 @@ protected:
void lockCompatibilityMode() { m_compatibilityModeLocked = true; }
ParserSynchronizationPolicy parserSynchronizationPolicy() const { return m_parserSyncPolicy; }
+ void deliverIntersectionObservationsTimerFired(Timer<Document>*);
+
private:
friend class IgnoreDestructiveWriteCountIncrementer;
friend class NthIndexCache;
@@ -1325,6 +1333,10 @@ private:
Timer<Document> m_loadEventDelayTimer;
Timer<Document> m_pluginLoadingTimer;
+ Timer<Document> m_deliverIntersectionObservationsTimer;
+ IntersectionObservers m_activeIntersectionObservers;
+ IntersectionObservers m_suspendedIntersectionObservers;
+
ViewportDescription m_viewportDescription;
ViewportDescription m_legacyViewportDescription;
Length m_viewportDefaultMinWidth;

Powered by Google App Engine
This is Rietveld 408576698