Originally, the algorithm was designed to be capable of dealing with full URLs and finding the fragment in it. However, all usages of the parser use a `Ref` from an `nsIURI`, so checking for full URLs is not necessary. Simplifying this makes the algorithm easier to understand and makes it also parse edge cases like `#:~:text=#` correctly (which is invalid wrt the URL spec, but should work regardless). Differential Revision: https://phabricator.services.mozilla.com/D218051