-
Notifications
You must be signed in to change notification settings - Fork 60
Add "emulation.setScreenSettingsOverride" command. #1030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
With the [feature request] Specification for emulation · Issue #151 · w3c/window-management for Window Management specification, I believe eventually we want to emulate screens fully. Can we make the command more generic so that it can be extended with other emulated properties? |
Sure, we can do that. I was just thinking that since we already have orientation override in a separate command and device pixel ration in the |
|
I think grouping makes more sense than having many commands that all need to be sent separately. If it makes sense later we can make existing commands options for the new command. |
|
Alright, I've renamed the command to |
|
General thoughts: eventually, to emulate |
I think we could introduce then screen IDs and specify this emulation for a screen id. We will have to decide then if the emulation keeps getting attached to a browsing context/user context no matter on which screen it's, or it will be attached to that screen and if browser window are moved around it uses different settings. |
It's not a blocker. |
sadym-chromium
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! I'd only propose to implement the global config right away, but I'l leaving it up to you.
Closes #981.
My approach was to more or less to document the current implementation of Responsive Design mode behaviour of browsers. That's why I think for this specific command it makes more sense to override it on the CSS spec level since it touches exactly the data which we currently override. That's also why I think we have to override not just dimensions, but the coordinates as well (they are currently reset when setting the dimensions). It might be useful in the future to allow in the future to set coordinates as well (?). So that's why I came up with the name
setScreenAreaOverriderather thansetScreenDimensionsOverrideor something else.The draft PR in the CSS spec to illustrate how it might look like there: w3c/csswg-drafts#13091.
Let me know what you think.
Preview | Diff