UNCONFIRMED 96447
screen.availTop and screen.availLeft values are incorrect on systems with multiple displays
https://bugs.webkit.org/show_bug.cgi?id=96447
Summary screen.availTop and screen.availLeft values are incorrect on systems with mul...
Charles d'Harcourt
Reported 2012-09-11 16:32:02 PDT
STEPS TO REPRODUCE: 1. Set up a system with two displays of different heights, with the top of the displays _not_ lined up. The numbers below correspond to a 30" display connected to and placed to the left of a MacBook Pro 15", with the bottoms of the displays lined up and the 15" display set as the primary one (the one with the menu bar). The numbers would be different for different types of display and different operating system, but any setup with unaligned display tops should experience the problem. 2. Make sure the display arrangement is know to the operating system (System Preferences->Display->Arrangement on OS X). 3. Open a window in the primary display and bring up the JavaScript console for that window. 4. In that JavaScript console, enter "screen" and note the values of the object logged. You should get values like the following, with the unexpected values marked with arrows: screen1.width: 1680 screen1.height: 1050 screen1.availWidth: 1676 <<<<<< A: Expected 1680 screen1.availHeight: 1028 screen1.availLeft: 0 screen1.availTop: 22 5. Open up another window in the other display and bring up the JavaScript console for it. 6. In that JavaScript console, enter "screen" and note the values of the object logged. You should get values like: screen2.width: 2560 screen2.height: 1600 screen2.availWidth: 2560 screen2.availHeight: 1600 screen2.availLeft: -2560 screen2.availTop: 0 <<<< B: Expected -550 EXPECTED AND ACTUAL BEHAVIOR: A: Expected 1680 because the whole width of the window should be available. The actual value is 4 pixels less. B: Expected -550 because that is the Y coordinate of the top pixels of that screen relative to the Y coordinate of the top of the primary screen.
Attachments
Charles d'Harcourt
Comment 1 2012-09-11 16:32:57 PDT
Ahmad Saleem
Comment 2 2022-08-09 14:38:55 PDT
These two are not in spec and not standardised: https://github.com/w3c/csswg-drafts/issues/1090 It is still open issue. Just wanted to keep it updated. rniwa@webkit.org - do you familiar with whether Window Placement API is going to replace this because Chrome bug seems to indicate that it might but it might also have similar limitation? Thanks!
Simon Fraser (smfr)
Comment 3 2022-08-09 15:15:43 PDT
There are privacy/fingerprinting issues here. I would prefer that a web page was not able to deduce that you had multiple displays.
Note You need to log in before you can comment on or make changes to this bug.