Bug 258916

Summary: Avoid unnecessary tree traversal in customElements.define
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED WONTFIX    
Severity: Normal    
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Ryosuke Niwa 2023-07-06 02:50:20 PDT
customElements.define currently always traverses the entire document to find upgrade candidates.
Avoid this traversal whenever possible by keeping track of the number of upgrade candidates.
Comment 1 Ryosuke Niwa 2023-07-06 03:14:26 PDT
Pull request: https://github.com/WebKit/WebKit/pull/15592