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

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

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

Powered by Google App Engine
This is Rietveld 408576698