Closed Bug 560256 Opened 14 years ago Closed 14 years ago

[HTML5] Old document gets blown away when dynamically added script does document.write

Categories

(Core :: DOM: HTML Parser, defect, P2)

x86
Windows 7
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: martijn.martijn, Assigned: hsivonen)

References

()

Details

(Keywords: regression, testcase)

Attachments

(5 files, 1 obsolete file)

Follow-up from bug 553795.
See testcase, this passes in Mozilla 1.9.1 builds, but fails from 1.9.2 builds on (and also on trunk).
It passes in IE8.

It seems like a bug to me. If not, please resolve the bug as invalid and explain to me why it is invalid.
Attached file external script file
Attached file testcase
This is invalid per spec, because script-inserted external scripts don't block the parser or defer EOF processing.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
OK. It seems that IE ignores the document.write() in this case.

Might be worth changing the spec. Now the interesting question is what criteria IE uses to decide whether to ignore the call or blow away the document.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Priority: -- → P2
Summary: Old document gets blown away when dynamically added script does document.write → [HTML5] Old document gets blown away when dynamically added script does document.write
Filed as http://www.w3.org/Bugs/Public/show_bug.cgi?id=9767

If you know details about IE behavior, please comment on the w3.org bug.
sicking, does this look worthy of writing and adjusting tests to match?
Assignee: nobody → hsivonen
Status: REOPENED → ASSIGNED
Attachment #452257 - Flags: feedback?(jonas)
Tests that need adjustment:

25085 ERROR TEST-UNEXPECTED-FAIL | /tests/content/base/test/test_bug518104.html | Div wasn't blown away. - 2 should equal 0

297 ERROR TEST-UNEXPECTED-FAIL | /tests/security/ssl/mixedcontent/test_bug329869.html | FAILURE: security broken after document write from unsecure script, expected broken got secure
298 ERROR TEST-UNEXPECTED-FAIL | /tests/security/ssl/mixedcontent/test_bug329869.html | FAILURE: for 'broken' expected  flags [0,1,0], security broken after document write from unsecure script
299 ERROR TEST-UNEXPECTED-FAIL | /tests/security/ssl/mixedcontent/test_bug329869.html | FAILURE: security still broken after navigation, expected broken got secure
300 ERROR TEST-UNEXPECTED-FAIL | /tests/security/ssl/mixedcontent/test_bug329869.html | FAILURE: for 'broken' expected  flags [0,1,0], security still broken after navigation
Attachment #452257 - Attachment is obsolete: true
Attachment #453122 - Flags: review?(jonas)
Attachment #452257 - Flags: feedback?(jonas)
I'm also seeing this when trying to watch an article on http://www.vastgoedjournaal.nl/
http://hg.mozilla.org/mozilla-central/rev/85ce56b223a3
Status: ASSIGNED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
(In reply to comment #11)
> I guess I'm seeing the same problem on:
> http://www.voetbalprimeur.nl/site/nieuws/133916/Blatter_ziet_gevaar_in_technologische_hulpmiddelen.html

(In reply to comment #12)
> I'm also seeing this when trying to watch an article on
> http://www.vastgoedjournaal.nl/

These sites work for me in the latest nightly.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: