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

Strip the fragment directive and update scroll-to-text WPT #18898

Merged
merged 1 commit into from Sep 9, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Sep 6, 2019

Scroll to text defines a double-hash as the URL fragment directive[1].
The fragment directive should always be stripped from the URL to avoid
breaking pages that use the fragment for state. Our implementation
previously only stripped the fragment directive if we parsed targetText.

Also improved the web platform test to test whether the target scrolls
to the element or text fragment as expected.

Tested updated WPT locally with
run_web_tests.py --additional-driver-flag=
'--enable-blink-features=TextFragmentIdentifiers'

[1] whatwg/url#445

Bug: 994818
Change-Id: I48109683a5e5ba162f1db72b1c5b174f3b017251
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1772166
Commit-Queue: Nick Burris <nburris@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694407}

Copy link
Collaborator

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

Scroll to text defines a double-hash as the URL fragment directive[1].
The fragment directive should always be stripped from the URL to avoid
breaking pages that use the fragment for state. Our implementation
previously only stripped the fragment directive if we parsed targetText.

Also improved the web platform test to test whether the target scrolls
to the element or text fragment as expected.

Tested updated WPT locally with
run_web_tests.py --additional-driver-flag=
  '--enable-blink-features=TextFragmentIdentifiers'

[1] whatwg/url#445

Bug: 994818
Change-Id: I48109683a5e5ba162f1db72b1c5b174f3b017251
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1772166
Commit-Queue: Nick Burris <nburris@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694407}
@Hexcles
Copy link
Member

Hexcles commented Sep 9, 2019

Feature requires code that hasn't shipped in Chromium Dev yet.

@Hexcles Hexcles merged commit 603a271 into master Sep 9, 2019
@Hexcles Hexcles deleted the chromium-export-cl-1772166 branch September 9, 2019 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants