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

Unified Diff: Source/core/dom/Element.cpp

Issue 815573002: Spatial Navigation: Make non-SVG elements with event listener not focusable. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 95d6824d5e7e8884895744412924fe18f00ce21b..9a45e5bfec20e85e68b93ed8698337fe6ceab9e9 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -2217,17 +2217,16 @@ bool Element::supportsSpatialNavigationFocus() const
if (!isSpatialNavigationEnabled(document().frame()))
return false;
- if (hasEventListeners(EventTypeNames::click)
- || hasEventListeners(EventTypeNames::keydown)
- || hasEventListeners(EventTypeNames::keypress)
- || hasEventListeners(EventTypeNames::keyup))
- return true;
if (!isSVGElement())
return false;
- return (hasEventListeners(EventTypeNames::focus)
+ return hasEventListeners(EventTypeNames::click)
+ || hasEventListeners(EventTypeNames::keydown)
+ || hasEventListeners(EventTypeNames::keypress)
+ || hasEventListeners(EventTypeNames::keyup)
+ || hasEventListeners(EventTypeNames::focus)
|| hasEventListeners(EventTypeNames::blur)
|| hasEventListeners(EventTypeNames::focusin)
- || hasEventListeners(EventTypeNames::focusout));
+ || hasEventListeners(EventTypeNames::focusout);
}
bool Element::isFocusable() const
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698