document.open() returns null and not the document.

VERIFIED FIXED

Status

()

Core
DOM: Core & HTML
P3
major
VERIFIED FIXED
18 years ago
17 years ago

People

(Reporter: Nemat Rakhmatov, Assigned: jst)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.16 i686; en-US; m18) Gecko/20001005
BuildID:    2000100521

Opening above page leads to alert dialog with the message "unable to open board
frame"


Reproducible: Always
Steps to Reproduce:
just go to http://www.acfcheckers.com/lassie.html

Actual Results:  mozilla cant display  that page

Expected Results:  should display a checkers game board

Comment 1

18 years ago
seeing the warning on win98 trunk 200102108, over to html frames
Assignee: asa → pollmann
Status: UNCONFIRMED → NEW
Component: Browser-General → HTMLFrames
Ever confirmed: true
OS: Linux → All
QA Contact: doronr → petersen

Comment 2

18 years ago
Confirming on Mac Mozilla installer build 2000101808, Mac OS 9.0.4.

At the above URL, Mozilla on an iMac DV displays a grey screen only.  No
warnings or alert box dialogs seen or given.

Comment 3

18 years ago
see http://www.acfcheckers.com/code.html:

	if(parent.frames[0].document.open() == null) {
		alert("Unable to open board frame.");
		return;
	}

Comment 4

17 years ago
http://www.w3.org/TR/2000/WD-DOM-Level-2-HTML-20001113/html.html#ID-26809268

According to DOM 2, it is |void open()|, so no return value should be expected.
I guess this is a DOM 0 issue, assigning to jst for judgement.

Can we get some tests on which browsers return what when?
Assignee: pollmann → jst
(Assignee)

Comment 5

17 years ago
Brendan, do you happen to remember what document.open() returned in 4.x?
It returned the new document object on success, void (which is == to null and
converts to false in boolean contexts).  See
http://lxr.mozilla.org/classic/source/lib/libmocha/lm_doc.c#1182.

/be
Argh, touchpad mouse garbled my comment: Mozilla Classic DOM level 0
document.open returned the new doc on success, void on failure.

/be
(Assignee)

Updated

17 years ago
Status: NEW → ASSIGNED
Component: HTMLFrames → DOM Level 0
Hardware: PC → All
Summary: Mozilla cant display frames → document.open() returns null and not the document.
(Assignee)

Comment 8

17 years ago
Created attachment 21489 [details] [diff] [review]
Proposed fix (modulo generated code)
(Assignee)

Comment 9

17 years ago
The patch I just attached makes the JS version of open()
(nsIDOMNSHTMLDocument::Open()) return the document and it makes the checkers
site work in mozilla. r= and sr= anyone?
Whiteboard: [HAVE FIX]

Comment 10

17 years ago
ooh and code cleanup :-). I guess brendan can sr=.
Keywords: approval, patch, review
Whiteboard: [HAVE FIX]
 if (NS_OK != result) {

How about using NS_FAILED instead?  Also, watch those 80th column (or 132nd
column) violations with the long lines, ok?  sr=brendan@mozilla.org if you pick
these nits.

/be

Comment 12

17 years ago
Looks good, with Brendan's suggestions. r=blake
(Assignee)

Comment 13

17 years ago
Thanks for the reviews and suggestions, patch (with suggested fixes) checked in.
Marking FIXED.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 14

17 years ago
Marking verified per last comments.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.