[wpt-sync] Sync PR 28115 - Fix scroll-to-text-fragment behavior for same-document navigation
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox88 fixed)
| Tracking | Status | |
|---|---|---|
| firefox88 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 28115 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/28115
Details from upstream follow.
b'Stefan Zager <szager@chromium.org>' wrote:
Fix scroll-to-text-fragment behavior for same-document navigation
A same-document navigation to a URL with a text fragment anchor
should not scroll the page to the text fragment. The test
modified by this CL is meant to test that. However, that behavior
was broken by this CL:https://chromium-review.googlesource.com/c/chromium/src/+/2533688
The reason the test hasn't been failing is that it has been checking
to see whether the page was scrolled too soon. When a text fragment
anchor finds a match, it doesn't scroll the page right away; it
schedules a task to scroll the page which runs at rAF timing on the
next lifecycle update. This scheduling behavior was added by:https://chromium-review.googlesource.com/c/chromium/src/+/2182992
Just adding requestAnimationFrame to the test caused it to fail;
the change to document_loader.cc fixes it.Bug: 1147453
Change-Id: I001a315418f5f8a61ded7d87023740cd366389f8
Reviewed-on: https://chromium-review.googlesource.com/2766287
WPT-Export-Revision: a173f284a2e783c9367f573efd056590c73fce44
| Assignee | ||
Comment 1•4 years ago
|
||
| Assignee | ||
Comment 2•4 years ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 2 subtests
Status Summary
Firefox
OK : 1
PASS: 1
FAIL: 1
Chrome
OK : 1
PASS: 1
FAIL: 1
Safari
OK : 1
PASS: 1
FAIL: 1
Links
Details
New Tests That Don't Pass
/scroll-to-text-fragment/scroll-to-text-fragment-same-doc.html
Test that a text fragment directive cannot be activated on a same-document navigation: FAIL (Chrome: FAIL, Safari: FAIL)
Comment 4•4 years ago
|
||
| bugherder | ||
Description
•