Implement same-document fragment navigation (Phase 17)
Add fragment navigation support: clicking <a href="#id"> scrolls to the
matching element without reloading the page. Handles fragment-only links,
cross-document URLs that only differ in fragment, and history traversal
for fragment changes.
Changes:
- Url::equals_ignoring_fragment() and Url::set_fragment() for detecting
and manipulating fragment-only URL changes
- Document::find_anchor_by_name() for legacy <a name="..."> fallback
- create_hashchange_event() for the HashChangeEvent JS object
- navigate_fragment() in the browser main loop: updates URL, pushes
history entry, scrolls to target element, fires hashchange
- navigate_to_link() now detects fragment-only links and same-document
fragment changes instead of ignoring them
- navigate_history() avoids page reload for fragment-only traversals
- find_element_y_in_layout() walks the layout tree to find an element's
absolute Y position for scroll targeting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>