Correct expectations for pointerevents after slot changes.
These 3 points were missed previously:
- The mouse pointer moves off from the
shadow_host
to clickdone
. - After
slot
removal, theslotted_child
remains un-rendered and
also doesn't appear in theparent.children
list. So the
slotted_child
is effectively disconnected therefore not expected
to receive any following event. Firefox behaves this way too. - The down/up events at
parent
are also dispatched toshadow_root
.
Both Chrome and Firefox behaves this way, matching the spec [1].
Manual test link: https://codepen.io/mustaqahmed/full/BaeRvdZ
[1] https://dom.spec.whatwg.org/#dispatching-events Steps 5.13 and 5.14.
Bug: 40156858
Change-Id: I7d9f50c7732b0dc81887dce86a323685b46fab17
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5640796
Reviewed-by: Robert Flack flackr@chromium.org
Commit-Queue: Mustaq Ahmed mustaq@chromium.org
Cr-Commit-Position: refs/heads/main@{#1317590}