Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Issue 610493002: adjust blink::equalIgnoringFragmentIdentifier to work better for data: (Closed)

Created:
6 years, 2 months ago by Evan Stade
Modified:
6 years, 2 months ago
Reviewers:
abarth-chromium
CC:
blink-reviews, mkwst+moarreviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

adjust 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -0 lines) Patch
M Source/platform/weborigin/KURL.cpp View 1 1 chunk +3 lines, -0 lines 0 comments Download
M Source/platform/weborigin/KURLTest.cpp View 1 1 chunk +34 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (5 generated)
Evan Stade
Here's my stab in the dark at fixing this bug (perhaps instead of changing this ...
6 years, 2 months ago (2014-09-26 00:10:47 UTC) #2
Evan Stade
+jamesr
6 years, 2 months ago (2014-09-29 15:30:31 UTC) #4
jamesr
KURL is more Adam's bag, I don't know enough about the details of URLs to ...
6 years, 2 months ago (2014-09-29 22:29:13 UTC) #6
Evan Stade
ping abarth
6 years, 2 months ago (2014-10-13 18:32:51 UTC) #7
abarth-chromium
This CL lacks a description of the problem you're solving and lacks a test. It's ...
6 years, 2 months ago (2014-10-13 20:17:22 UTC) #8
Evan Stade
On 2014/10/13 20:17:22, abarth wrote: > This CL lacks a description of the problem you're ...
6 years, 2 months ago (2014-10-13 20:42:04 UTC) #9
Evan Stade
On 2014/10/13 20:42:04, Evan Stade wrote: > On 2014/10/13 20:17:22, abarth wrote: > > This ...
6 years, 2 months ago (2014-10-13 20:43:11 UTC) #10
abarth-chromium
I've removed myself as a reviewer.
6 years, 2 months ago (2014-10-13 23:29:18 UTC) #12
Evan Stade
+abarth again Apologies if the above offended you. I gather the description at [1] is ...
6 years, 2 months ago (2014-10-14 00:14:07 UTC) #14
abarth-chromium
On 2014/10/14 at 00:14:07, estade wrote: > Apologies if the above offended you. I gather ...
6 years, 2 months ago (2014-10-14 00:59:00 UTC) #15
Evan Stade
updated description and added tests. ptal.
6 years, 2 months ago (2014-10-14 22:38:42 UTC) #16
abarth-chromium
Was this a regression from https://codereview.chromium.org/23835019?
6 years, 2 months ago (2014-10-15 01:49:01 UTC) #17
Evan Stade
On 2014/10/15 01:49:01, abarth wrote: > Was this a regression from https://codereview.chromium.org/23835019 That seems quite ...
6 years, 2 months ago (2014-10-15 21:38:15 UTC) #18
abarth-chromium
It sounds like android_webview and the autofill code have different philosophical positions as to whether ...
6 years, 2 months ago (2014-10-16 00:45:11 UTC) #19
Evan Stade
On 2014/10/16 00:45:11, abarth wrote: > It sounds like android_webview and the autofill code have ...
6 years, 2 months ago (2014-10-16 00:53:53 UTC) #20
abarth-chromium
On 2014/10/16 at 00:53:53, estade wrote: > What is the definition of a fragment in ...
6 years, 2 months ago (2014-10-16 01:00:35 UTC) #21
Evan Stade
6 years, 2 months ago (2014-10-16 01:04:33 UTC) #22
OK, thanks for the explanation.

Powered by Google App Engine
This is Rietveld 408576698