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

Unified Diff: third_party/WebKit/Source/core/html/HTMLSelectElement.cpp

Issue 1935993003: SELECT element: Ignore synthetic events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix openPicker() Created 4 years, 8 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 | « third_party/WebKit/LayoutTests/fast/forms/select/menulist-popup-open-by-synthetic-event.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
index c1b513711c3747b6df2204199d5be67d57f4eaf1..8b99e8bd7a683bb1bf2e89d3ef6e32b832734749 100644
--- a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
@@ -1306,6 +1306,10 @@ bool HTMLSelectElement::shouldOpenPopupForKeyPressEvent(KeyboardEvent *event)
void HTMLSelectElement::menuListDefaultEventHandler(Event* event)
{
+ // TODO(tkent): Remove isTrusted check when we ship
+ // TrustedEventsDefaultAction.
+ if (!event->isTrusted())
+ return;
if (event->type() == EventTypeNames::keydown) {
if (!layoutObject() || !event->isKeyboardEvent())
return;
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/select/menulist-popup-open-by-synthetic-event.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698