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 |