( parent: DOMElement, removed: DOMNode, underAbsolute = false, )
| 223 | } |
| 224 | |
| 225 | function collectRemovedRects( |
| 226 | parent: DOMElement, |
| 227 | removed: DOMNode, |
| 228 | underAbsolute = false, |
| 229 | ): void { |
| 230 | if (removed.nodeName === '#text') return |
| 231 | const elem = removed as DOMElement |
| 232 | // If this node or any ancestor in the removed subtree was absolute, |
| 233 | // its painted pixels may overlap non-siblings — flag for global blit |
| 234 | // disable. Normal-flow removals only affect direct siblings, which |
| 235 | // hasRemovedChild already handles. |
| 236 | const isAbsolute = underAbsolute || elem.style.position === 'absolute' |
| 237 | const cached = nodeCache.get(elem) |
| 238 | if (cached) { |
| 239 | addPendingClear(parent, cached, isAbsolute) |
| 240 | nodeCache.delete(elem) |
| 241 | } |
| 242 | for (const child of elem.childNodes) { |
| 243 | collectRemovedRects(parent, child, isAbsolute) |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | export const setAttribute = ( |
| 248 | node: DOMElement, |
no test coverage detected