Support server_redirect transitionQualifiers on sub-frame WebNavigation events

NEW
Unassigned

Status

()

Toolkit
WebExtensions: Request Handling
P3
normal
a year ago
6 months ago

People

(Reporter: rpl, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [webNavigation]triaged)

(Reporter)

Description

a year ago
The WebNavigation events are generated from a framescript (WebNavigationContent.js) using a WebProgressListener and a DOMContentLoaded event listener.

The WebProgressListener's onLocationChange is used to detect and send the onCommitted event (and the onReferenceFragmentUpdated / onHistoryStateUpdated), unfortunately onLocationChange is not currently called for the first loading of sub-frames, for reasons that are in a very remote history of that part of the codebase, e.g. following the lines with "hg annotate" we immediately reach the initial import into mercurial:

https://hg.mozilla.org/mozilla-central/annotate/6a20024567e3/docshell/base/nsDocShell.cpp#l2012

Currently, as a workarounding of this issue, the WebNavigationContent.js detects and sends the onCommitted events for sub-frames by simulating the missing WebProgressListener.onLocationChange from the WebProgressListener.onStateChange.

Unfortunately the server redirection happens after that and for this reason the onCommitted events for the sub-frames:

- doesn't support the server_redirect transitionQualifiers
- the reports URL of sub-frame is still the source URL (instead of the target URL of the redirection)

This bugzilla issue is about finding a better workaround / solution which can correctly detect the server_redirect transitionQualifier on sub-frame WebNavigation events.
(Reporter)

Updated

a year ago
Depends on: 1256652, 1262794
Whiteboard: [webNavigation]

Updated

a year ago
Whiteboard: [webNavigation] → [webNavigation]triaged

Updated

6 months ago
Component: WebExtensions: Untriaged → WebExtensions: Request Handling
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.