Remove non-standard window.mozInnerScreenX and window.mozInnerScreenY (or fix for Fission OOP iframes)
Categories
(Core :: Layout, task, P3)
Tracking
()
Fission Milestone | Future |
People
(Reporter: ablayelyfondou, Unassigned)
References
Details
(Keywords: dev-doc-needed)
Top level coordinates are being returned when calling window.mozInnerScreenX and window.mozInnerScreenY even inside OOP frames. Instead, I think those values should refer to the coordinates of the inner OOP frames.
Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
This API seems like something we should be removing from the Web. For internal use, it also doesn't seem like a great API in the face of transforms.
Comment 2•5 years ago
|
||
(In reply to Jonathan Watt [:jwatt] from comment #1)
This API seems like something we should be removing from the Web. For internal use, it also doesn't seem like a great API in the face of transforms.
WONTFIX because content process should not be allowed to know its screen coordinates. Parent process can map content process's document-relative coordinates to screen coordinates.
Comment 3•5 years ago
|
||
WONTFIX because content process should not be allowed to know its screen coordinates. Parent process can map content process's document-relative coordinates to screen coordinates.
Since these are in a publicly documented api, ( https://developer.mozilla.org/en-US/docs/Web/API/Window/mozInnerScreenX ), I think there is more to do here. Some websites might be using these. Either we deprecate or remove the properties and their corresponding documentation.
Comment 4•5 years ago
|
||
(In reply to Neil Deakin from comment #3)
Since these are in a publicly documented api, ( https://developer.mozilla.org/en-US/docs/Web/API/Window/mozInnerScreenX ), I think there is more to do here. Some websites might be using these. Either we deprecate or remove the properties and their corresponding documentation.
In that case, I'll reopen this bug. WONTFIX'ing this bug for Fission means some websites using mozInnerScreenX
or mozInnerScreenY
may be broken.
Some options to address this bug:
- Do nothing. If anyone reports a broken website, we can then reach out to the website or decide to actually fix this bug. What should web developers use instead of
mozInnerScreenX
ormozInnerScreenY
? - Remove
mozInnerScreenX
andmozInnerScreenY
. Websites accessing these properties will getundefined
values. Performing any math withundefined
will produce NaN coordinates. - Hard code
mozInnerScreenX
andmozInnerScreenY
to return 0 orwindow.screenX
andscreenY
.
Here is a proposal for standardizing innerScreenX
and innerScreenY
: https://github.com/w3c/csswg-drafts/issues/809. The use case given in the proposal is mapping screen coordinates from an eye-tracking device to a document-relative position on the web page.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 5•5 years ago
|
||
Note that now bug 1550800 landed, mozInnerScreen{X,Y} works properly in OOP iframes with transforms.
Updated•2 years ago
|
Updated•2 years ago
|
Description
•