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

Unified Diff: Source/core/html/HTMLSelectElement.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/HTMLSelectElement.cpp
diff --git a/Source/core/html/HTMLSelectElement.cpp b/Source/core/html/HTMLSelectElement.cpp
index baf56aa7a374f69e0f8842b1d954430dceec46c2..b4c5aca7f7dddb1c41243ff78b7eb0439a551c26 100644
--- a/Source/core/html/HTMLSelectElement.cpp
+++ b/Source/core/html/HTMLSelectElement.cpp
@@ -322,11 +322,9 @@ bool HTMLSelectElement::isKeyboardFocusable(KeyboardEvent* event) const
return HTMLFormControlElementWithState::isKeyboardFocusable(event);
}
-bool HTMLSelectElement::isMouseFocusable() const
+bool HTMLSelectElement::shouldShowFocusRingOnMouseFocus() const
{
- if (renderer())
- return isFocusable();
- return HTMLFormControlElementWithState::isMouseFocusable();
+ return true;
}
bool HTMLSelectElement::canSelectAll() const
@@ -1107,6 +1105,7 @@ void HTMLSelectElement::menuListDefaultEventHandler(Event* event)
if (event->type() == eventNames().keydownEvent) {
if (!renderer() || !event->isKeyboardEvent())
return;
+ willHandleKeyDownEvent();
if (platformHandleKeydownEvent(static_cast<KeyboardEvent*>(event)))
return;
@@ -1348,6 +1347,7 @@ void HTMLSelectElement::listBoxDefaultEventHandler(Event* event)
} else if (event->type() == eventNames().keydownEvent) {
if (!event->isKeyboardEvent())
return;
+ willHandleKeyDownEvent();
const String& keyIdentifier = static_cast<KeyboardEvent*>(event)->keyIdentifier();
bool handled = false;

Powered by Google App Engine
This is Rietveld 408576698