WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
278511
[WPE] Consider actual available size instead of whole screen size for screen.availHeight and screen.availWidth
https://bugs.webkit.org/show_bug.cgi?id=278511
Summary
[WPE] Consider actual available size instead of whole screen size for screen....
Lauro Moura
Reported
2024-08-21 21:24:05 PDT
Created
attachment 472261
[details]
HTML example showing the window and screen dimensions Currently, `ScreenManagerWPE.cpp` `ScreenManager::collectScreenProperties()` assigns the whole `screenRect` to `screenAvailableRect`[1], ignoring possible constraints from system elements like docks and bars. For example, in my 2560x1440 Gnome 45 desktop, `screen.availHeight` should be 1408 instead of the current 1440, to account for the top desktop bar. In the attached example, WPE and Firefox report 1440 while Chromium reports the expected 1408. This is making the Selenium maximize WebDriver tests to fail (see
bug277945
), as they compare the JS `window.outerWidth/Height` to the `screen.availWidth/Height`. While the window is actually maximized, as it compares with the whole screen size instead of the actual available size, the test fails. This probably will require some new API to WPEMonitor and, in case of Wayland, using the `xdg_toplevel::configure_bound event[2] to get the actual available size. [1]
https://developer.mozilla.org/en-US/docs/Web/API/Screen/availHeight
[2]
https://wayland.app/protocols/xdg-shell#xdg_toplevel:event:configure_bounds
Attachments
HTML example showing the window and screen dimensions
(1.22 KB, text/html)
2024-08-21 21:24 PDT
,
Lauro Moura
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Lauro Moura
Comment 1
2024-08-21 23:37:59 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/32578
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