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

Unified Diff: third_party/WebKit/Source/core/dom/Document.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/core.gypi ('k') | third_party/WebKit/Source/core/dom/Document.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/Document.h
diff --git a/third_party/WebKit/Source/core/dom/Document.h b/third_party/WebKit/Source/core/dom/Document.h
index 8e9c4e32f850ec619e8e9f382b61fd02d097c5b8..b186d190cfdc7cf6d54597566d3a0fcda5e3d187 100644
--- a/third_party/WebKit/Source/core/dom/Document.h
+++ b/third_party/WebKit/Source/core/dom/Document.h
@@ -125,6 +125,7 @@ class HTMLScriptElement;
class HitTestRequest;
class IdleRequestCallback;
class InputDeviceCapabilities;
+class IntersectionObserver;
class LayoutPoint;
class LiveNodeListBase;
class Locale;
@@ -173,6 +174,8 @@ struct IconURL;
using MouseEventWithHitTestResults = EventWithHitTestResults<PlatformMouseEvent>;
using ExceptionCode = int;
+using IntersectionObservers = WillBeHeapListHashSet<RefPtrWillBeMember<IntersectionObserver>>;
+
enum StyleResolverUpdateMode {
// Discards the StyleResolver and rebuilds it.
FullStyleUpdate,
@@ -678,6 +681,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);
@@ -1065,6 +1071,8 @@ protected:
void lockCompatibilityMode() { m_compatibilityModeLocked = true; }
ParserSynchronizationPolicy parserSynchronizationPolicy() const { return m_parserSyncPolicy; }
+ void deliverIntersectionObservationsTimerFired(Timer<Document>*);
+
private:
friend class IgnoreDestructiveWriteCountIncrementer;
friend class NthIndexCache;
@@ -1330,6 +1338,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;
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698