MCPcopy Create free account
hub / github.com/codeaashu/claude-code / collectRemovedRects

Function collectRemovedRects

src/ink/dom.ts:225–245  ·  view source on GitHub ↗
(
  parent: DOMElement,
  removed: DOMNode,
  underAbsolute = false,
)

Source from the content-addressed store, hash-verified

223}
224
225function 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
247export const setAttribute = (
248 node: DOMElement,

Callers 1

removeChildNodeFunction · 0.85

Calls 3

addPendingClearFunction · 0.85
getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected