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