Bug 228679 - REGRESSION(r279800): IntersectionObserver may never get a delivery of an observation if the element has been unobserved and is disconnected
Summary: REGRESSION(r279800): IntersectionObserver may never get a delivery of an obse...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on: 227194
Blocks:
  Show dependency treegraph
 
Reported: 2021-07-31 03:26 PDT by Ryosuke Niwa
Modified: 2021-08-17 10:36 PDT (History)
5 users (show)

See Also:


Attachments
Fixes the bug (6.90 KB, patch)
2021-07-31 04:28 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2021-07-31 03:26:34 PDT
After r279800 IntersectionObserver's callback may never be delivered if the observed element
has been disconnected from the document, and the element has been explicitly unobserved by IntersectionObserver.
Comment 1 Ryosuke Niwa 2021-07-31 04:17:28 PDT
ResizeObserver has a similar code but ResizeObserver.unobserve active observation as well so it doesn't exhibit a bug per se. I don't think this is correct per spec though. Will investigate separately.
Comment 2 Ryosuke Niwa 2021-07-31 04:28:06 PDT
Created attachment 434696 [details]
Fixes the bug
Comment 3 Chris Dumez 2021-08-02 08:21:22 PDT
Comment on attachment 434696 [details]
Fixes the bug

r=me
Comment 4 Ryosuke Niwa 2021-08-02 12:14:39 PDT
<rdar://81057759>
Comment 5 Ryosuke Niwa 2021-08-02 12:14:52 PDT
Comment on attachment 434696 [details]
Fixes the bug

Clearing flags on attachment: 434696

Committed r280549 (240176@main): <https://commits.webkit.org/240176@main>
Comment 6 Ryosuke Niwa 2021-08-02 12:14:54 PDT
All reviewed patches have been landed.  Closing bug.