There's a few places where Chrome's implementation has drifted from the spec. In particular, Chrome allows text directives in iframes, as long as the initiator is same origin with the iframe's document.
Another place where I need to take a closer look is restrictions around same-document navigations.
More generally, we need to survey what other implementations are doing, ensure there's good browser test coverage and that the spec is up-to-date with real-world behavior.
Indeed, the spec implicitly forbids same-document scrolling by virtue of the "text fragment user activation" bit being set in the document creation steps, but:
In Main Frame both Chrome and Safari allow same-document scrolling, even without user-activation from same-origin initiator
Safari allows even a cross-origin initiator to scroll the main frame to a text directive, without a user activation
Subframes
The spec blocks all text directive navigations in subframes
Safari does too
Chrome allows iframes to navigate if the initiator is same-origin
No user gesture requirement for same-document navigations
There's a few places where Chrome's implementation has drifted from the spec. In particular, Chrome allows text directives in iframes, as long as the initiator is same origin with the iframe's document.
Another place where I need to take a closer look is restrictions around same-document navigations.
More generally, we need to survey what other implementations are doing, ensure there's good browser test coverage and that the spec is up-to-date with real-world behavior.