Closed kenchris closed 3 years ago
IIUC, the Visual Viewport API appears to expose information about the scaling and scrolling of content within a Window. That seems mostly tangential to the Window's placement in relationship to the set of connected Screens.
The VisualViewport.scale seems to be a combination of page and pinch zooms, so Window.devicePixelRatio is a more directly comparable concept for the OS/WM's per-display-device scale factor we propose exposing for each Screen.
@bokand please let me know if there's a better alignment we can seek between these two proposals; thanks!
IIUC the proposal correctly, it seems like a way to map browser windows/elements onto specific screens in multi-screen scenarios? If this is limited to window granularity then I agree with the above, I don't think this has any specific or unique integration with visual viewport - each window would continue to have its own visualViewport whose size comes from the window size and page scale. Any kind of size/density effects would naturally be effected via layout.
The VisualViewport.scale seems to be a combination of page and pinch zooms,
It's actually just pinch-zoom so the situation is even simpler here.
LMK if there's something specific I'm missing.
Yeah, Window Placement concerns opening/moving windows on other displays and requesting fullscreen on specific displays in multi-screen scenarios; building on existing Window.open/moveTo and Element.requestFullscreen APIs. That relationship of outer window bounds to a set of screens seems mostly tangential to the Visual Viewport API's mapping of inner window/frame bounds to the document's visual space. I'm going to close this issue, but feel free to reopen if there are any specific concepts or patterns that would benefit from alignment.
Also visual viewport uses "scale" and not "devicePixelRatio"
https://wicg.github.io/visual-viewport/