Several JavaScript screen properties incorrectly return zero

VERIFIED DUPLICATE of bug 1877

Status

()

Core
JavaScript Engine
P3
normal
VERIFIED DUPLICATE of bug 1877
19 years ago
16 years ago

People

(Reporter: ckritzer (gone), Assigned: Mike McCabe)

Tracking

Trunk
PowerPC
Mac System 8.5
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

19 years ago
Steps to repro:
1) Return the following screen properties via a document.write() (code snippet
below):
	1a) screen.availHeight
	1a) screen.availWidth
	1a) screen.height
	1a) screen.width

Actual Results: Each item will return "0" (zero)

Expected Results:  Each item will return its associated available height/width &
height/width

Build Date & Platform Bug Found: 1999071208 MacOS 8.5

Additional Builds and Platforms Tested On: 1999071208 Linux6 & Win95

Additional Information:  HTML code snippet

***********************************************************************
<HTML>
<HEAD>
<TITLE>screen.properties bug</TITLE>
</HEAD>
<BODY>
<SCRIPT type="text/javascript">
document.write("screen.availHeight = " + screen.availHeight + "<BR>");
document.write("screen.availWidth = " + screen.availWidth + "<BR>");
document.write("screen.height = " + screen.height + "<BR>");
document.write("screen.width = " + screen.width + "<BR>");
</SCRIPT>
</BODY>
</HTML>
(Assignee)

Updated

19 years ago
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → DUPLICATE
(Assignee)

Comment 1

19 years ago
An lxr search for 'availWidth' gets me some likely candidates:


http://lxr.mozilla.org/mozilla/source/dom/src/base/nsScreen.cpp#176

175 NS_IMETHODIMP
176 ScreenImpl::GetAvailWidth(PRInt32* aAvailWidth)
177 {
178   //XXX not implmented
179   // Really should subtract out chrome
180  return GetWidth( aAvailWidth);
181
182 }


cvs blame

http://cvs-mirror.mozilla.org/webtools/bonsai/cvsblame.cgi?file=mozilla/dom/src/base/nsScreen.cpp

yields candidates davidm and joki; davidm's checkin comment mentions 1877 - this
seems to be a duplicate.  Marking as such.  (ckritzer, have you used any of the
source browsing tools?)

*** This bug has been marked as a duplicate of 1877 ***
(Reporter)

Updated

19 years ago
Status: RESOLVED → VERIFIED
(Reporter)

Comment 2

19 years ago
Resolved as DUPLICATE of 9731 in 1999071309 on MacOS8.5

Updated

19 years ago
Target Milestone: M8
You need to log in before you can comment on or make changes to this bug.