User agent string is incorrect in newly opened webview
Bug #1324909 reported by
Chris Coulson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Oxide |
Fix Released
|
High
|
Chris Coulson |
Bug Description
When a new webview is opened via window.open() and the new webview is in the same render process as the opener, the user agent string is incorrect until the first browser-initiated navigation
Changed in oxide: | |
status: | Triaged → Fix Released |
Changed in oxide: | |
milestone: | none → branch-1.1 |
Changed in oxide: | |
assignee: | nobody → Chris Coulson (chrisccoulson) |
To post a comment you must log in.
Setting the user agent string is done in 2 places:
- Setting RendererPrefere nces::user_ agent_override Navigate_ Params: :is_overriding_ user_agent, which is sent with the FrameMsg_Navigate IPC message for browser initiated navigations
- Setting FrameMsg_
content: :RenderFrameImp l::userAgentOve rride() only returns the override user agent string if InternalDocumen tStateData: :is_overriding_ user_agent( ) returns true. InternalDocumen tStateData is an object tied to the WebDataSource associated with a frame. It is created in content: :RenderFrameImp l::didCreateDat aSource( ), where:
- If there is a pending browser-initiated navigation, InternalDocumen tStateData: :set_is_ overriding_ user_agent( ) is called with the value set from the FrameMsg_Navigate message. tStateData: :set_is_ overriding_ user_agent( ) is called with the value from the previous data source associated with the frame.
- If the navigation is content initiated, InternalDocumen
For a newly opened webview, none of the above 2 conditions are met, and so the setting gets lost