Bug 242611 - Document::shouldMaskURLForBindings and Element::getAttributeForBindings have various issues
Summary: Document::shouldMaskURLForBindings and Element::getAttributeForBindings have ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Timothy Hatcher
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-07-11 15:12 PDT by Timothy Hatcher
Modified: 2022-07-13 10:00 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.