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

Unified Diff: Source/core/html/HTMLElement.cpp

Issue 783513003: Consistently use isSpatialNavigationEnabled(...) (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 | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLElement.cpp
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
index 8eb8c19b2410213c17b090ca9e38f3d5d6fed2ce..5ab64fcbaada007cbea96431797b715ff08501b6 100644
--- a/Source/core/html/HTMLElement.cpp
+++ b/Source/core/html/HTMLElement.cpp
@@ -53,6 +53,7 @@
#include "core/html/HTMLTemplateElement.h"
#include "core/html/HTMLTextFormControlElement.h"
#include "core/html/parser/HTMLParserIdioms.h"
+#include "core/page/SpatialNavigation.h"
#include "core/rendering/RenderObject.h"
#include "platform/Language.h"
#include "platform/text/BidiResolver.h"
@@ -1008,7 +1009,7 @@ bool HTMLElement::matchesReadWritePseudoClass() const
void HTMLElement::handleKeypressEvent(KeyboardEvent* event)
{
- if (!document().settings() || !document().settings()->spatialNavigationEnabled() || !supportsFocus())
+ if (!isSpatialNavigationEnabled(document().frame()) || !supportsFocus())
return;
// if the element is a text form control (like <input type=text> or <textarea>)
// or has contentEditable attribute on, we should enter a space or newline
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698