[HTML5] Implement HTML5 changes to <script defer>

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
10 years ago
8 years ago

People

(Reporter: hsivonen, Assigned: hsivonen)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(status1.9.2 beta1-fixed)

Details

Attachments

(2 attachments, 5 obsolete attachments)

Assignee

Description

10 years ago
Need to change <script defer> so that defer is ignored on inline scripts and document.write() for an external defer script blows away the document.
Posted patch WIP (obsolete) — Splinter Review
This fixes the code, but we need to also change tests that test of the old behavior. Henri has graciously offered to do that and drive the patch into the tree.
Attachment #404070 - Flags: review?(hsivonen)
Assignee

Comment 2

10 years ago
Comment on attachment 404070 [details] [diff] [review]
WIP

Looks good to me, except it seems that the behavior is correct per HTML5 only if another script doesn't go and change the src attribute between the time the parser inserts the node and the time the parser parses the end tag. However, that problem is pre-existing and not introduced by this patch. (Unless I'm missing something about how GetSrc works.)
Attachment #404070 - Flags: review?(hsivonen) → review+
Assignee

Updated

10 years ago
Assignee: nobody → hsivonen
Assignee

Comment 3

10 years ago
Posted patch Trunk patch with test tweaks (obsolete) — Splinter Review
Attachment #404070 - Attachment is obsolete: true
Attachment #404228 - Flags: review+
Assignee

Comment 4

10 years ago
Posted patch Branch patch with test tweaks (obsolete) — Splinter Review
Attachment #404229 - Flags: review+
Assignee

Updated

10 years ago
No longer depends on: 516406
Assignee

Updated

10 years ago
Blocks: 515338
Comment on attachment 404228 [details] [diff] [review]
Trunk patch with test tweaks

r=me on the test changes
Attachment #404228 - Flags: review+
Assignee

Comment 6

10 years ago
Attachment #404228 - Attachment is obsolete: true
Attachment #404264 - Flags: superreview?(mrbkap)
Attachment #404264 - Flags: review+
Assignee

Comment 7

10 years ago
Attachment #404229 - Attachment is obsolete: true
Attachment #404266 - Flags: superreview?(mrbkap)
Attachment #404266 - Flags: review+
Assignee

Comment 8

10 years ago
Per discussion with sicking, getting this on the branch would be good, since the longer Gecko is HTML5-incompliant on this point, the more likely it is that Web content starts depending on Gecko's old behavior.
Flags: wanted1.9.2?
Assignee

Comment 9

10 years ago
Attachment #404264 - Attachment is obsolete: true
Attachment #404280 - Flags: superreview?(mrbkap)
Attachment #404280 - Flags: review+
Attachment #404264 - Flags: superreview?(mrbkap)
Assignee

Comment 10

10 years ago
Attachment #404266 - Attachment is obsolete: true
Attachment #404281 - Flags: superreview?(mrbkap)
Attachment #404281 - Flags: review+
Attachment #404266 - Flags: superreview?(mrbkap)
Assignee

Comment 11

10 years ago
Try server id f1b91fc7f1b9.
Attachment #404280 - Flags: superreview?(mrbkap) → superreview+
Attachment #404281 - Flags: superreview?(mrbkap) → superreview+
Oh, we probably need to leave the functions in to be compatible with the older branch.

Comment 14

10 years ago
This bug is kinda the opposite of bug 461555, which was blocking1.9.1+ because we were aware of several web sites that it broke.  Are those sites broken again? :(
The hope is that they are not. All of the examples that I looked at that broke in that bug was due to inline scripts. Inline scripts are no longer deferred so it should be fine to document.write in them.
Assignee

Updated

10 years ago
Flags: wanted1.9.2?

Comment 16

9 years ago
The implementation of this change has reopened another bug https://bugzilla.mozilla.org/show_bug.cgi?id=474392

Comment 17

9 years ago
I have put together a demonstration page of this functionality breaking backwards compatibility and a number of test cases which are generally accepted to work in all browsers.

http://what.cd/defer-bug.php
What.CD: I don't actually understand what your page is saying, but it's not related to this bug, so please file a separate bug on this.

Or better yet, bring it up on the WhatWG mailing list as it appears to me that you are disagreeing with what the spec says rather than you have found a bug in our implementation of the spec.
You need to log in before you can comment on or make changes to this bug.