Closed Bug 23915 Opened 25 years ago Closed 24 years ago

incorrect size reported by JS window properties

Categories

(Core :: XUL, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: danm.moz, Assigned: pavlov)

References

Details

This is a separate bug called out in bug 15775.
  The outerWidth and outerHeight properties of a window always report their
initial values, regardless of whether the window has been resized. This happens
only on gtk, and it happens because the nsWindow from which the size is fetched
for JS isn't the same as the window that gets the resize message from JS and the OS,
and the two don't talk to each other.
  dbaron@fas.harvard.edu posted a test case that went effectively like this:

<html>
<head><script type="text/javascript">
function squawk() {
  alert(
  "window.screenX = " + window.screenX + "\n" +
  "window.screenY = " + window.screenY + "\n" +
  "window.outerHeight = " + window.outerHeight + "\n" +
  "window.outerWidth = " + window.outerWidth + "\n" +
  "window.innerHeight = " + window.innerHeight + "\n" +
  "window.innerWidth = " + window.innerWidth + "\n" +
  "screen.availWidth = " + screen.availWidth + "\n" +
  "screen.availHeight = " + screen.availHeight + "\n" +
  "screen.availLeft = " + screen.availLeft + "\n" +
  "screen.availTop = " + screen.availTop);
}
</script></head>
<body>
<form>
  <input type=button value="win pos/size" onclick="squawk()">
</form>
</body>
</html>

  Note that the original bug report (bug 15775) also mentioned window position.
That has now been fixed, though see bug 23779. Also note that I believe the underlying
reason for this problem is bug 14513.
Assignee: trudelle → pavlov
Depends on: 14513
(assigning to pavlov because this should be the same as his bug 14513).
Status: NEW → ASSIGNED
Target Milestone: M16
i fixed this a long time ago when I fixed bug 14513
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
okay, then I verified it a long time ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.