Chromium Code Reviews| Index: third_party/WebKit/Source/core/events/EventDispatcher.cpp |
| diff --git a/third_party/WebKit/Source/core/events/EventDispatcher.cpp b/third_party/WebKit/Source/core/events/EventDispatcher.cpp |
| index a20c4a0a1a4dfcd1791781c965ae3fc5155f92a4..284422958625c02a0b5452bc7faa68e154ac542e 100644 |
| --- a/third_party/WebKit/Source/core/events/EventDispatcher.cpp |
| +++ b/third_party/WebKit/Source/core/events/EventDispatcher.cpp |
| @@ -244,6 +244,13 @@ inline void EventDispatcher::dispatchEventPostProcess(EventDispatchHandlingState |
| if (m_event->defaultHandled() && !m_event->isTrusted() && !isClick) |
| Deprecation::countDeprecation(m_node->document(), UseCounter::UntrustedEventDefaultHandled); |
| } |
| + |
| + // Track the usage of sending a mousedown event to a select element to force |
| + // it to open. This measures a possible breakage of not allow untrusted |
|
Rick Byers
2016/09/01 21:58:56
nit: s/allow/allowing/
dtapuska
2016/09/02 02:57:43
Done.
|
| + // events to open select boxes. |
| + if (!m_event->isTrusted() && m_event->isMouseEvent() && toMouseEvent(*m_event).type() == EventTypeNames::mousedown && isHTMLSelectElement(*m_node)) { |
|
Rick Byers
2016/09/01 21:58:56
nit: the toMouseEvent is unnecessary, elsewhere in
dtapuska
2016/09/02 02:57:43
Done.
|
| + UseCounter::count(m_node->document(), UseCounter::UntrustedMouseDownEventDispatched); |
| + } |
| } |
| } // namespace blink |