OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 return &referenceNode; | 47 return &referenceNode; |
48 } | 48 } |
49 | 49 |
50 static inline bool shouldStopAtShadowRoot(Event& event, ShadowRoot& shadowRoot,
EventTarget& target) | 50 static inline bool shouldStopAtShadowRoot(Event& event, ShadowRoot& shadowRoot,
EventTarget& target) |
51 { | 51 { |
52 // WebKit never allowed selectstart event to cross the the shadow DOM bounda
ry. | 52 // WebKit never allowed selectstart event to cross the the shadow DOM bounda
ry. |
53 // Changing this breaks existing sites. | 53 // Changing this breaks existing sites. |
54 // See https://bugs.webkit.org/show_bug.cgi?id=52195 for details. | 54 // See https://bugs.webkit.org/show_bug.cgi?id=52195 for details. |
55 const AtomicString eventType = event.type(); | 55 const AtomicString eventType = event.type(); |
56 return target.toNode() && target.toNode()->shadowHost() == shadowRoot.host() | 56 return target.toNode() && target.toNode()->shadowHost() == shadowRoot.host() |
57 && (eventType == EventTypeNames::abort | 57 && event.scoped(); |
58 || eventType == EventTypeNames::change | |
59 || eventType == EventTypeNames::error | |
60 || eventType == EventTypeNames::load | |
61 || eventType == EventTypeNames::reset | |
62 || eventType == EventTypeNames::resize | |
63 || eventType == EventTypeNames::scroll | |
64 || eventType == EventTypeNames::select | |
65 || eventType == EventTypeNames::selectstart); | |
66 } | 58 } |
67 | 59 |
68 EventPath::EventPath(Node& node, Event* event) | 60 EventPath::EventPath(Node& node, Event* event) |
69 : m_node(node) | 61 : m_node(node) |
70 , m_event(event) | 62 , m_event(event) |
71 { | 63 { |
72 initialize(); | 64 initialize(); |
73 } | 65 } |
74 | 66 |
75 void EventPath::initializeWith(Node& node, Event* event) | 67 void EventPath::initializeWith(Node& node, Event* event) |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 #if ENABLE(OILPAN) | 371 #if ENABLE(OILPAN) |
380 visitor->trace(m_nodeEventContexts); | 372 visitor->trace(m_nodeEventContexts); |
381 visitor->trace(m_node); | 373 visitor->trace(m_node); |
382 visitor->trace(m_event); | 374 visitor->trace(m_event); |
383 visitor->trace(m_treeScopeEventContexts); | 375 visitor->trace(m_treeScopeEventContexts); |
384 visitor->trace(m_windowEventContext); | 376 visitor->trace(m_windowEventContext); |
385 #endif | 377 #endif |
386 } | 378 } |
387 | 379 |
388 } // namespace | 380 } // namespace |
OLD | NEW |