[Webkit-unassigned] [Bug 278511] New: [WPE] Consider actual available size instead of whole screen size for screen.availHeight and screen.availWidth

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 21 21:24:05 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=278511

            Bug ID: 278511
           Summary: [WPE] Consider actual available size instead of whole
                    screen size for screen.availHeight and
                    screen.availWidth
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WPE WebKit
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: lmoura at igalia.com
                CC: bugs-noreply at webkitgtk.org

Created attachment 472261

  --> https://bugs.webkit.org/attachment.cgi?id=472261&action=review

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240822/f17697a9/attachment-0001.htm>


More information about the webkit-unassigned mailing list