Bug 61679

Summary: screen.width and screen.height are stale after screen resize on Chromium Linux
Product: WebKit Reporter: Daniel Erat <derat>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Minor CC: commit-queue, tony
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch none

Description Daniel Erat 2011-05-27 17:51:03 PDT
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.
Comment 1 Daniel Erat 2011-05-27 17:58:45 PDT
Created attachment 95236 [details]
Patch
Comment 2 Tony Chang 2011-05-27 18:02:31 PDT
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?
Comment 3 Daniel Erat 2011-05-27 18:08:06 PDT
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. :-(
Comment 4 WebKit Commit Bot 2011-05-31 17:42:07 PDT
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 5 WebKit Commit Bot 2011-05-31 17:43:43 PDT
Comment on attachment 95236 [details]
Patch

Clearing flags on attachment: 95236

Committed r87764: <http://trac.webkit.org/changeset/87764>
Comment 6 WebKit Commit Bot 2011-05-31 17:43:47 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 WebKit Commit Bot 2011-05-31 17:51:46 PDT
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.