Bug 216395 - "display-mode: fullscreen" media query should match in fullscreen browser windows
Summary: "display-mode: fullscreen" media query should match in fullscreen browser win...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://output.jsbin.com/sizejuw/quiet
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-09-10 19:36 PDT by Simon Fraser (smfr)
Modified: 2023-01-18 10:15 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Radar WebKit Bug Importer 2020-09-10 19:36:56 PDT
<rdar://problem/68680815>
Comment 2 Johan Brook 2023-01-18 00:37:49 PST
We're having a real problem of not being able to distinguish macOS fullscreen mode from normal a "maximised" browser window.

We've tried various techniques of measuring the window width/height and comparing with window.screen values, but it yields inconsistent results for laptop and external monitor screens.

Ideally, the test below (http://output.jsbin.com/sizejuw/quiet) would say "Fullscreen: Yes" when a Safari window is put in macOS fullscreen mode. That CSS Media Query could also be used from Javascript. Second best, there'd be a Javascript API in the Fullscreen API spec for this (the existing APIs only seem to concern themselves with putting specific elements into fullscreen – not the window itself).