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

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

Issue 2375583003: Remove untrusted event deprecation warning. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/Deprecation.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 if (!m_event->defaultHandled() && m_event->bubbles()) { 246 if (!m_event->defaultHandled() && m_event->bubbles()) {
247 size_t size = m_event->eventPath().size(); 247 size_t size = m_event->eventPath().size();
248 for (size_t i = 1; i < size; ++i) { 248 for (size_t i = 1; i < size; ++i) {
249 m_event->eventPath()[i].node()->willCallDefaultEventHandler(*m_e vent); 249 m_event->eventPath()[i].node()->willCallDefaultEventHandler(*m_e vent);
250 m_event->eventPath()[i].node()->defaultEventHandler(m_event.get( )); 250 m_event->eventPath()[i].node()->defaultEventHandler(m_event.get( ));
251 DCHECK(!m_event->defaultPrevented()); 251 DCHECK(!m_event->defaultPrevented());
252 if (m_event->defaultHandled()) 252 if (m_event->defaultHandled())
253 break; 253 break;
254 } 254 }
255 } 255 }
256 if (m_event->defaultHandled() && !m_event->isTrusted() && !isClick)
257 Deprecation::countDeprecation(m_node->document(), UseCounter::Untrus tedEventDefaultHandled);
258 } 256 }
259 257
260 // Track the usage of sending a mousedown event to a select element to force 258 // Track the usage of sending a mousedown event to a select element to force
261 // it to open. This measures a possible breakage of not allowing untrusted 259 // it to open. This measures a possible breakage of not allowing untrusted
262 // events to open select boxes. 260 // events to open select boxes.
263 if (!m_event->isTrusted() && m_event->isMouseEvent() && m_event->type() == E ventTypeNames::mousedown && isHTMLSelectElement(*m_node)) { 261 if (!m_event->isTrusted() && m_event->isMouseEvent() && m_event->type() == E ventTypeNames::mousedown && isHTMLSelectElement(*m_node)) {
264 UseCounter::count(m_node->document(), UseCounter::UntrustedMouseDownEven tDispatchedToSelect); 262 UseCounter::count(m_node->document(), UseCounter::UntrustedMouseDownEven tDispatchedToSelect);
265 } 263 }
266 } 264 }
267 265
268 } // namespace blink 266 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/Deprecation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698