| OLD | NEW |
| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 // https://html.spec.whatwg.org/#create-an-element-for-the-token | 225 // https://html.spec.whatwg.org/#create-an-element-for-the-token |
| 226 CreatedByFragmentParser = CreatedByParser | AsynchronousCustomElements, | 226 CreatedByFragmentParser = CreatedByParser | AsynchronousCustomElements, |
| 227 }; | 227 }; |
| 228 | 228 |
| 229 // Collect data about deferred loading of offscreen cross-origin documents. All | 229 // Collect data about deferred loading of offscreen cross-origin documents. All |
| 230 // cross-origin documents log Created. Only those that would load log a reason. | 230 // cross-origin documents log Created. Only those that would load log a reason. |
| 231 // We can then see the % of cross-origin documents that never have to load. | 231 // We can then see the % of cross-origin documents that never have to load. |
| 232 // See https://crbug.com/635105. | 232 // See https://crbug.com/635105. |
| 233 // Logged to UMA, don't re-arrange entries without creating a new histogram. | 233 // Logged to UMA, don't re-arrange entries without creating a new histogram. |
| 234 enum WouldLoadReason { | 234 enum WouldLoadReason { |
| 235 Invalid, |
| 235 Created, | 236 Created, |
| 237 WouldLoad3ScreensAway, |
| 238 WouldLoad2ScreensAway, |
| 239 WouldLoad1ScreenAway, |
| 240 WouldLoadVisible, |
| 236 // If outer and inner frames aren't in the same process we can't determine | 241 // If outer and inner frames aren't in the same process we can't determine |
| 237 // if the inner frame is visible, so just load it. | 242 // if the inner frame is visible, so just load it. |
| 238 // TODO(dgrogan): Revisit after https://crbug.com/650433 is fixed. | 243 // TODO(dgrogan): Revisit after https://crbug.com/650433 is fixed. |
| 239 WouldLoadOutOfProcess, | 244 WouldLoadNoParent, |
| 240 // The next five indicate frames that are probably used for cross-origin | |
| 241 // communication. | |
| 242 WouldLoadDisplayNone, | |
| 243 WouldLoadZeroByZero, | |
| 244 WouldLoadAboveAndLeft, | |
| 245 WouldLoadAbove, | |
| 246 WouldLoadLeft, | |
| 247 // We have to load documents in visible frames. | |
| 248 WouldLoadVisible, | |
| 249 | 245 |
| 250 WouldLoadReasonEnd | 246 WouldLoadReasonEnd |
| 251 }; | 247 }; |
| 252 | 248 |
| 253 using DocumentClassFlags = unsigned char; | 249 using DocumentClassFlags = unsigned char; |
| 254 | 250 |
| 255 class CORE_EXPORT Document : public ContainerNode, | 251 class CORE_EXPORT Document : public ContainerNode, |
| 256 public TreeScope, | 252 public TreeScope, |
| 257 public SecurityContext, | 253 public SecurityContext, |
| 258 public ExecutionContext, | 254 public ExecutionContext, |
| (...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1296 | 1292 |
| 1297 Element* rootScroller() const; | 1293 Element* rootScroller() const; |
| 1298 void setRootScroller(Element*, ExceptionState&); | 1294 void setRootScroller(Element*, ExceptionState&); |
| 1299 RootScrollerController& rootScrollerController() const { | 1295 RootScrollerController& rootScrollerController() const { |
| 1300 DCHECK(m_rootScrollerController); | 1296 DCHECK(m_rootScrollerController); |
| 1301 return *m_rootScrollerController; | 1297 return *m_rootScrollerController; |
| 1302 } | 1298 } |
| 1303 | 1299 |
| 1304 bool isInMainFrame() const; | 1300 bool isInMainFrame() const; |
| 1305 | 1301 |
| 1306 void maybeRecordLoadReason(WouldLoadReason); | 1302 void recordDeferredLoadReason(WouldLoadReason); |
| 1307 WouldLoadReason wouldLoadReason() { return m_wouldLoadReason; } | 1303 WouldLoadReason deferredLoadReason() { return m_wouldLoadReason; } |
| 1308 | 1304 |
| 1309 const PropertyRegistry* propertyRegistry() const; | 1305 const PropertyRegistry* propertyRegistry() const; |
| 1310 PropertyRegistry* propertyRegistry(); | 1306 PropertyRegistry* propertyRegistry(); |
| 1311 | 1307 |
| 1312 // Document maintains a counter of visible non-secure password | 1308 // Document maintains a counter of visible non-secure password |
| 1313 // fields in the page. Used to notify the embedder when all visible | 1309 // fields in the page. Used to notify the embedder when all visible |
| 1314 // non-secure passwords fields are no longer visible. | 1310 // non-secure passwords fields are no longer visible. |
| 1315 void incrementPasswordCount(); | 1311 void incrementPasswordCount(); |
| 1316 void decrementPasswordCount(); | 1312 void decrementPasswordCount(); |
| 1317 | 1313 |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1728 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); | 1724 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); |
| 1729 | 1725 |
| 1730 } // namespace blink | 1726 } // namespace blink |
| 1731 | 1727 |
| 1732 #ifndef NDEBUG | 1728 #ifndef NDEBUG |
| 1733 // Outside the WebCore namespace for ease of invocation from gdb. | 1729 // Outside the WebCore namespace for ease of invocation from gdb. |
| 1734 CORE_EXPORT void showLiveDocumentInstances(); | 1730 CORE_EXPORT void showLiveDocumentInstances(); |
| 1735 #endif | 1731 #endif |
| 1736 | 1732 |
| 1737 #endif // Document_h | 1733 #endif // Document_h |
| OLD | NEW |