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

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

Issue 2687903002: Track constant InputDeviceCapabilities objects per-window. (Closed)
Patch Set: Created 3 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
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 db8af6744e0bbcb9994a38bfaa966165909090ab..8de597e09b156cd48a7eae8d192b1e051a64755c 100644
--- a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
@@ -60,6 +60,7 @@
#include "core/html/HTMLOptionElement.h"
#include "core/html/forms/FormController.h"
#include "core/input/EventHandler.h"
+#include "core/input/InputDeviceCapabilities.h"
#include "core/inspector/ConsoleMessage.h"
#include "core/layout/HitTestRequest.h"
#include "core/layout/HitTestResult.h"
@@ -1352,10 +1353,8 @@ void HTMLSelectElement::menuListDefaultEventHandler(Event* event) {
toMouseEvent(event)->button() ==
static_cast<short>(WebPointerProperties::Button::Left)) {
InputDeviceCapabilities* sourceCapabilities =
- toMouseEvent(event)->fromTouch()
- ? InputDeviceCapabilities::firesTouchEventsSourceCapabilities()
- : InputDeviceCapabilities::
- doesntFireTouchEventsSourceCapabilities();
+ document().domWindow()->getInputDeviceCapabilities()->firesTouchEvents(
+ toMouseEvent(event)->fromTouch());
focus(FocusParams(SelectionBehaviorOnFocus::Restore, WebFocusTypeNone,
sourceCapabilities));
if (layoutObject() && layoutObject()->isMenuList() &&
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMWindow.cpp ('k') | third_party/WebKit/Source/core/input/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698