Contact emails
chomi...@google.com
Specification
https://www.w3.org/TR/cssom-view-1/#dom-window-screenx
Summary
Chrome on Android accurately reports the browser window's position and size using window.screenX, window.screenY, window.outerWidth, and window.outerHeight.
Previously Chrome incorrectly assumed all browser windows on Android start at coordinates (0, 0). This is inaccurate for Android tablets using freeform windowing mode, causing websites to always receive 0 when querying the window's on-screen position using window.screenX and window.screenY (these fields store the coordinates of window's top-left corner in global work area coordinate space).
Moreover, Chrome on Android incorrectly assumed that outer dimensions of the browser window are equal to the inner dimensions of the website viewport.
Remark: window.screenX and window.screenY have aliases, window.screenLeft and window.screenTop.
Blink component
Blink>HTML
Web Feature ID
window
Motivation
Chrome on Android in desktop form factors should be in functional parity with Chrome for other desktop operating systems. This includes the ability to report valid window position to websites that query window.screenX or window.screenY fields (also aliases, window.screenLeft and window.screenTop).
Initial public proposal
No information provided
Search tags
window,
position,
screen,
coordinates,
android
TAG review
No information provided
TAG review status
Not applicable
Risks
Interoperability and Compatibility
No information provided
Gecko: No signal
WebKit: No signal
Web developers: No signals
Other signals:
WebView application risks
Does this intent deprecate or change behavior of existing APIs,
such that it has potentially high risk for Android WebView-based
applications?
This should not change any observable behavior of WebView.
Debuggability
No information provided
Will this feature be supported on all six Blink platforms
(Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
Yes
No
Flag name on about://flags
android-use-correct-window-bounds
Finch feature name
AndroidUseCorrectWindowBounds
Rollout plan
Will ship enabled for all users
Requires code in //chrome?
False
Tracking bug
https://g-issues.chromium.org/issues/417632037
Launch bug
https://launch.corp.google.com/launch/4400019
Availability expectation
N/A – Chrome for Android catches up.
Adoption expectation
Already widely adopted – recently 16% of all page loads use window.screenX per
https://chromestatus.com/metrics/feature/timeline/popularity/2712.
Adoption plan
N/A
Non-OSS dependencies
Does the feature depend on any code or APIs outside the Chromium
open source repository and its open-source dependencies to
function?
Depends on Android providing a public API for apps to learn whereabouts of the windows they are in.
Estimated milestones
Anticipated spec changes
Open questions about a feature may be a source of future web compat or
interop issues. Please list open issues (e.g. links to known github
issues in the project for the feature specification) whose resolution
may introduce web compat/interop risk (e.g., changing to naming or
structure of the API in a non-backward-compatible way).
No spec changes – Chrome for Android catches up.
Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5164958878531584?gate=6272126285512704
Links to previous Intent discussions
Intent to Prototype:
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAz0gKehdm7rOzKSmQZ99L%3DJoYs6XTOip8fbxBhAqB7F6YE7EQ%40mail.gmail.com