Open Bug 1555138 Opened 5 years ago Updated 2 years ago

Remove non-standard window.mozInnerScreenX and window.mozInnerScreenY (or fix for Fission OOP iframes)

Categories

(Core :: Layout, task, P3)

task

Tracking

()

REOPENED
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.

Summary: and window.mozInnerScreenY returns the wrong coordinates in OOP frames → window.mozInnerScreenX and window.mozInnerScreenY returns the wrong coordinates in OOP frames
No longer blocks: 1443683
Blocks: 1533958

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.

Blocks: 1560627

(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.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX

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.

(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 or mozInnerScreenY?
  • Remove mozInnerScreenX and mozInnerScreenY. Websites accessing these properties will get undefined values. Performing any math with undefined will produce NaN coordinates.
  • Hard code mozInnerScreenX and mozInnerScreenY to return 0 or window.screenX and screenY.

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.

Status: RESOLVED → REOPENED
Type: defect → task
Fission Milestone: --- → Future
Priority: P2 → P3
Resolution: WONTFIX → ---
Summary: window.mozInnerScreenX and window.mozInnerScreenY returns the wrong coordinates in OOP frames → Remove non-standard window.mozInnerScreenX and window.mozInnerScreenY (or fix for Fission OOP iframes)

Note that now bug 1550800 landed, mozInnerScreen{X,Y} works properly in OOP iframes with transforms.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.