On Chromium Linux, we currently use XDisplayWidth() and XDisplayHeight() to get the screen dimensions in WebScreenInfoFactory (this code is only used for Chrome OS; the Linux port calls it but then overwrites the data that it returns). These dimensions are stale after the screen is resized. I have a patch to make us instead query the root window's geometry each time. Even better would be using XRandR to query the monitor dimensions, but that's a more involved change.
Created attachment 95236 [details] Patch
Comment on attachment 95236 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=95236&action=review > Source/WebKit/chromium/src/x11/WebScreenInfoFactory.cpp:54 > + XGetGeometry( > + display, root, &rootRet, &x, &y, &width, &height, &border, &depth); Should you check the return status?
I don't think it'd accomplish anything: 1. I think that it's impossible for this to fail, and (more importantly), 2. If it does fail, we'll get an error back from the X server and crash. Xlib return values are sort of a joke. :-(
The commit-queue encountered the following flaky tests while processing attachment 95236 [details]: http/tests/websocket/tests/handshake-fail-by-sub-protocol-mismatch.html bug 53809 (author: abarth@webkit.org) The commit-queue is continuing to process your patch.
Comment on attachment 95236 [details] Patch Clearing flags on attachment: 95236 Committed r87764: <http://trac.webkit.org/changeset/87764>
All reviewed patches have been landed. Closing bug.
The commit-queue encountered the following flaky tests while processing attachment 95236 [details]: http/tests/websocket/tests/error-detect.html bug 54012 (author: abarth@webkit.org) The commit-queue is continuing to process your patch.