Files
tubestation/browser/base/content/test/scroll-to-text-fragment/scroll-to-text-fragment-from-browser-chrome-target.html
Jan-Niklas Jaeschke d4ee399d4e Bug 1904773 - Text Fragments: Implemented makeshift user involvement check. r=edgar,dom-core,frontend-codestyle-reviewers
User involvement as defined in the spec is not implemented in Gecko yet.
Therefore, the changes introduced in Bug 1888756 disallowed scrolling to text directives if the load was triggered by the user, eg. by pasting a link with a text fragment into the url bar.

This patch checks if the triggering principal of the load is the system principal.
This is equivalent to the "browser UI" value of user involvement.

Differential Revision: https://phabricator.services.mozilla.com/D214409
2024-07-01 11:24:08 +00:00

15 lines
415 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Scroll to a text fragment triggered by browser chrome (Bug 1904773)</title>
</head>
<body>
<p>Some initial content...</p>
<!-- Add a lot of content to ensure scrolling is needed -->
<div style="height: 200vh;"></div>
<p id="target">This is the text fragment to scroll to.</p>
<div style="height: 200vh;"></div>
</body>
</html>