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 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 RootScrollerController* rootScrollerController() const { | 1282 RootScrollerController* rootScrollerController() const { |
1283 return m_rootScrollerController.get(); | 1283 return m_rootScrollerController.get(); |
1284 } | 1284 } |
1285 | 1285 |
1286 bool isInMainFrame() const; | 1286 bool isInMainFrame() const; |
1287 | 1287 |
1288 void onVisibilityMaybeChanged(bool visible); | 1288 void onVisibilityMaybeChanged(bool visible); |
1289 | 1289 |
1290 PropertyRegistry* propertyRegistry(); | 1290 PropertyRegistry* propertyRegistry(); |
1291 | 1291 |
| 1292 // Indicates whether the user has interacted with this particular Document. |
| 1293 void setHasReceivedUserGesture() { m_hasReceivedUserGesture = true; } |
| 1294 // Consume user interaction state. Used for an experiment that restricts |
| 1295 // adding history entries to Documents that have had a user gesture since |
| 1296 // last history state change. |
| 1297 void clearHasReceivedUserGesture() { m_hasReceivedUserGesture = false; } |
| 1298 bool hasReceivedUserGesture() const { return m_hasReceivedUserGesture; } |
| 1299 |
1292 protected: | 1300 protected: |
1293 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); | 1301 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); |
1294 | 1302 |
1295 void didUpdateSecurityOrigin() final; | 1303 void didUpdateSecurityOrigin() final; |
1296 | 1304 |
1297 void clearXMLVersion() { m_xmlVersion = String(); } | 1305 void clearXMLVersion() { m_xmlVersion = String(); } |
1298 | 1306 |
1299 virtual Document* cloneDocumentWithoutChildren(); | 1307 virtual Document* cloneDocumentWithoutChildren(); |
1300 | 1308 |
1301 bool importContainerNodeChildren(ContainerNode* oldContainerNode, | 1309 bool importContainerNodeChildren(ContainerNode* oldContainerNode, |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1526 String m_xmlVersion; | 1534 String m_xmlVersion; |
1527 unsigned m_xmlStandalone : 2; | 1535 unsigned m_xmlStandalone : 2; |
1528 unsigned m_hasXMLDeclaration : 1; | 1536 unsigned m_hasXMLDeclaration : 1; |
1529 | 1537 |
1530 AtomicString m_contentLanguage; | 1538 AtomicString m_contentLanguage; |
1531 | 1539 |
1532 DocumentEncodingData m_encodingData; | 1540 DocumentEncodingData m_encodingData; |
1533 | 1541 |
1534 bool m_designMode; | 1542 bool m_designMode; |
1535 bool m_isRunningExecCommand; | 1543 bool m_isRunningExecCommand; |
| 1544 bool m_hasReceivedUserGesture; |
1536 | 1545 |
1537 HeapHashSet<WeakMember<const LiveNodeListBase>> m_listsInvalidatedAtDocument; | 1546 HeapHashSet<WeakMember<const LiveNodeListBase>> m_listsInvalidatedAtDocument; |
1538 // Oilpan keeps track of all registered NodeLists. | 1547 // Oilpan keeps track of all registered NodeLists. |
1539 // TODO(Oilpan): improve - only need to know if a NodeList | 1548 // TODO(Oilpan): improve - only need to know if a NodeList |
1540 // is currently alive or not for the different types. | 1549 // is currently alive or not for the different types. |
1541 HeapHashSet<WeakMember<const LiveNodeListBase>> | 1550 HeapHashSet<WeakMember<const LiveNodeListBase>> |
1542 m_nodeLists[numNodeListInvalidationTypes]; | 1551 m_nodeLists[numNodeListInvalidationTypes]; |
1543 | 1552 |
1544 Member<SVGDocumentExtensions> m_svgExtensions; | 1553 Member<SVGDocumentExtensions> m_svgExtensions; |
1545 | 1554 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1690 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); | 1699 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); |
1691 | 1700 |
1692 } // namespace blink | 1701 } // namespace blink |
1693 | 1702 |
1694 #ifndef NDEBUG | 1703 #ifndef NDEBUG |
1695 // Outside the WebCore namespace for ease of invocation from gdb. | 1704 // Outside the WebCore namespace for ease of invocation from gdb. |
1696 CORE_EXPORT void showLiveDocumentInstances(); | 1705 CORE_EXPORT void showLiveDocumentInstances(); |
1697 #endif | 1706 #endif |
1698 | 1707 |
1699 #endif // Document_h | 1708 #endif // Document_h |
OLD | NEW |