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

Unified Diff: Source/core/dom/Node.h

Issue 1177673005: Implement ShadowRoot.delegatesFocus 4/4 (match CSS :focus for shadow host) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix for comments Created 5 years, 6 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 | « Source/core/dom/ContainerNode.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.h
diff --git a/Source/core/dom/Node.h b/Source/core/dom/Node.h
index 7a6c9e5c3ee8700e2e227398f08be57881fc9bcd..04f7e28246673358db344f0b39f169c8c48e3386 100644
--- a/Source/core/dom/Node.h
+++ b/Source/core/dom/Node.h
@@ -361,6 +361,10 @@ public:
bool active() const { return isUserActionElement() && isUserActionElementActive(); }
bool inActiveChain() const { return isUserActionElement() && isUserActionElementInActiveChain(); }
bool hovered() const { return isUserActionElement() && isUserActionElementHovered(); }
+ // Note: As a shadow host whose root with delegatesFocus=false may become focused state when
+ // an inner element gets focused, in that case more than one elements in a document can return
+ // true for |focused()|. Use Element::isFocusedElementInDocument() or Document::focusedElement()
+ // to check which element is exactly focused.
bool focused() const { return isUserActionElement() && isUserActionElementFocused(); }
bool needsAttach() const { return styleChangeType() == NeedsReattachStyleChange; }
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698