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

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

Issue 16194013: Mouse press should focus on any types of form controls. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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
Index: Source/core/html/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index 6c98ca305e6c326f2a8cf5a06d2dbc1bc2358b2d..caf8d7412fefbc67fb2bc09cef73c7f57ca910ef 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -371,9 +371,9 @@ bool HTMLInputElement::isKeyboardFocusable(KeyboardEvent* event) const
return m_inputType->isKeyboardFocusable(event);
}
-bool HTMLInputElement::isMouseFocusable() const
+bool HTMLInputElement::shouldShowFocusRingOnMouseFocus() const
{
- return m_inputType->isMouseFocusable();
+ return m_inputType->shouldShowFocusRingOnMouseFocus();
}
bool HTMLInputElement::isTextFormControlKeyboardFocusable(KeyboardEvent* event) const
@@ -381,11 +381,6 @@ bool HTMLInputElement::isTextFormControlKeyboardFocusable(KeyboardEvent* event)
return HTMLTextFormControlElement::isKeyboardFocusable(event);
}
-bool HTMLInputElement::isTextFormControlMouseFocusable() const
-{
- return HTMLTextFormControlElement::isMouseFocusable();
-}
-
void HTMLInputElement::updateFocusAppearance(bool restorePreviousSelection)
{
if (isTextField()) {
@@ -1167,6 +1162,7 @@ void HTMLInputElement::defaultEventHandler(Event* evt)
}
if (evt->isKeyboardEvent() && evt->type() == eventNames().keydownEvent) {
+ willHandleKeyDownEvent();
m_inputType->handleKeydownEvent(static_cast<KeyboardEvent*>(evt));
if (evt->defaultHandled())
return;

Powered by Google App Engine
This is Rietveld 408576698