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

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

Issue 2389023002: Deferred frame loading stats v2 (Closed)
Patch Set: display:none doesn't work Created 4 years, 2 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 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 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // Aliases by callers. 228 // Aliases by callers.
229 // Clone a node: https://dom.spec.whatwg.org/#concept-node-clone 229 // Clone a node: https://dom.spec.whatwg.org/#concept-node-clone
230 CreatedByCloneNode = AsynchronousCustomElements, 230 CreatedByCloneNode = AsynchronousCustomElements,
231 CreatedByImportNode = CreatedByCloneNode, 231 CreatedByImportNode = CreatedByCloneNode,
232 // https://dom.spec.whatwg.org/#dom-document-createelement 232 // https://dom.spec.whatwg.org/#dom-document-createelement
233 CreatedByCreateElement = SynchronousCustomElements, 233 CreatedByCreateElement = SynchronousCustomElements,
234 // https://html.spec.whatwg.org/#create-an-element-for-the-token 234 // https://html.spec.whatwg.org/#create-an-element-for-the-token
235 CreatedByFragmentParser = CreatedByParser | AsynchronousCustomElements, 235 CreatedByFragmentParser = CreatedByParser | AsynchronousCustomElements,
236 }; 236 };
237 237
238 // Logged to UMA, so don't re-arrange them without creating a new histogram.
239 enum WouldLoadReason {
240 Created,
241 WouldLoadDisplayNone,
242 WouldLoadOutOfProcess,
243 WouldLoadZeroByZero,
244 WouldLoadAbove,
245 WouldLoadLeft,
246 WouldLoadVisible,
247
248 WouldLoadReasonEnd
249 };
250
238 using DocumentClassFlags = unsigned char; 251 using DocumentClassFlags = unsigned char;
239 252
240 class CORE_EXPORT Document : public ContainerNode, 253 class CORE_EXPORT Document : public ContainerNode,
241 public TreeScope, 254 public TreeScope,
242 public SecurityContext, 255 public SecurityContext,
243 public ExecutionContext, 256 public ExecutionContext,
244 public Supplementable<Document> { 257 public Supplementable<Document> {
245 DEFINE_WRAPPERTYPEINFO(); 258 DEFINE_WRAPPERTYPEINFO();
246 USING_GARBAGE_COLLECTED_MIXIN(Document); 259 USING_GARBAGE_COLLECTED_MIXIN(Document);
247 260
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 } 1281 }
1269 1282
1270 Element* rootScroller() const; 1283 Element* rootScroller() const;
1271 void setRootScroller(Element*, ExceptionState&); 1284 void setRootScroller(Element*, ExceptionState&);
1272 RootScrollerController* rootScrollerController() const { 1285 RootScrollerController* rootScrollerController() const {
1273 return m_rootScrollerController.get(); 1286 return m_rootScrollerController.get();
1274 } 1287 }
1275 1288
1276 bool isInMainFrame() const; 1289 bool isInMainFrame() const;
1277 1290
1278 void onVisibilityMaybeChanged(bool visible); 1291 void wouldLoadBecause(WouldLoadReason);
1292 WouldLoadReason wouldLoadReason() { return m_wouldLoadReason; }
1279 1293
1280 PropertyRegistry* propertyRegistry(); 1294 PropertyRegistry* propertyRegistry();
1281 1295
1282 protected: 1296 protected:
1283 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); 1297 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass);
1284 1298
1285 void didUpdateSecurityOrigin() final; 1299 void didUpdateSecurityOrigin() final;
1286 1300
1287 void clearXMLVersion() { m_xmlVersion = String(); } 1301 void clearXMLVersion() { m_xmlVersion = String(); }
1288 1302
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1622 Member<IntersectionObserverController> m_intersectionObserverController; 1636 Member<IntersectionObserverController> m_intersectionObserverController;
1623 Member<NodeIntersectionObserverData> m_intersectionObserverData; 1637 Member<NodeIntersectionObserverData> m_intersectionObserverData;
1624 Member<ResizeObserverController> m_resizeObserverController; 1638 Member<ResizeObserverController> m_resizeObserverController;
1625 1639
1626 int m_nodeCount; 1640 int m_nodeCount;
1627 1641
1628 bool m_mayContainV0Shadow = false; 1642 bool m_mayContainV0Shadow = false;
1629 1643
1630 Member<SnapCoordinator> m_snapCoordinator; 1644 Member<SnapCoordinator> m_snapCoordinator;
1631 1645
1632 bool m_visibilityWasLogged; 1646 WouldLoadReason m_wouldLoadReason;
1633 1647
1634 Member<PropertyRegistry> m_propertyRegistry; 1648 Member<PropertyRegistry> m_propertyRegistry;
1635 }; 1649 };
1636 1650
1637 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Document>; 1651 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Document>;
1638 1652
1639 inline bool Document::shouldOverrideLegacyDescription( 1653 inline bool Document::shouldOverrideLegacyDescription(
1640 ViewportDescription::Type origin) const { 1654 ViewportDescription::Type origin) const {
1641 // The different (legacy) meta tags have different priorities based on the 1655 // The different (legacy) meta tags have different priorities based on the
1642 // type regardless of which order they appear in the DOM. The priority is 1656 // type regardless of which order they appear in the DOM. The priority is
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1679 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1693 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1680 1694
1681 } // namespace blink 1695 } // namespace blink
1682 1696
1683 #ifndef NDEBUG 1697 #ifndef NDEBUG
1684 // Outside the WebCore namespace for ease of invocation from gdb. 1698 // Outside the WebCore namespace for ease of invocation from gdb.
1685 CORE_EXPORT void showLiveDocumentInstances(); 1699 CORE_EXPORT void showLiveDocumentInstances();
1686 #endif 1700 #endif
1687 1701
1688 #endif // Document_h 1702 #endif // Document_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698