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

Side by Side Diff: third_party/WebKit/Source/core/events/EventDispatcher.cpp

Issue 2303013002: Add UMA metric to track usage of sending a mousedown to select elements. (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 m_event->eventPath()[i].node()->willCallDefaultEventHandler(*m_e vent); 237 m_event->eventPath()[i].node()->willCallDefaultEventHandler(*m_e vent);
238 m_event->eventPath()[i].node()->defaultEventHandler(m_event.get( )); 238 m_event->eventPath()[i].node()->defaultEventHandler(m_event.get( ));
239 DCHECK(!m_event->defaultPrevented()); 239 DCHECK(!m_event->defaultPrevented());
240 if (m_event->defaultHandled()) 240 if (m_event->defaultHandled())
241 break; 241 break;
242 } 242 }
243 } 243 }
244 if (m_event->defaultHandled() && !m_event->isTrusted() && !isClick) 244 if (m_event->defaultHandled() && !m_event->isTrusted() && !isClick)
245 Deprecation::countDeprecation(m_node->document(), UseCounter::Untrus tedEventDefaultHandled); 245 Deprecation::countDeprecation(m_node->document(), UseCounter::Untrus tedEventDefaultHandled);
246 } 246 }
247
248 // Track the usage of sending a mousedown event to a select element to force
249 // 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.
250 // events to open select boxes.
251 if (!m_event->isTrusted() && m_event->isMouseEvent() && toMouseEvent(*m_even t).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.
252 UseCounter::count(m_node->document(), UseCounter::UntrustedMouseDownEven tDispatched);
253 }
247 } 254 }
248 255
249 } // namespace blink 256 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | third_party/WebKit/Source/core/frame/UseCounter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698