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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.h
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h
index 45029d3e492fd3eab9ed7b6be483e305506a040a..51c7c93e09c61109abeba70ee9307673283ff5f6 100644
--- a/Source/core/dom/Document.h
+++ b/Source/core/dom/Document.h
@@ -237,6 +237,10 @@ public:
SelectorQueryCache& selectorQueryCache();
+ // Focus Management.
+ Element* activeElement() const;
+ bool hasFocus() const;
+
// DOM methods & attributes for Document
DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecopy);
@@ -616,8 +620,8 @@ public:
void setHoverNode(PassRefPtr<Node>);
Node* hoverNode() const { return m_hoverNode.get(); }
- void setActiveElement(PassRefPtr<Element>);
- Element* activeElement() const { return m_activeElement.get(); }
+ void setActiveHoverElement(PassRefPtr<Element>);
+ Element* activeHoverElement() const { return m_activeHoverElement.get(); }
void removeFocusedElementOfSubtree(Node*, bool amongChildrenOnly = false);
void hoveredNodeDetached(Node*);
@@ -1148,7 +1152,7 @@ private:
RefPtr<Element> m_autofocusElement;
RefPtr<Element> m_focusedElement;
RefPtr<Node> m_hoverNode;
- RefPtr<Element> m_activeElement;
+ RefPtr<Element> m_activeHoverElement;
RefPtr<Element> m_documentElement;
UserActionElementSet m_userActionElements;
« 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