Bug 90436 - Some events should be always stopped at shadow boundary.
Summary: Some events should be always stopped at shadow boundary.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Hayato Ito
URL:
Keywords:
Depends on:
Blocks: 59805 90508
  Show dependency treegraph
 
Reported: 2012-07-03 01:10 PDT by Hayato Ito
Modified: 2019-02-06 09:19 PST (History)
7 users (show)

See Also:


Attachments
stop events at shadow boundary (7.36 KB, patch)
2012-07-03 02:23 PDT, Hayato Ito
no flags Details | Formatted Diff | Diff
Patch for landing (7.26 KB, patch)
2012-07-16 18:35 PDT, Hayato Ito
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hayato Ito 2012-07-03 01:10:24 PDT
The spec is here: https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#events-that-are-always-stopped

The following events should be always stopped at shadow boundary.

abort
select
change
reset
resize
scroll
selectstart
Comment 1 Hayato Ito 2012-07-03 02:23:51 PDT
Created attachment 150565 [details]
stop events at shadow boundary
Comment 2 Ryosuke Niwa 2012-07-13 15:13:04 PDT
Comment on attachment 150565 [details]
stop events at shadow boundary

View in context: https://bugs.webkit.org/attachment.cgi?id=150565&action=review

> Source/WebCore/dom/EventDispatcher.cpp:-367
> -    // 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.

It seems valuable to document this information somewhere. I would just leave it here if I were you.

> LayoutTests/fast/dom/shadow/events-stopped-at-shadow-boundary.html:24
> +function debugDispatchedEvent(eventType)

"debug"DispatchedEvent sounds misleading. Maybe dumpDispatchedEvent?
Comment 3 Hayato Ito 2012-07-16 18:34:01 PDT
Thank you for the review. Let me land after I address your comments.

(In reply to comment #2)
> (From update of attachment 150565 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=150565&action=review
> 
> > Source/WebCore/dom/EventDispatcher.cpp:-367
> > -    // 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.
> 
> It seems valuable to document this information somewhere. I would just leave it here if I were you.

Okay. I'll leave it as is.

> 
> > LayoutTests/fast/dom/shadow/events-stopped-at-shadow-boundary.html:24
> > +function debugDispatchedEvent(eventType)
> 
> "debug"DispatchedEvent sounds misleading. Maybe dumpDispatchedEvent?

Let me rename.
Comment 4 Hayato Ito 2012-07-16 18:35:57 PDT
Created attachment 152675 [details]
Patch for landing
Comment 5 WebKit Review Bot 2012-07-16 20:24:46 PDT
Comment on attachment 152675 [details]
Patch for landing

Clearing flags on attachment: 152675

Committed r122801: <http://trac.webkit.org/changeset/122801>
Comment 6 WebKit Review Bot 2012-07-16 20:24:50 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Allan Sandfeld Jensen 2012-07-17 03:05:58 PDT
(In reply to comment #3)
> Thank you for the review. Let me land after I address your comments.
> 
> (In reply to comment #2)
> > (From update of attachment 150565 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=150565&action=review
> > 
> > > Source/WebCore/dom/EventDispatcher.cpp:-367
> > > -    // 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.
> > 
> > It seems valuable to document this information somewhere. I would just leave it here if I were you.
> 
> Okay. I'll leave it as is.
> 
I think it would be better to update it, since the behaviour and comment is superseded by the spec and this bug. As it stands it doesn't explain the extra events you added, or that selectstart is now a part of a spec and no longer a quirk necessary for backward compatibility
Comment 8 Hayato Ito 2012-07-17 03:18:49 PDT
As far as I remeber, there is a special reason for a 'selectsstart' event due to the implementation of <input> element in WebKit.
If we don't stop 'selectstart' at the shadow boundary, an <input> element will break.

I think this is not directly related to the Shadow DOM spec. The issue has been there before the current shadow DOM spec was defined, I guess.

I think we should explain such behavior somewhere, or update the comment here. But I am not the right person to explain it. If I am wrong, please correct me.


(In reply to comment #7)
> (In reply to comment #3)
> > Thank you for the review. Let me land after I address your comments.
> > 
> > (In reply to comment #2)
> > > (From update of attachment 150565 [details] [details] [details])
> > > View in context: https://bugs.webkit.org/attachment.cgi?id=150565&action=review
> > > 
> > > > Source/WebCore/dom/EventDispatcher.cpp:-367
> > > > -    // 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.
> > > 
> > > It seems valuable to document this information somewhere. I would just leave it here if I were you.
> > 
> > Okay. I'll leave it as is.
> > 
> I think it would be better to update it, since the behaviour and comment is superseded by the spec and this bug. As it stands it doesn't explain the extra events you added, or that selectstart is now a part of a spec and no longer a quirk necessary for backward compatibility
Comment 9 Hayato Ito 2012-07-17 03:22:41 PDT
I agree that the comment here should be updated somehow. Let me fix it in another patch.
Comment 10 Lucas Forschler 2019-02-06 09:19:15 PST
Mass move bugs into the DOM component.