Open Bug 1264936 Opened 8 years ago Updated 2 years ago

Support server_redirect transitionQualifiers on sub-frame WebNavigation events

Categories

(WebExtensions :: Request Handling, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: rpl, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [webNavigation]triaged)

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.
Depends on: 1256652, 1262794
Whiteboard: [webNavigation]
Whiteboard: [webNavigation] → [webNavigation]triaged
Component: WebExtensions: Untriaged → WebExtensions: Request Handling
Priority: -- → P3
Product: Toolkit → WebExtensions
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.