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

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

Issue 141733006: Move focus management API from HTMLDocument to Document (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add extra prototype check Created 6 years, 11 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 r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 using ContainerNode::ref; 230 using ContainerNode::ref;
231 using ContainerNode::deref; 231 using ContainerNode::deref;
232 using SecurityContext::securityOrigin; 232 using SecurityContext::securityOrigin;
233 using SecurityContext::contentSecurityPolicy; 233 using SecurityContext::contentSecurityPolicy;
234 using ExecutionContextClient::addConsoleMessage; 234 using ExecutionContextClient::addConsoleMessage;
235 235
236 virtual bool canContainRangeEndPoint() const OVERRIDE { return true; } 236 virtual bool canContainRangeEndPoint() const OVERRIDE { return true; }
237 237
238 SelectorQueryCache& selectorQueryCache(); 238 SelectorQueryCache& selectorQueryCache();
239 239
240 // Focus Management.
241 Element* activeElement() const;
242 bool hasFocus() const;
243
240 // DOM methods & attributes for Document 244 // DOM methods & attributes for Document
241 245
242 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecopy); 246 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecopy);
243 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecut); 247 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecut);
244 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforepaste); 248 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforepaste);
245 DEFINE_ATTRIBUTE_EVENT_LISTENER(copy); 249 DEFINE_ATTRIBUTE_EVENT_LISTENER(copy);
246 DEFINE_ATTRIBUTE_EVENT_LISTENER(cut); 250 DEFINE_ATTRIBUTE_EVENT_LISTENER(cut);
247 DEFINE_ATTRIBUTE_EVENT_LISTENER(paste); 251 DEFINE_ATTRIBUTE_EVENT_LISTENER(paste);
248 DEFINE_ATTRIBUTE_EVENT_LISTENER(readystatechange); 252 DEFINE_ATTRIBUTE_EVENT_LISTENER(readystatechange);
249 DEFINE_ATTRIBUTE_EVENT_LISTENER(search); 253 DEFINE_ATTRIBUTE_EVENT_LISTENER(search);
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 UserActionElementSet& userActionElements() { return m_userActionElements; } 613 UserActionElementSet& userActionElements() { return m_userActionElements; }
610 const UserActionElementSet& userActionElements() const { return m_userAction Elements; } 614 const UserActionElementSet& userActionElements() const { return m_userAction Elements; }
611 void setNeedsFocusedElementCheck(); 615 void setNeedsFocusedElementCheck();
612 void didRunCheckFocusedElementTask() { m_didPostCheckFocusedElementTask = fa lse; } 616 void didRunCheckFocusedElementTask() { m_didPostCheckFocusedElementTask = fa lse; }
613 void setAutofocusElement(Element*); 617 void setAutofocusElement(Element*);
614 Element* autofocusElement() const { return m_autofocusElement.get(); } 618 Element* autofocusElement() const { return m_autofocusElement.get(); }
615 619
616 void setHoverNode(PassRefPtr<Node>); 620 void setHoverNode(PassRefPtr<Node>);
617 Node* hoverNode() const { return m_hoverNode.get(); } 621 Node* hoverNode() const { return m_hoverNode.get(); }
618 622
619 void setActiveElement(PassRefPtr<Element>); 623 void setActiveHoverElement(PassRefPtr<Element>);
620 Element* activeElement() const { return m_activeElement.get(); } 624 Element* activeHoverElement() const { return m_activeHoverElement.get(); }
621 625
622 void removeFocusedElementOfSubtree(Node*, bool amongChildrenOnly = false); 626 void removeFocusedElementOfSubtree(Node*, bool amongChildrenOnly = false);
623 void hoveredNodeDetached(Node*); 627 void hoveredNodeDetached(Node*);
624 void activeChainNodeDetached(Node*); 628 void activeChainNodeDetached(Node*);
625 629
626 void updateHoverActiveState(const HitTestRequest&, Element*, const PlatformM ouseEvent* = 0); 630 void updateHoverActiveState(const HitTestRequest&, Element*, const PlatformM ouseEvent* = 0);
627 631
628 // Updates for :target (CSS3 selector). 632 // Updates for :target (CSS3 selector).
629 void setCSSTarget(Element*); 633 void setCSSTarget(Element*);
630 Element* cssTarget() const { return m_cssTarget; } 634 Element* cssTarget() const { return m_cssTarget; }
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 bool m_paginatedForScreen; 1145 bool m_paginatedForScreen;
1142 1146
1143 CompatibilityMode m_compatibilityMode; 1147 CompatibilityMode m_compatibilityMode;
1144 bool m_compatibilityModeLocked; // This is cheaper than making setCompatibil ityMode virtual. 1148 bool m_compatibilityModeLocked; // This is cheaper than making setCompatibil ityMode virtual.
1145 1149
1146 bool m_didPostCheckFocusedElementTask; 1150 bool m_didPostCheckFocusedElementTask;
1147 bool m_hasAutofocused; 1151 bool m_hasAutofocused;
1148 RefPtr<Element> m_autofocusElement; 1152 RefPtr<Element> m_autofocusElement;
1149 RefPtr<Element> m_focusedElement; 1153 RefPtr<Element> m_focusedElement;
1150 RefPtr<Node> m_hoverNode; 1154 RefPtr<Node> m_hoverNode;
1151 RefPtr<Element> m_activeElement; 1155 RefPtr<Element> m_activeHoverElement;
1152 RefPtr<Element> m_documentElement; 1156 RefPtr<Element> m_documentElement;
1153 UserActionElementSet m_userActionElements; 1157 UserActionElementSet m_userActionElements;
1154 1158
1155 uint64_t m_domTreeVersion; 1159 uint64_t m_domTreeVersion;
1156 static uint64_t s_globalTreeVersion; 1160 static uint64_t s_globalTreeVersion;
1157 1161
1158 HashSet<NodeIterator*> m_nodeIterators; 1162 HashSet<NodeIterator*> m_nodeIterators;
1159 HashSet<Range*> m_ranges; 1163 HashSet<Range*> m_ranges;
1160 1164
1161 unsigned short m_listenerTypes; 1165 unsigned short m_listenerTypes;
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 inline bool Node::isDocumentNode() const 1358 inline bool Node::isDocumentNode() const
1355 { 1359 {
1356 return this == document(); 1360 return this == document();
1357 } 1361 }
1358 1362
1359 Node* eventTargetNodeForDocument(Document*); 1363 Node* eventTargetNodeForDocument(Document*);
1360 1364
1361 } // namespace WebCore 1365 } // namespace WebCore
1362 1366
1363 #endif // Document_h 1367 #endif // Document_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/Document/xml-document-focus-expected.txt ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698