Bug 113676 - [Shadow DOM] Change the order of event dispatching at AT_TARGET phase.
Summary: [Shadow DOM] Change the order of event dispatching at AT_TARGET phase.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Hayato Ito
URL:
Keywords:
Depends on:
Blocks: 59805
  Show dependency treegraph
 
Reported: 2013-03-31 23:04 PDT by Hayato Ito
Modified: 2013-04-01 17:02 PDT (History)
5 users (show)

See Also:


Attachments
Change the order (27.44 KB, patch)
2013-03-31 23:17 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 2013-03-31 23:04:44 PDT
The discussion on the spec side here:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21404


Given the event path, from Node A (top-most) to Node G (target, inner-most), where C and D are shadow hosts and G is the target, 
an event dispatching order in the current WebKit implementaion is:
(T: AT_TARGET, C: CAPTURING, B: BUBBLING)


For bubbling events:

  A          1 (C)  11 (B)
  B          2 (C)  10 (B)
  C (SH)     3 (T) 
  D          4 (C)   9 (B)
  E (SH)     5 (T)
  F          6 (C)   8 (B)
  G (Target) 7 (T)  


For non-bubbling events:

  A          1 (C)
  B          2 (C)
  C (SH)     3 (T) 
  D          4 (C)
  E (SH)     5 (T)
  F          6 (C)
  G (Target) 7 (T) 



We should change the order as follows:

For bubbling events:

  A          1 (C)  11 (B)
  B          2 (C)  10 (B)
  C (SH)             9 (T) 
  D          3 (C)   8 (B)
  E (SH)             7 (T)
  F          4 (C)   6 (B)
  G (Target)         5 (T)  


For non-bubbling events:

  A          1 (C)
  B          2 (C)
  C (SH)            7 (T) 
  D          3 (C)
  E (SH)            6 (T)
  F          4 (C)
  G (Target)        5 (T)
Comment 1 Hayato Ito 2013-03-31 23:17:27 PDT
Created attachment 195925 [details]
Change the order
Comment 2 Dimitri Glazkov (Google) 2013-04-01 07:46:54 PDT
Comment on attachment 195925 [details]
Change the order

This is great. Also, looks like a more straightforward code path.
Comment 3 WebKit Review Bot 2013-04-01 17:02:00 PDT
Comment on attachment 195925 [details]
Change the order

Clearing flags on attachment: 195925

Committed r147371: <http://trac.webkit.org/changeset/147371>
Comment 4 WebKit Review Bot 2013-04-01 17:02:03 PDT
All reviewed patches have been landed.  Closing bug.