This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29577 - "The screenX attribute must return the x-coordin..."
Summary: "The screenX attribute must return the x-coordin..."
Status: RESOLVED FIXED
Alias: None
Product: CSS
Classification: Unclassified
Component: CSSOM View (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-19 23:38 UTC by Chris Rebert
Modified: 2016-08-28 06:20 UTC (History)
0 users

See Also:


Attachments

Description Chris Rebert 2016-04-19 23:38:34 UTC
https://drafts.csswg.org/cssom-view/#dom-window-screenx

[[
The screenX attribute must return the x-coordinate, relative to the origin of the screen of the output device, of the left of the client window as number of pixels, or zero if there is no such thing.

The screenY attribute must return the y-coordinate, relative to the origin of the screen of the output device, of the top of the client window as number of pixels, or zero if there is no such thing.
]]

As a user, I don't feel that webpages have any business knowing where their window is located on my screen. I would like the spec to allow privacy-conscious browsers to pretend that all windows are always at the top-left of the screen, thus plugging this information leak.
Comment 1 L. David Baron (Mozilla) 2016-04-19 23:48:51 UTC
(This could even be discussed in the "Privacy Considerations" section of the spec that bikeshed keeps telling you to create.)
Comment 2 Simon Pieters 2016-04-26 09:11:48 UTC
Privacy considerations section is https://www.w3.org/Bugs/Public/show_bug.cgi?id=29533
Comment 3 Simon Pieters 2016-04-26 09:30:46 UTC
There's also mouseevent.screenX, screen.availWidth, screen.width (and heights).

I agree we should allow browsers to lie about the screen, but we should probably do so across the board; e.g. also the 'device-width' media feature.

For window.open()ed windows, where the author has given position and size in the "features" argument, the browser can also adjust the position and size so that the window will fit in the screen, which again would leak the size of the available space of the screen...
Comment 6 Simon Pieters 2016-08-25 12:27:24 UTC
Any thoughts about whether window.open() should use the new concepts?
Comment 7 Simon Pieters 2016-08-25 12:32:12 UTC
(In reply to Simon Pieters from comment #3)
> e.g. also the 'device-width' media feature.

https://github.com/w3c/csswg-drafts/issues/426
Comment 8 Chris Rebert 2016-08-28 06:20:56 UTC
(In reply to Simon Pieters from comment #6)
> Any thoughts about whether window.open() should use the new concepts?

Sounds reasonable. Would be less vague than the current "the available space" wording.