| Index: third_party/WebKit/Source/core/events/EventPath.cpp
|
| diff --git a/third_party/WebKit/Source/core/events/EventPath.cpp b/third_party/WebKit/Source/core/events/EventPath.cpp
|
| index 899b677f6eecfbe5538b82c2000b609972c29ba0..feb2f0976cd1f1e997177f04c0de2e9a5521e01b 100644
|
| --- a/third_party/WebKit/Source/core/events/EventPath.cpp
|
| +++ b/third_party/WebKit/Source/core/events/EventPath.cpp
|
| @@ -50,12 +50,13 @@ EventTarget* EventPath::eventTargetRespectingTargetRules(Node& referenceNode)
|
|
|
| static inline bool shouldStopAtShadowRoot(Event& event, ShadowRoot& shadowRoot, EventTarget& target)
|
| {
|
| - // WebKit never allowed selectstart event to cross the the shadow DOM boundary.
|
| - // Changing this breaks existing sites.
|
| - // See https://bugs.webkit.org/show_bug.cgi?id=52195 for details.
|
| - const AtomicString eventType = event.type();
|
| - return target.toNode() && target.toNode()->shadowHost() == shadowRoot.host()
|
| - && event.scoped();
|
| + if (shadowRoot.isV1()) {
|
| + // In v1, an event is scoped by default unless event.composed flag is set.
|
| + return !event.composed() && target.toNode() && target.toNode()->shadowHost() == shadowRoot.host();
|
| + }
|
| + // Ignores event.composed() for v0.
|
| + // Instead, use event.isScopedInV0() for backward compatibility.
|
| + return event.isScopedInV0() && target.toNode() && target.toNode()->shadowHost() == shadowRoot.host();
|
| }
|
|
|
| EventPath::EventPath(Node& node, Event* event)
|
|
|