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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 return &referenceNode; | 48 return &referenceNode; |
49 } | 49 } |
50 | 50 |
51 static inline bool shouldStopAtShadowRoot(Event& event, ShadowRoot& shadowRoot,
EventTarget& target) | 51 static inline bool shouldStopAtShadowRoot(Event& event, ShadowRoot& shadowRoot,
EventTarget& target) |
52 { | 52 { |
53 // WebKit never allowed selectstart event to cross the the shadow DOM bounda
ry. | 53 // WebKit never allowed selectstart event to cross the the shadow DOM bounda
ry. |
54 // Changing this breaks existing sites. | 54 // Changing this breaks existing sites. |
55 // See https://bugs.webkit.org/show_bug.cgi?id=52195 for details. | 55 // See https://bugs.webkit.org/show_bug.cgi?id=52195 for details. |
56 const AtomicString eventType = event.type(); | 56 const AtomicString eventType = event.type(); |
57 return target.toNode() && target.toNode()->shadowHost() == shadowRoot.host() | 57 return target.toNode() && target.toNode()->shadowHost() == shadowRoot.host() |
58 && (eventType == EventTypeNames::abort | 58 && event.scoped(); |
59 || eventType == EventTypeNames::change | |
60 || eventType == EventTypeNames::error | |
61 || eventType == EventTypeNames::load | |
62 || eventType == EventTypeNames::reset | |
63 || eventType == EventTypeNames::resize | |
64 || eventType == EventTypeNames::scroll | |
65 || eventType == EventTypeNames::select | |
66 || eventType == EventTypeNames::selectstart); | |
67 } | 59 } |
68 | 60 |
69 EventPath::EventPath(Node& node, Event* event) | 61 EventPath::EventPath(Node& node, Event* event) |
70 : m_node(node) | 62 : m_node(node) |
71 , m_event(event) | 63 , m_event(event) |
72 { | 64 { |
73 initialize(); | 65 initialize(); |
74 } | 66 } |
75 | 67 |
76 void EventPath::initializeWith(Node& node, Event* event) | 68 void EventPath::initializeWith(Node& node, Event* event) |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 #if ENABLE(OILPAN) | 379 #if ENABLE(OILPAN) |
388 visitor->trace(m_nodeEventContexts); | 380 visitor->trace(m_nodeEventContexts); |
389 visitor->trace(m_node); | 381 visitor->trace(m_node); |
390 visitor->trace(m_event); | 382 visitor->trace(m_event); |
391 visitor->trace(m_treeScopeEventContexts); | 383 visitor->trace(m_treeScopeEventContexts); |
392 visitor->trace(m_windowEventContext); | 384 visitor->trace(m_windowEventContext); |
393 #endif | 385 #endif |
394 } | 386 } |
395 | 387 |
396 } // namespace blink | 388 } // namespace blink |
OLD | NEW |