The test at imported/w3c/web-platform-tests/pointerevents/pointerevent_lostpointercapture_for_disconnected_node.html is timing out and is skipped currently.
We don't release pointer capture when a node that has pointer capture is disconnected.
Created attachment 367722 [details] Patch
Comment on attachment 367722 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367722&action=review > Source/WebCore/page/PointerCaptureController.cpp:133 > + for (auto& keyAndValue : m_activePointerIdsToCapturingData) { I suppose this map is mostly empty/has very few items? > Source/WebCore/page/PointerCaptureController.cpp:147 > + return; > + } I feel for loops read better if the bail out case is a branch, not the body of the loop.
(In reply to Antti Koivisto from comment #3) > Comment on attachment 367722 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=367722&action=review > > > Source/WebCore/page/PointerCaptureController.cpp:133 > > + for (auto& keyAndValue : m_activePointerIdsToCapturingData) { > > I suppose this map is mostly empty/has very few items? Yes. On macOS, it will be empty except if the page has explicitly requested pointer capture for the single active pointer. So the map would have at most one item in it on macOS. On iOS, pointer capture is implicit, so that map will have as many items as there are active touches, which most likely will be 1 or 2. > > Source/WebCore/page/PointerCaptureController.cpp:147 > > + return; > > + } > > I feel for loops read better if the bail out case is a branch, not the body > of the loop. Cool, I'll change it.
Committed r244423: <https://trac.webkit.org/changeset/244423>
<rdar://problem/50014329>