Changeset 280549 in webkit
- Timestamp:
- Aug 2, 2021, 12:14:48 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/intersection-observer/intersection-observer-keeps-element-of-queued-entry-alive-expected.txt (added)
-
LayoutTests/intersection-observer/intersection-observer-keeps-element-of-queued-entry-alive.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/IntersectionObserver.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r280548 r280549 1 2021-08-02 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION(r279800): IntersectionObserver may never get a delivery of an observation if the element has been unobserved and is disconnected 4 https://bugs.webkit.org/show_bug.cgi?id=228679 5 6 Reviewed by Chris Dumez. 7 8 Added a regression test. 9 10 * intersection-observer/intersection-observer-keeps-element-of-queued-entry-alive-expected.txt: Added. 11 * intersection-observer/intersection-observer-keeps-element-of-queued-entry-alive.html: Added. 12 1 13 2021-08-02 Wenson Hsieh <wenson_hsieh@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r280548 r280549 1 2021-08-02 Ryosuke Niwa <rniwa@webkit.org> 2 3 REGRESSION(r279800): IntersectionObserver may never get a delivery of an observation if the element 4 has been unobserved and is disconnected 5 https://bugs.webkit.org/show_bug.cgi?id=228679 6 7 Reviewed by Chris Dumez. 8 9 The bug was caused by the elements of the pending entries not being considered as opaque roots 10 of the intersection observer. If the intersection observer is no longer observing those elements, 11 the JS wrapper of the intersection observer may be collected erroneously. 12 13 This patch addresses this issue by explicitly treating the elements of pending entries as 14 opaque roots of the intersection observer in IntersectionObserver::isReachableFromOpaqueRoots. 15 16 Test: intersection-observer/intersection-observer-keeps-element-of-queued-entry-alive.html 17 18 * page/IntersectionObserver.cpp: 19 (WebCore::IntersectionObserver::isReachableFromOpaqueRoots const): 20 1 21 2021-08-02 Wenson Hsieh <wenson_hsieh@apple.com> 2 22 -
trunk/Source/WebCore/page/IntersectionObserver.cpp
r279800 r280549 291 291 return true; 292 292 } 293 for (auto& target : m_pendingTargets) { 294 if (visitor.containsOpaqueRoot(target->opaqueRoot())) 295 return true; 296 } 293 297 return false; 294 298 }
Note:
See TracChangeset
for help on using the changeset viewer.