Bug 228693

Summary: Calling unobserve on ResizeObserver should not clear existing observations in active targets
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: a, cathiechen, cdumez, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=157743
https://bugs.webkit.org/show_bug.cgi?id=228679
Bug Depends on: 227194    
Bug Blocks:    
Attachments:
Description Flags
Patch cdumez: review+, cdumez: commit-queue-

Ryosuke Niwa
Reported 2021-08-01 17:47:29 PDT
According to the spec https://drafts.csswg.org/resize-observer/#dom-resizeobserver-unobserve, we should not be clearing the active targets when unobserve is called.
Attachments
Patch (8.23 KB, patch)
2021-08-01 18:10 PDT, Ryosuke Niwa
cdumez: review+
cdumez: commit-queue-
Ryosuke Niwa
Comment 1 2021-08-01 17:49:36 PDT
Looks like Chrome has the same bug so that's a bit concerning...
Ryosuke Niwa
Comment 2 2021-08-01 18:10:04 PDT
Chris Dumez
Comment 3 2021-08-02 08:19:41 PDT
Comment on attachment 434729 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=434729&action=review r=me with changelog fix. > LayoutTests/ChangeLog:13 > +2021-08-01 Ryosuke Niwa <rniwa@webkit.org> double change log.
Ryosuke Niwa
Comment 4 2021-08-02 13:01:49 PDT
Comment on attachment 434729 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=434729&action=review >> LayoutTests/ChangeLog:13 >> +2021-08-01 Ryosuke Niwa <rniwa@webkit.org> > > double change log. Weird. Not sure what happened here. Will fix before landing.
Ryosuke Niwa
Comment 5 2021-08-02 13:03:19 PDT
Radar WebKit Bug Importer
Comment 6 2021-08-02 13:04:24 PDT
Aleksandar Totic
Comment 7 2021-08-03 23:44:27 PDT
This might be a spec misunderstanding: From the spec: [[activeTargets]] represents all Elements whose size has changed since last observation broadcast that are eligible for broadcast. What makes an element eligible is not explicitly defined. My intuition is that calling "unobserve" on an elment should make it inelligible.
Aleksandar Totic
Comment 8 2021-08-03 23:48:13 PDT
Note You need to log in before you can comment on or make changes to this bug.