Wrong navigation id in browsingContext.load if the page performs a fragment or same-document navigation
Categories
(Remote Protocol :: WebDriver BiDi, defect, P2)
Tracking
(firefox133 fixed)
Tracking | Status | |
---|---|---|
firefox133 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
()
Details
(Whiteboard: [webdriver:m13], [wptsync upstream][webdriver:relnote])
Attachments
(2 files)
See https://github.com/puppeteer/puppeteer/issues/13041#issuecomment-2389033038
Potentially regressed by Bug 1879163, but overall the navigation manager is storing the latest navigation id in a map, and this is used by various events (eg domContentLoaded, load etc...) in order to know to which navigation they are linked.
What happens in this scenario, loading google.com is:
- navigate command sent
- navigationStarted event with id A
- same document navigation detected for google.com with id B
- domContentLoaded emitted with navigation id B
- load emitted with navigation id B
Assignee | ||
Comment 1•10 months ago
|
||
It is relatively easy to align Firefox on Chrome's behavior here. The overall idea is that a fragment or same-document navigation should not override the ongoing navigation id of a regular navigation. Those "instant" navigations don't really relate to the upcoming domContentLoaded/load events, so we should just avoid storing them if there is already an ongoing navigation.
Assignee | ||
Comment 2•10 months ago
|
||
Fragment and same-document navigations could override an ongoing navigation and lead browsing
context events such as load and domContentLoaded events to no longer be linked to the expected navigation
id.
Updated•10 months ago
|
Assignee | ||
Comment 3•10 months ago
|
||
Depends on D224385
Assignee | ||
Comment 4•10 months ago
|
||
File a spec issue to check the correctness
Comment 7•10 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9b87f575c8d1
https://hg.mozilla.org/mozilla-central/rev/eb9f5edc1307
Comment 9•9 months ago
|
||
(In reply to Julian Descottes [:jdescottes] from comment #4)
File a spec issue to check the correctness
Hi Julian, I assume this spec issue still needs to be filed?
Assignee | ||
Updated•9 months ago
|
Assignee | ||
Updated•9 months ago
|
Assignee | ||
Comment 10•8 months ago
|
||
I read the spec again, and the navigation id we are supposed to receive in the navigate command is specifically the during-loading navigation ID for WebDriver BiDi
(https://html.spec.whatwg.org/#concept-document-navigation-id) which is set on the when the navigation starts.
So it should not indeed be affected by same document navigations occurring during the actual navigation.
Description
•