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

Unified Diff: Source/WebCore/html/HTMLSelectElement.cpp

Issue 12250020: Merge 141858 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 10 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 | « LayoutTests/fast/forms/select/select-change-type-on-focus-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/HTMLSelectElement.cpp
===================================================================
--- Source/WebCore/html/HTMLSelectElement.cpp (revision 142679)
+++ Source/WebCore/html/HTMLSelectElement.cpp (working copy)
@@ -1161,9 +1161,9 @@
if (keyCode == ' ' || keyCode == '\r') {
focus();
- // Calling focus() may cause us to lose our renderer, in which case
- // do not want to handle the event.
- if (!renderer())
+ // Calling focus() may remove the renderer or change the
+ // renderer type.
+ if (!renderer() || !renderer()->isMenuList())
return;
// Save the selection so it can be compared to the new selection
@@ -1179,9 +1179,9 @@
if (keyCode == ' ') {
focus();
- // Calling focus() may cause us to lose our renderer, in which case
- // do not want to handle the event.
- if (!renderer())
+ // Calling focus() may remove the renderer or change the
+ // renderer type.
+ if (!renderer() || !renderer()->isMenuList())
return;
// Save the selection so it can be compared to the new selection
« no previous file with comments | « LayoutTests/fast/forms/select/select-change-type-on-focus-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698