Bugzilla – Bug 19875
[Shadow]: Retargeting algorithm is incorrectly retargets at lower boundary
Last modified: 2012-11-08 21:35:46 UTC
This is offshot of https://bugs.webkit.org/show_bug.cgi?id=101309.
It's unclear from Shadow DOM specification why parent calculation algorithm shouldn't be invoked for document nodes distributed to the insertion points. See https://bugs.webkit.org/show_bug.cgi?id=101309 for example
In my understanding, the parent calculation algorithm should be also invoked for a node distributed to insertion points.
Okay, running the event retargeting algorithm on the tree in https://bugs.webkit.org/show_bug.cgi?id=101309:
1) We start with "#li3", push it into STACK and add (#li3, #li3) to TARGETS
2) According to parent calculation algo, next up is "content"
3) Since it's an insertion point, we push "content" to STACK and add (content, content) to TARGETS
4) Next up is "ul#ip_wrapper"
5) We add (ul#ip_wrapper, content) to TARGETS
6) Next up is "div"
7) We add (div, content) to TARGETS
8) Next up is ShadowRoot
9) We add (ShadowRoot, content) to targets, then pop STACK
10) Next up is "ul.stories"
11) We add (ul.stories, #li3) to TARGETS
So the problem is starts with step 3. We should _not_ retarget at insertion point.