Closed Bug 582361 Opened 14 years ago Closed 1 year ago

Implement HTML5-compliant navigation to fragment

Categories

(Core :: DOM: Navigation, task)

task

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
blocking2.0 --- -
firefox119 --- fixed

People

(Reporter: hsivonen, Assigned: mathew.hodson)

References

(Blocks 1 open bug, )

Details

(Keywords: html5)

Attachments

(1 file)

Web compat requires percent encoding in the fragment id of a URL to match similarly percent-encoded name attribute value on the <a> element. Gecko's old HTML parser special-cases the name attribute on <a> to make this work. HTML5 puts the special behavior on the URL processing side at the time of the navigation. To avoid breaking stuff, we should be HTML5-compliant of both sides (parser and navigation). Currently, only the parser side is compliant. See bug 436006 comment 17.
Making the navigation compliant involves things like bug 483660 (hello, possibly web-incompatible change!), last I checked. Also see bug 436006 and bug 483304. By some beta we need to do something here: either fix bug 483660 and audit all consumers and fix them as needed, or change the HTML5 parser behavior. Questions are: 1) Which beta. 2) Who's going to do it?
Depends on: 483660
I guess a third option is somehow revamping how we do navigation so that scrolls to anchor don't involve URIs... but that would only work for same-page anchors anyway.
(In reply to comment #1) > 2) Who's going to do it? Not me in the Firefox 4 timeframe. I guess this means that I'll have add the old Geckoism to the HTML5 parser for now. :-(
(In reply to comment #3) > (In reply to comment #1) > > 2) Who's going to do it? > > Not me in the Firefox 4 timeframe. I guess this means that I'll have add the > old Geckoism to the HTML5 parser for now. :-( Filed bug 582940 about the contingency plan in case we don't find Someone Else to fix this bug in time for Firefox 4. (I want to work on this bug, but I'm guessing I won't have the time in the Firefox 4 timeframe.)
Not blocking on this, but bug 582940 does block.
blocking2.0: ? → -
Hey Alphan, you already did some cleanup to fragment navigation right? Perhaps you want to tackle this too?
Flags: needinfo?(alchen)
Okay, I will take the bug and investigate the related stuff first.
Assignee: nobody → alchen
Flags: needinfo?(alchen)
I wrote more tests for this over at https://github.com/w3c/web-platform-tests/pull/8723 and also updated the HTML Standard at https://github.com/whatwg/html/pull/3111. It should be all good to implement now, but the new algorithm doesn't match any browser exactly so this will have to be changed carefully.
Severity: normal → S3
Type: defect → task
Assignee: nobody → mathew.hodson
Attachment #9351409 - Attachment description: WIP: Bug 582361 - Align scrolling to a fragment with HTML spec → Bug 582361 - Align scrolling to a fragment with HTML spec. r?emilio
Status: NEW → ASSIGNED
Depends on: 582940
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ce9c917d3e22 Align scrolling to a fragment with HTML spec. r=emilio
Blocks: 1853019

There is an existing Android failure that isn't resolved by this patch, so I will keep that expected FAIL annotation.

Flags: needinfo?(mathew.hodson)
See Also: → 436006
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/52586ac7f9ad Align scrolling to a fragment with HTML spec. r=emilio
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
Blocks: 1650050
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: