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

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: a 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 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 RootScrollerController* rootScrollerController() const { 1277 RootScrollerController* rootScrollerController() const {
1278 return m_rootScrollerController.get(); 1278 return m_rootScrollerController.get();
1279 } 1279 }
1280 1280
1281 bool isInMainFrame() const; 1281 bool isInMainFrame() const;
1282 1282
1283 void onVisibilityMaybeChanged(bool visible); 1283 void onVisibilityMaybeChanged(bool visible);
1284 1284
1285 PropertyRegistry* propertyRegistry(); 1285 PropertyRegistry* propertyRegistry();
1286 1286
1287 void setHasReceivedUserGesture() { m_hasReceivedUserGesture = true; }
Rick Byers 2016/10/17 17:02:46 Nit: add a short comment describing why this is me
Nate Chapin 2016/10/18 23:26:33 Done.
1288 void clearHasReceivedUserGesture() { m_hasReceivedUserGesture = false; }
Rick Byers 2016/10/17 17:02:46 I'm surprised you ever need to clear (I'm sure I'l
Nate Chapin 2016/10/18 23:26:33 Done.
1289 bool hasReceivedUserGesture() const { return m_hasReceivedUserGesture; }
1290
1287 protected: 1291 protected:
1288 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); 1292 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass);
1289 1293
1290 void didUpdateSecurityOrigin() final; 1294 void didUpdateSecurityOrigin() final;
1291 1295
1292 void clearXMLVersion() { m_xmlVersion = String(); } 1296 void clearXMLVersion() { m_xmlVersion = String(); }
1293 1297
1294 virtual Document* cloneDocumentWithoutChildren(); 1298 virtual Document* cloneDocumentWithoutChildren();
1295 1299
1296 bool importContainerNodeChildren(ContainerNode* oldContainerNode, 1300 bool importContainerNodeChildren(ContainerNode* oldContainerNode,
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 String m_xmlVersion; 1526 String m_xmlVersion;
1523 unsigned m_xmlStandalone : 2; 1527 unsigned m_xmlStandalone : 2;
1524 unsigned m_hasXMLDeclaration : 1; 1528 unsigned m_hasXMLDeclaration : 1;
1525 1529
1526 AtomicString m_contentLanguage; 1530 AtomicString m_contentLanguage;
1527 1531
1528 DocumentEncodingData m_encodingData; 1532 DocumentEncodingData m_encodingData;
1529 1533
1530 bool m_designMode; 1534 bool m_designMode;
1531 bool m_isRunningExecCommand; 1535 bool m_isRunningExecCommand;
1536 bool m_hasReceivedUserGesture;
1532 1537
1533 HeapHashSet<WeakMember<const LiveNodeListBase>> m_listsInvalidatedAtDocument; 1538 HeapHashSet<WeakMember<const LiveNodeListBase>> m_listsInvalidatedAtDocument;
1534 // Oilpan keeps track of all registered NodeLists. 1539 // Oilpan keeps track of all registered NodeLists.
1535 // TODO(Oilpan): improve - only need to know if a NodeList 1540 // TODO(Oilpan): improve - only need to know if a NodeList
1536 // is currently alive or not for the different types. 1541 // is currently alive or not for the different types.
1537 HeapHashSet<WeakMember<const LiveNodeListBase>> 1542 HeapHashSet<WeakMember<const LiveNodeListBase>>
1538 m_nodeLists[numNodeListInvalidationTypes]; 1543 m_nodeLists[numNodeListInvalidationTypes];
1539 1544
1540 Member<SVGDocumentExtensions> m_svgExtensions; 1545 Member<SVGDocumentExtensions> m_svgExtensions;
1541 1546
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1686 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1691 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1687 1692
1688 } // namespace blink 1693 } // namespace blink
1689 1694
1690 #ifndef NDEBUG 1695 #ifndef NDEBUG
1691 // Outside the WebCore namespace for ease of invocation from gdb. 1696 // Outside the WebCore namespace for ease of invocation from gdb.
1692 CORE_EXPORT void showLiveDocumentInstances(); 1697 CORE_EXPORT void showLiveDocumentInstances();
1693 #endif 1698 #endif
1694 1699
1695 #endif // Document_h 1700 #endif // Document_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698