WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
242167
The behaviors of screen.width and screen.height are different between iOS and Android
https://bugs.webkit.org/show_bug.cgi?id=242167
Summary
The behaviors of screen.width and screen.height are different between iOS and...
Takahiro Aoyagi
Reported
2022-06-29 22:27:59 PDT
** Problem The behaviors of screen.width and screen.height are different between iOS and Android. They return the screen width and height (in CSS pixels) based on (probably) the natural orientation on iOS Safari/Chrome while they do based on the current screen orientation on Android Chrome. ** Expected behavior Ideally the behaviors should be consistent across platforms. ** Specification The behavior on iOS Safari is same as the iOS Chrome. So I speculate the behavior on iOS comes from webkit. The specification doesn't seem to define whether screen.width and .height should be based on current screen orientation or natural orientation. It was discussed in the GitHub repository but no update since 2020 (because webkit/Safari devs were not involved?).
https://github.com/w3c/csswg-drafts/issues/5204
** Suggestion I would like to suggest 1. Discuss and clearly define the behavior in the specification. 2. Add a WPT test to ensure the cosistent behavior across platforms. I already made a CL for it.
https://chromium-review.googlesource.com/c/chromium/src/+/3711440
I hope people from the webkit team join the discussion and we can move it ahead. Who are the best people in the webkit team whom I should contact? And where is the best place for the discussion? The GitHub issue?
https://github.com/w3c/csswg-drafts/issues/5204
** Additional context I also filed an issue for Chromium
https://bugs.chromium.org/p/chromium/issues/detail?id=1338841
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-07-06 22:28:12 PDT
<
rdar://problem/96572827
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug