Closed Bug 1647551 Opened 4 years ago Closed 4 years ago

Ensure "platform" override in Emulation.setUserAgentOverride applies only to the current tab

Categories

(Remote Protocol :: CDP, task, P3)

task

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: gl, Assigned: gl)

References

(Blocks 1 open bug)

Details

In Bug 1595710, we added support for "platform" to Emulation.setUserAgentOverride, which applies the platform override to all targets / tabs at once. This bug covers looking at applying the platform override to the current tab only.

Blocks: 1596097

Hi Nika and smaug, I think we're looking at implementing a "platform" override similar to general.platform.override onto the docShell so that we emulate the returned navigator.platform per tab instead of the global setting. Wanted to get your general thoughts about the approach and more guidance on how to contribute the change to the docShell.

Flags: needinfo?(nika)
Flags: needinfo?(bugs)

Note that it might be similar to the user agent override, which works like a charm via the docShell.

You probably want to add a synced field to the BrowsingContext like PlatformOverride and set it from the parent process. You'd then read it from the BrowsingContext in the corresponding child process to return the correct value.

Flags: needinfo?(nika)
Flags: needinfo?(bugs)
Assignee: nobody → gl
Status: NEW → ASSIGNED
Depends on: 1647972

Closing this since we are already working on Bug 1647972 first to avoid overriding the platform for all targets.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
No longer depends on: 1595710
Component: CDP: Emulation → CDP
You need to log in before you can comment on or make changes to this bug.