Descriptionadjust blink::equalIgnoringFragmentIdentifier to work better for data:
According to at least one source I can find[1] fragment identifiers are not defined for data: urls. Therefore, theoretically, "equal ignoring fragment identifier" is equivalent to "equal" when comparing two data: urls.
Currently, the function returns true for the following pair of inputs:
- data:text/html;charset=utf-8,<!-- http://www.example.com/demo#a -->foo
- data:text/html;charset=utf-8,<!-- http://www.example.com/demo#a -->ba
But these are clearly not actually equal.
This is causing issues for Chrome Autofill because it relies on this function to determine if a navigation was to a new page, triggering a re-parsing of the forms on the page. In practice, this won't come up very often because it's not particularly likely that a user will navigate between two data: URLs that trigger this bug. The issue was discovered because of a failing unit test which happened to navigate between two data URLs that were incorrectly identified as identical.
blink::equalIgnoringFragmentIdentifier is used in many places throughout Blink, so this change has the potential to cause unexpected impact. However, from my survey of a few existing uses, it doesn't seem likely that any piece of code expects the above two URLs to be considered "equal".
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=243917#c6
BUG=417922, 323093
Patch Set 1 #Patch Set 2 : add test #
Messages
Total messages: 22 (5 generated)
|