← Back to release summary

Show true window position on Android

Category
Capabilities (Fugu)
Type
Chromium catches up
Status
Proposed (Chrome Proposed)
Intent stage
None

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.

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).

Standards & signals

View on chromestatus.com