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

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

Issue 852083002: Propagate focus type to plugins (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moved Created 5 years, 11 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/page/EventHandler.h ('k') | Source/core/page/FocusController.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index f53efba20ce1395a0b5fb74912a21e62876e4ade..4385d25a223af1ebc7b388564f10d67f9dafac82 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -1943,7 +1943,7 @@ bool EventHandler::handleMouseFocus(const MouseEventWithHitTestResults& targeted
// clear swallowEvent if the page already set it (e.g., by canceling
// default behavior).
if (element) {
- if (!page->focusController().setFocusedElement(element, m_frame, FocusTypeMouse))
+ if (!page->focusController().setFocusedElement(element, m_frame, WebFocusTypeMouse))
return true;
} else {
// We call setFocusedElement even with !element in order to blur
@@ -3100,23 +3100,23 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent)
return keydownResult || keypress->defaultPrevented() || keypress->defaultHandled();
}
-static FocusType focusDirectionForKey(const AtomicString& keyIdentifier)
+static WebFocusType focusDirectionForKey(const AtomicString& keyIdentifier)
{
DEFINE_STATIC_LOCAL(AtomicString, Down, ("Down", AtomicString::ConstructFromLiteral));
DEFINE_STATIC_LOCAL(AtomicString, Up, ("Up", AtomicString::ConstructFromLiteral));
DEFINE_STATIC_LOCAL(AtomicString, Left, ("Left", AtomicString::ConstructFromLiteral));
DEFINE_STATIC_LOCAL(AtomicString, Right, ("Right", AtomicString::ConstructFromLiteral));
- FocusType retVal = FocusTypeNone;
+ WebFocusType retVal = WebFocusTypeNone;
if (keyIdentifier == Down)
- retVal = FocusTypeDown;
+ retVal = WebFocusTypeDown;
else if (keyIdentifier == Up)
- retVal = FocusTypeUp;
+ retVal = WebFocusTypeUp;
else if (keyIdentifier == Left)
- retVal = FocusTypeLeft;
+ retVal = WebFocusTypeLeft;
else if (keyIdentifier == Right)
- retVal = FocusTypeRight;
+ retVal = WebFocusTypeRight;
return retVal;
}
@@ -3139,8 +3139,8 @@ void EventHandler::defaultKeyboardEventHandler(KeyboardEvent* event)
else if (event->keyIdentifier() == "U+001B")
defaultEscapeEventHandler(event);
else {
- FocusType type = focusDirectionForKey(AtomicString(event->keyIdentifier()));
- if (type != FocusTypeNone)
+ WebFocusType type = focusDirectionForKey(AtomicString(event->keyIdentifier()));
+ if (type != WebFocusTypeNone)
defaultArrowEventHandler(type, event);
}
}
@@ -3387,7 +3387,7 @@ void EventHandler::defaultBackspaceEventHandler(KeyboardEvent* event)
event->setDefaultHandled();
}
-void EventHandler::defaultArrowEventHandler(FocusType focusType, KeyboardEvent* event)
+void EventHandler::defaultArrowEventHandler(WebFocusType focusType, KeyboardEvent* event)
{
ASSERT(event->type() == EventTypeNames::keydown);
@@ -3431,7 +3431,7 @@ void EventHandler::defaultTabEventHandler(KeyboardEvent* event)
if (!page->tabKeyCyclesThroughElements())
return;
- FocusType focusType = event->shiftKey() ? FocusTypeBackward : FocusTypeForward;
+ WebFocusType focusType = event->shiftKey() ? WebFocusTypeBackward : WebFocusTypeForward;
// Tabs can be used in design mode editing.
if (m_frame->document()->inDesignMode())
« no previous file with comments | « Source/core/page/EventHandler.h ('k') | Source/core/page/FocusController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698