RESOLVED DUPLICATE of bug 270240261020
Contain intrinsic size doesn't get updated during some DOM node removals
https://bugs.webkit.org/show_bug.cgi?id=261020
Summary Contain intrinsic size doesn't get updated during some DOM node removals
Ryosuke Niwa
Reported 2023-08-31 23:56:15 PDT
The following code in ContainerNode::removeChild is bogus for a few reasons: 1. It happens after dispatchSubtreeModifiedEvent(). By that point, other scripts may have ran so it's too late. 2. This is not the only function that can remove DOM nodes from a tree. auto* element = dynamicDowncast<Element>(oldChild); if (element && (element->lastRememberedLogicalWidth() || element->lastRememberedLogicalHeight())) { // The disconnected element could be unobserved because of other properties, here we need to make sure it is observed, // so that deliver could be triggered and it would clear lastRememberedSize. document().observeForContainIntrinsicSize(*element); document().resetObservationSizeForContainIntrinsicSize(*element); }
Attachments
Radar WebKit Bug Importer
Comment 1 2023-09-07 23:57:13 PDT
Rob Buis
Comment 2 2023-09-29 06:36:09 PDT
Rob Buis
Comment 3 2024-03-02 01:42:06 PST
Please re-open if anybody think it is not a dupe. *** This bug has been marked as a duplicate of bug 270240 ***
Note You need to log in before you can comment on or make changes to this bug.