| Index: Source/core/dom/Element.cpp
|
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
|
| index 2770150fd8e6e417c6bdb39cafd9fa3ce5128829..c8fd776c97c367890d1632ba5b88807dd96fb142 100644
|
| --- a/Source/core/dom/Element.cpp
|
| +++ b/Source/core/dom/Element.cpp
|
| @@ -108,7 +108,6 @@
|
| #include "core/page/FocusController.h"
|
| #include "core/page/Page.h"
|
| #include "core/page/PointerLockController.h"
|
| -#include "core/page/SpatialNavigation.h"
|
| #include "core/rendering/RenderLayer.h"
|
| #include "core/rendering/RenderTextFragment.h"
|
| #include "core/rendering/RenderView.h"
|
| @@ -2220,31 +2219,7 @@ bool Element::supportsFocus() const
|
| // But supportsFocus must return true when the element is editable, or else
|
| // it won't be focusable. Furthermore, supportsFocus cannot just return true
|
| // always or else tabIndex() will change for all HTML elements.
|
| - return hasElementFlag(TabIndexWasSetExplicitly) || (hasEditableStyle() && parentNode() && !parentNode()->hasEditableStyle())
|
| - || supportsSpatialNavigationFocus();
|
| -}
|
| -
|
| -bool Element::supportsSpatialNavigationFocus() const
|
| -{
|
| - // This function checks whether the element satisfies the extended criteria
|
| - // for the element to be focusable, introduced by spatial navigation feature,
|
| - // i.e. checks if click or keyboard event handler is specified.
|
| - // This is the way to make it possible to navigate to (focus) elements
|
| - // which web designer meant for being active (made them respond to click events).
|
| -
|
| - 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)
|
| - || hasEventListeners(EventTypeNames::blur)
|
| - || hasEventListeners(EventTypeNames::focusin)
|
| - || hasEventListeners(EventTypeNames::focusout));
|
| + return hasElementFlag(TabIndexWasSetExplicitly) || (hasEditableStyle() && parentNode() && !parentNode()->hasEditableStyle());
|
| }
|
|
|
| bool Element::isFocusable() const
|
|
|