Do not dispatch popstate or hashchange when hasRef changes.
This behavior was already agreed upon in
whatwg/html#7386, but bug 1544428 was an
implementation edge case needing to be fixed.
An exception is when the fragment contains a directive, in which case a
difference in hasRef
is sufficient, to retain existing behavior WRT
directives.
Although bug 1544428 is about popstate, hashchange was erroneously being
dispatched, as well, which this patch fixes.
Some tests that depended on the old behavior are updated.
Differential Revision: https://phabricator.services.mozilla.com/D225567
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1544428
gecko-commit: 80bb463edec5a6e91258e1d507196255c60070f4
gecko-reviewers: jjaschke, dom-core, sessionstore-reviewers, dao, farre