Bug 242611

Summary: Document::shouldMaskURLForBindings and Element::getAttributeForBindings have various issues
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: WebCore Misc.Assignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   

Description Timothy Hatcher 2022-07-11 15:12:29 PDT
1) Document::shouldMaskURLForBindings should return false if the document's URL is the same as the URL being checked. It does not make sense to mask these, since they are from the same protocol (and it can break scripts that rely on these URLs being unmasked).
2) Element::getAttributeForBindings is always passing the attribute value to completeURLsInAttributeValue(). However, we only need to do this for URL attributes, by checking isURLAttribute(). This caused a large performance regression on Speedometer's AngularJS-TodoMVC and some other subtests that are attribute heavy.

rdar://81991245
Comment 1 Timothy Hatcher 2022-07-11 15:45:28 PDT
Pull request: https://github.com/WebKit/WebKit/pull/2309
Comment 2 EWS 2022-07-13 10:00:25 PDT
Committed 252418@main (eec128ed1111): <https://commits.webkit.org/252418@main>

Reviewed commits have been landed. Closing PR #2309 and removing active labels.