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

Unified Diff: Source/core/input/EventHandler.cpp

Issue 1144953007: Remove tabStop feature (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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/input/EventHandler.h ('k') | Source/core/page/FocusController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/input/EventHandler.cpp
diff --git a/Source/core/input/EventHandler.cpp b/Source/core/input/EventHandler.cpp
index 5ce38751106f6d06f862f27b290b771cca457905..2385b4e685d715befd987ef797187d68381080ab 100644
--- a/Source/core/input/EventHandler.cpp
+++ b/Source/core/input/EventHandler.cpp
@@ -2069,8 +2069,6 @@ bool EventHandler::handleMouseFocus(const MouseEventWithHitTestResults& targeted
// clear swallowEvent if the page already set it (e.g., by canceling
// default behavior).
if (element) {
- if (slideFocusOnShadowHostIfNecessary(*element))
- return true;
if (!page->focusController().setFocusedElement(element, m_frame, WebFocusTypeMouse))
return true;
} else {
@@ -2086,28 +2084,6 @@ bool EventHandler::handleMouseFocus(const MouseEventWithHitTestResults& targeted
return false;
}
-bool EventHandler::slideFocusOnShadowHostIfNecessary(const Element& element)
-{
- if (element.shadowRoot() && !element.tabStop()) {
- Document* doc = m_frame->document();
- if (element.containsIncludingShadowDOM(doc->focusedElement())) {
- // If the inner element is already focused, do nothing.
- return true;
- }
-
- // If the host has a focusable inner element, focus it. Otherwise, the host takes focus.
- Page* page = m_frame->page();
- ASSERT(page);
- Node* next = page->focusController().findFocusableNode(WebFocusTypeForward, *element.shadowRoot());
- if (next && next->isElementNode() && element.containsIncludingShadowDOM(next)) {
- // Use WebFocusTypeForward instead of WebFocusTypeMouse here to mean the focus has slided.
- toElement(next)->focus(false, WebFocusTypeForward);
- return true;
- }
- }
- return false;
-}
-
bool EventHandler::handleWheelEvent(const PlatformWheelEvent& event)
{
#define RETURN_WHEEL_EVENT_HANDLED() \
« no previous file with comments | « Source/core/input/EventHandler.h ('k') | Source/core/page/FocusController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698