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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.h

Issue 1449623002: IntersectionObserver: second cut. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix rootMargin parsing Created 5 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 class HTMLFrameOwnerElement; 119 class HTMLFrameOwnerElement;
120 class HTMLHeadElement; 120 class HTMLHeadElement;
121 class HTMLImportLoader; 121 class HTMLImportLoader;
122 class HTMLImportsController; 122 class HTMLImportsController;
123 class HTMLLinkElement; 123 class HTMLLinkElement;
124 class HTMLScriptElement; 124 class HTMLScriptElement;
125 class HitTestRequest; 125 class HitTestRequest;
126 class IdleRequestCallback; 126 class IdleRequestCallback;
127 class IdleRequestOptions; 127 class IdleRequestOptions;
128 class InputDeviceCapabilities; 128 class InputDeviceCapabilities;
129 class IntersectionObserverRegistry;
129 class LayoutPoint; 130 class LayoutPoint;
130 class LiveNodeListBase; 131 class LiveNodeListBase;
131 class Locale; 132 class Locale;
132 class LocalFrame; 133 class LocalFrame;
133 class Location; 134 class Location;
134 class MainThreadTaskRunner; 135 class MainThreadTaskRunner;
135 class MediaQueryListListener; 136 class MediaQueryListListener;
136 class MediaQueryMatcher; 137 class MediaQueryMatcher;
137 class NodeFilter; 138 class NodeFilter;
138 class NodeIterator; 139 class NodeIterator;
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 bool hasListenerType(ListenerType listenerType) const { return (m_listenerTy pes & listenerType); } 669 bool hasListenerType(ListenerType listenerType) const { return (m_listenerTy pes & listenerType); }
669 void addListenerTypeIfNeeded(const AtomicString& eventType); 670 void addListenerTypeIfNeeded(const AtomicString& eventType);
670 671
671 bool hasMutationObserversOfType(MutationObserver::MutationType type) const 672 bool hasMutationObserversOfType(MutationObserver::MutationType type) const
672 { 673 {
673 return m_mutationObserverTypes & type; 674 return m_mutationObserverTypes & type;
674 } 675 }
675 bool hasMutationObservers() const { return m_mutationObserverTypes; } 676 bool hasMutationObservers() const { return m_mutationObserverTypes; }
676 void addMutationObserverTypes(MutationObserverOptions types) { m_mutationObs erverTypes |= types; } 677 void addMutationObserverTypes(MutationObserverOptions types) { m_mutationObs erverTypes |= types; }
677 678
679 WeakPtrWillBeRawPtr<Document> createWeakPtr();
680
681 IntersectionObserverRegistry* intersectionObserverRegistry();
682 void deliverIntersectionObservationsTimerFired(Timer<Document>*);
683
678 void updateViewportDescription(); 684 void updateViewportDescription();
679 void processReferrerPolicy(const String& policy); 685 void processReferrerPolicy(const String& policy);
680 686
681 // Returns the owning element in the parent document. 687 // Returns the owning element in the parent document.
682 // Returns nullptr if this is the top level document. 688 // Returns nullptr if this is the top level document.
683 HTMLFrameOwnerElement* ownerElement() const; 689 HTMLFrameOwnerElement* ownerElement() const;
684 690
685 // Returns true if this document belongs to a frame that the parent document 691 // Returns true if this document belongs to a frame that the parent document
686 // made invisible (for instance by setting as style display:none). 692 // made invisible (for instance by setting as style display:none).
687 bool isInInvisibleSubframe() const; 693 bool isInInvisibleSubframe() const;
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 #endif 1326 #endif
1321 WeakPtrWillBeWeakMember<Document> m_contextDocument; 1327 WeakPtrWillBeWeakMember<Document> m_contextDocument;
1322 1328
1323 bool m_hasFullscreenSupplement; // For early return in Fullscreen::fromIfExi sts() 1329 bool m_hasFullscreenSupplement; // For early return in Fullscreen::fromIfExi sts()
1324 1330
1325 WillBeHeapVector<RefPtrWillBeMember<Element>> m_topLayerElements; 1331 WillBeHeapVector<RefPtrWillBeMember<Element>> m_topLayerElements;
1326 1332
1327 int m_loadEventDelayCount; 1333 int m_loadEventDelayCount;
1328 Timer<Document> m_loadEventDelayTimer; 1334 Timer<Document> m_loadEventDelayTimer;
1329 Timer<Document> m_pluginLoadingTimer; 1335 Timer<Document> m_pluginLoadingTimer;
1336 Timer<Document> m_deliverIntersectionObservationsTimer;
1330 1337
1331 ViewportDescription m_viewportDescription; 1338 ViewportDescription m_viewportDescription;
1332 ViewportDescription m_legacyViewportDescription; 1339 ViewportDescription m_legacyViewportDescription;
1333 Length m_viewportDefaultMinWidth; 1340 Length m_viewportDefaultMinWidth;
1334 1341
1335 ReferrerPolicy m_referrerPolicy; 1342 ReferrerPolicy m_referrerPolicy;
1336 1343
1337 DocumentTiming m_documentTiming; 1344 DocumentTiming m_documentTiming;
1338 RefPtrWillBeMember<MediaQueryMatcher> m_mediaQueryMatcher; 1345 RefPtrWillBeMember<MediaQueryMatcher> m_mediaQueryMatcher;
1339 bool m_writeRecursionIsTooDeep; 1346 bool m_writeRecursionIsTooDeep;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 int m_styleRecalcElementCounter; 1387 int m_styleRecalcElementCounter;
1381 1388
1382 ParserSynchronizationPolicy m_parserSyncPolicy; 1389 ParserSynchronizationPolicy m_parserSyncPolicy;
1383 1390
1384 OriginsUsingFeatures::Value m_originsUsingFeaturesValue; 1391 OriginsUsingFeatures::Value m_originsUsingFeaturesValue;
1385 1392
1386 ClientHintsPreferences m_clientHintsPreferences; 1393 ClientHintsPreferences m_clientHintsPreferences;
1387 1394
1388 PersistentWillBeMember<CanvasFontCache> m_canvasFontCache; 1395 PersistentWillBeMember<CanvasFontCache> m_canvasFontCache;
1389 1396
1397 PersistentWillBeMember<IntersectionObserverRegistry> m_intersectionObserverR egistry;
1398
1390 int m_nodeCount; 1399 int m_nodeCount;
1391 }; 1400 };
1392 1401
1393 extern template class CORE_EXTERN_TEMPLATE_EXPORT WillBeHeapSupplement<Document> ; 1402 extern template class CORE_EXTERN_TEMPLATE_EXPORT WillBeHeapSupplement<Document> ;
1394 1403
1395 inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type origin) 1404 inline bool Document::shouldOverrideLegacyDescription(ViewportDescription::Type origin)
1396 { 1405 {
1397 // The different (legacy) meta tags have different priorities based on the t ype 1406 // The different (legacy) meta tags have different priorities based on the t ype
1398 // regardless of which order they appear in the DOM. The priority is given b y the 1407 // regardless of which order they appear in the DOM. The priority is given b y the
1399 // ViewportDescription::Type enum. 1408 // ViewportDescription::Type enum.
(...skipping 30 matching lines...) Expand all
1430 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1439 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1431 1440
1432 } // namespace blink 1441 } // namespace blink
1433 1442
1434 #ifndef NDEBUG 1443 #ifndef NDEBUG
1435 // Outside the WebCore namespace for ease of invocation from gdb. 1444 // Outside the WebCore namespace for ease of invocation from gdb.
1436 CORE_EXPORT void showLiveDocumentInstances(); 1445 CORE_EXPORT void showLiveDocumentInstances();
1437 #endif 1446 #endif
1438 1447
1439 #endif // Document_h 1448 #endif // Document_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698