PSA: Make window.screen report the display size when in fullscreen

Skip to first unread message

Mike Wasserman

Apr 14, 2023, 1:23:10 PM4/14/23
to blink-dev, Ajay Rahatekar, Brad Triebwasser,,,,

Contact emails



Make window.screen report the display size, instead of frame size, when in fullscreen.

A speculative browser-specific workaround in 2020 made window.screen return the frame size in fullscreen, for potential developer misuse of screen sizes for page layout in tab-capture fullscreen.

That workaround did not resolve any known defects, and causes unexpected Blink-specific behavior:

- screen sizes animate as windows enter/exit fullscreen

- screen sizes shrink when devtools or certain OS accessibility tools are docked in fullscreen

- screen sizes change in tab-capture fullscreen, and as that tab is made foreground or background

The change enables FullscreenScreenSizeMatchesDisplay by default, reverting those behaviors.

Blink component


TAG review

Not planned.


Any impact is constrained to limited circumstances (e.g. tab-capture or docked-devtools fullscreen), and this change restores parity with other browsers, but it is unclear to what extent sites might incorrectly rely on window.screen dimensions for fullscreen page layout. Manual inspection found a minor effect on a video player when its fullscreen frame was reduced to minimum dimensions.

The feature flag can be used to halt rollout, if significant issues arise.

Gecko & WebKit: No signal.

This increases parity with Firefox and Safari, but only Blink supports tab-capture.

Web developers: Positive.

Bug reports and partner interactions have been supportive of this change

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?


Is this feature fully tested by web-platform-tests?

Mostly - 

(WPTs cannot open and dock devtools or accessibility tools at the moment)

Flag name


Requires code in //chrome?


Tracking bug

Estimated milestones

Stable on M114

Reply all
Reply to author
0 new messages