Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 192 m_event->eventPath().windowEventContext().handleLocalEvents(*m_event); | 192 m_event->eventPath().windowEventContext().handleLocalEvents(*m_event); |
| 193 } | 193 } |
| 194 } | 194 } |
| 195 | 195 |
| 196 inline void EventDispatcher::dispatchEventPostProcess(void* preDispatchEventHand lerResult) | 196 inline void EventDispatcher::dispatchEventPostProcess(void* preDispatchEventHand lerResult) |
| 197 { | 197 { |
| 198 m_event->setTarget(EventPath::eventTargetRespectingTargetRules(*m_node)); | 198 m_event->setTarget(EventPath::eventTargetRespectingTargetRules(*m_node)); |
| 199 m_event->setCurrentTarget(nullptr); | 199 m_event->setCurrentTarget(nullptr); |
| 200 m_event->setEventPhase(0); | 200 m_event->setEventPhase(0); |
| 201 | 201 |
| 202 // Fire an accessibility event indicating a node was clicked on. | |
| 203 if (AXObjectCache* cache = m_node->document().existingAXObjectCache()) | |
| 204 cache->handleClicked(m_node); | |
|
Rick Byers
2016/02/02 18:22:57
This is being called for ALL types of events (not
dmazzoni
2016/02/02 18:35:48
Oops, I had a line of code that checked for the ev
Rick Byers
2016/02/02 18:55:37
Ok. Please share the logic with the isTrustedOrCl
| |
| 205 | |
| 202 // Pass the data from the preDispatchEventHandler to the postDispatchEventHa ndler. | 206 // Pass the data from the preDispatchEventHandler to the postDispatchEventHa ndler. |
| 203 m_node->postDispatchEventHandler(m_event.get(), preDispatchEventHandlerResul t); | 207 m_node->postDispatchEventHandler(m_event.get(), preDispatchEventHandlerResul t); |
| 204 | 208 |
| 205 // The DOM Events spec says that events dispatched by JS (other than "click" ) | 209 // The DOM Events spec says that events dispatched by JS (other than "click" ) |
| 206 // should not have their default handlers invoked. | 210 // should not have their default handlers invoked. |
| 207 bool isTrustedOrClick = !RuntimeEnabledFeatures::trustedEventsDefaultActionE nabled() || m_event->isTrusted() || (m_event->isMouseEvent() && toMouseEvent(*m_ event).type() == EventTypeNames::click); | 211 bool isTrustedOrClick = !RuntimeEnabledFeatures::trustedEventsDefaultActionE nabled() || m_event->isTrusted() || (m_event->isMouseEvent() && toMouseEvent(*m_ event).type() == EventTypeNames::click); |
| 208 | 212 |
| 209 // Call default event handlers. While the DOM does have a concept of prevent ing | 213 // Call default event handlers. While the DOM does have a concept of prevent ing |
| 210 // default handling, the detail of which handlers are called is an internal | 214 // default handling, the detail of which handlers are called is an internal |
| 211 // implementation detail and not part of the DOM. | 215 // implementation detail and not part of the DOM. |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 225 m_event->eventPath()[i].node()->defaultEventHandler(m_event.get( )); | 229 m_event->eventPath()[i].node()->defaultEventHandler(m_event.get( )); |
| 226 ASSERT(!m_event->defaultPrevented()); | 230 ASSERT(!m_event->defaultPrevented()); |
| 227 if (m_event->defaultHandled()) | 231 if (m_event->defaultHandled()) |
| 228 return; | 232 return; |
| 229 } | 233 } |
| 230 } | 234 } |
| 231 } | 235 } |
| 232 } | 236 } |
| 233 | 237 |
| 234 } // namespace blink | 238 } // namespace blink |
| OLD | NEW |