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

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

Issue 2389023002: Deferred frame loading stats v2 (Closed)
Patch Set: make display none work. update histograms.xml 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.
dcheng 2016/10/08 00:46:22 Nit: add a comment that describes the purpose of a
dgrogan 2016/10/13 01:06:21 Done.
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 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 } 1286 }
1274 1287
1275 Element* rootScroller() const; 1288 Element* rootScroller() const;
1276 void setRootScroller(Element*, ExceptionState&); 1289 void setRootScroller(Element*, ExceptionState&);
1277 RootScrollerController* rootScrollerController() const { 1290 RootScrollerController* rootScrollerController() const {
1278 return m_rootScrollerController.get(); 1291 return m_rootScrollerController.get();
1279 } 1292 }
1280 1293
1281 bool isInMainFrame() const; 1294 bool isInMainFrame() const;
1282 1295
1283 void onVisibilityMaybeChanged(bool visible); 1296 void wouldLoadBecause(WouldLoadReason);
1297 WouldLoadReason wouldLoadReason() { return m_wouldLoadReason; }
1284 1298
1285 PropertyRegistry* propertyRegistry(); 1299 PropertyRegistry* propertyRegistry();
1286 1300
1287 protected: 1301 protected:
1288 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); 1302 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass);
1289 1303
1290 void didUpdateSecurityOrigin() final; 1304 void didUpdateSecurityOrigin() final;
1291 1305
1292 void clearXMLVersion() { m_xmlVersion = String(); } 1306 void clearXMLVersion() { m_xmlVersion = String(); }
1293 1307
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 Member<IntersectionObserverController> m_intersectionObserverController; 1643 Member<IntersectionObserverController> m_intersectionObserverController;
1630 Member<NodeIntersectionObserverData> m_intersectionObserverData; 1644 Member<NodeIntersectionObserverData> m_intersectionObserverData;
1631 Member<ResizeObserverController> m_resizeObserverController; 1645 Member<ResizeObserverController> m_resizeObserverController;
1632 1646
1633 int m_nodeCount; 1647 int m_nodeCount;
1634 1648
1635 bool m_mayContainV0Shadow = false; 1649 bool m_mayContainV0Shadow = false;
1636 1650
1637 Member<SnapCoordinator> m_snapCoordinator; 1651 Member<SnapCoordinator> m_snapCoordinator;
1638 1652
1639 bool m_visibilityWasLogged; 1653 WouldLoadReason m_wouldLoadReason;
1640 1654
1641 Member<PropertyRegistry> m_propertyRegistry; 1655 Member<PropertyRegistry> m_propertyRegistry;
1642 }; 1656 };
1643 1657
1644 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Document>; 1658 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Document>;
1645 1659
1646 inline bool Document::shouldOverrideLegacyDescription( 1660 inline bool Document::shouldOverrideLegacyDescription(
1647 ViewportDescription::Type origin) const { 1661 ViewportDescription::Type origin) const {
1648 // The different (legacy) meta tags have different priorities based on the 1662 // The different (legacy) meta tags have different priorities based on the
1649 // type regardless of which order they appear in the DOM. The priority is 1663 // 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
1686 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1700 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1687 1701
1688 } // namespace blink 1702 } // namespace blink
1689 1703
1690 #ifndef NDEBUG 1704 #ifndef NDEBUG
1691 // Outside the WebCore namespace for ease of invocation from gdb. 1705 // Outside the WebCore namespace for ease of invocation from gdb.
1692 CORE_EXPORT void showLiveDocumentInstances(); 1706 CORE_EXPORT void showLiveDocumentInstances();
1693 #endif 1707 #endif
1694 1708
1695 #endif // Document_h 1709 #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/dom/Document.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698