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

Unified Diff: Source/core/html/HTMLTextAreaElement.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/HTMLTextAreaElement.cpp
diff --git a/Source/core/html/HTMLTextAreaElement.cpp b/Source/core/html/HTMLTextAreaElement.cpp
index 62c6eca8f87f569b8a334293b4a7f8b4021bae11..9fdb0548a655e4e9ed3cfa088d14c70734b5608e 100644
--- a/Source/core/html/HTMLTextAreaElement.cpp
+++ b/Source/core/html/HTMLTextAreaElement.cpp
@@ -241,9 +241,9 @@ bool HTMLTextAreaElement::isKeyboardFocusable(KeyboardEvent*) const
return isFocusable();
}
-bool HTMLTextAreaElement::isMouseFocusable() const
+bool HTMLTextAreaElement::shouldShowFocusRingOnMouseFocus() const
{
- return isFocusable();
+ return true;
}
void HTMLTextAreaElement::updateFocusAppearance(bool restorePreviousSelection)
@@ -262,6 +262,8 @@ void HTMLTextAreaElement::updateFocusAppearance(bool restorePreviousSelection)
void HTMLTextAreaElement::defaultEventHandler(Event* event)
{
+ if (event->type() == eventNames().keydownEvent)
+ willHandleKeyDownEvent();
if (renderer() && (event->isMouseEvent() || event->isDragEvent() || event->hasInterface(eventNames().interfaceForWheelEvent) || event->type() == eventNames().blurEvent))
forwardEvent(event);
else if (renderer() && event->isBeforeTextInsertedEvent())

Powered by Google App Engine
This is Rietveld 408576698