[Bug 23887] [Shadow] Put only the final destination insertion point to the event path

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23887

--- Comment #124 from Hayato Ito <hayato@chromium.org> ---
I'm afraid that this discussion thread became too long and it would be hard for
new comers to follow the entire discussion.
Let me summarize the current situation here, hoping it would make it easy for
developers to compare both and give us feedbacks easily.


There are two proposals about how event path should be.
It would be a little hard for me to explain each briefly. Therefore, let me use
an concrete example to explain the difference between them here.

Let's use an example of
http://w3c.github.io/webcomponents/spec/shadow/#event-paths-example.
(Sorry about that this example is a bit complex, but it is necessary to know
the difference)


1. The current one:

See
http://w3c.github.io/webcomponents/spec/shadow/#dfn-event-path-calculation-algorithm
for details.
The result event path for the example will be (as the spec explains):
  [D,C,I,M,L,P,R,Q,O,N,K,J,H,G,U,T,S,F,E,X,W,V,B,A]


2. The new one

See https://bugzilla.mozilla.org/show_bug.cgi?id=1059989 for details.
The result event path for the example will be:
  [D,C,M,L,R,Q,P,O,N,K,J,I,H,G,U,T,S,F,E,X,W,V,B,A]


Some notes:

Both satisfy the original goal which the spec explained as follows:
> That means if we focus on one node tree and forget all other node trees, the event path would be seen as if the event happened only on the node tree which we are focused on. This is an important aspect in a sense that hosting shadow trees doesn't have any effect to the event path within the node tree the shadow host participate in as long as the event is not stopped somewhere in the descendant trees.
> For example, from the view of the document tree 1, the event path would be seen as [D, C, B, A]. From the view of the shadow tree 2, the event path would be seen as [I, H, G, F, E]. The similar things also apply to other node trees.
> It is also worth pointing out that if we exclude all insertion points and shadow roots from an event path, the result would be equivalent to the inclusive ancestors of the node on which the event is dispatched, in the composed tree.


I don't worry about the difficulty of implementation in both. I think there is
no significant difference between them in a term of time complexity in a sense
of big-O notation.

Please feel free to add additional information.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 8 October 2014 05:56:11 UTC