Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of trailing whitespace on url('#foo ') #22414

Merged
merged 1 commit into from Mar 24, 2020

Conversation

@chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Mar 24, 2020

When |is_local_| was true we'd extract the fragment "manually" from the
relative URL string. Always get the fragment from the resolved/absolute
URL instead to make behavior is consistent w.r.t trimming whitespace.
This requires making sure that base URLs are provided/set up properly in
a few more cases, so do that. Drop the |is_local_| check from
ReResolveUrl() because we now rely on the absolute URL in that case too.

This matches the behavior of SVGURLReferenceResolver's
FragmentIdentifier() which is used for non-CSS URL resolving for SVG
element references. Add test for the case of an invalid base URL.

Also add some tests for various non-CSS uses.

Bug: 949135, 1063694
Change-Id: I2ffb30677b196d650ddaf2a712d82ac6c20b50fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2115650
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752812}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2115650 branch from e57ec8d to 95b0038 Mar 24, 2020
When |is_local_| was true we'd extract the fragment "manually" from the
relative URL string. Always get the fragment from the resolved/absolute
URL instead to make behavior is consistent w.r.t trimming whitespace.
This requires making sure that base URLs are provided/set up properly in
a few more cases, so do that. Drop the |is_local_| check from
ReResolveUrl() because we now rely on the absolute URL in that case too.

This matches the behavior of SVGURLReferenceResolver's
FragmentIdentifier() which is used for non-CSS URL resolving for SVG
element references. Add test for the case of an invalid base URL.

Also add some tests for various non-CSS uses.

Bug: 949135, 1063694
Change-Id: I2ffb30677b196d650ddaf2a712d82ac6c20b50fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2115650
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752812}
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2115650 branch from 95b0038 to f123542 Mar 24, 2020
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit bfb1a2c into master Mar 24, 2020
13 checks passed
13 checks passed
Azure Pipelines Build #20200324.29 succeeded
Details
Azure Pipelines (./wpt test-jobs) ./wpt test-jobs succeeded
Details
Azure Pipelines (affected tests without changes: Safari Technology Preview) affected tests without changes: Safari Technology Preview succeeded
Details
Azure Pipelines (affected tests: Safari Technology Preview) affected tests: Safari Technology Preview succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests) wpt.fyi hook: safari-preview-affected-tests succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests-without-changes) wpt.fyi hook: safari-preview-affected-tests-without-changes succeeded
Details
Community-TC (pull_request) TaskGroup: success
Details
staging.wpt.fyi - chrome[experimental] Chrome results
Details
staging.wpt.fyi - firefox[experimental] Firefox results
Details
staging.wpt.fyi - safari[experimental] Safari results
Details
wpt.fyi - chrome[experimental] Chrome results
Details
wpt.fyi - firefox[experimental] Firefox results
Details
wpt.fyi - safari[experimental] Safari results
Details
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-2115650 branch Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants