Open Bug 1898630 Opened 4 months ago Updated 2 months ago

force-load-at-top shouldn't block scrolling for a same-doc navigation triggered before the document is fully loaded

Categories

(Core :: DOM: Navigation, defect)

defect

Tracking

()

People

(Reporter: mccr8, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Unlike the other text fragment scrolling tests, the new test (from bug 1895555) same-document-test-sync-load.html triggers a same-document navigation before the document has finished loading. This makes it so the scrolling is done in Document::ScrollToRef() instead of in nsDocShell::ScrollToAnchor() (via DocShell::HandleSameDocumentNavigation()). This means that if force-load-at-top is set, we end up skipping the scroll.

jjaschke suggested we need to track somewhere that this was a same document navigation, and then we could check that in Document::ScrollToRef() at the same time we're checking force-load-at-top. I put together a hacky prototype of that and it fixed the test.

This makes it so that same-document-test-sync-load.html with force-load-at-top
passes. ie so that it actually scrolls.

Depends on: 1888756
Component: DOM: Core & HTML → DOM: Navigation

Hi Andrew,

I think we can close this, right? The test seems to pass on m/c.

Flags: needinfo?(continuation)

I think the problem here was that the test didn't pass with force-load-at-top set, which is not being tested. I think the goal was to modify this test to cover FLAT variations, as I did in bug 1898536.

Flags: needinfo?(continuation)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: