Closed Bug 613662 Opened 14 years ago Closed 14 years ago

Implement insertAdjacentHTML

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: sicking, Assigned: hsivonen)

References

(Depends on 1 open bug, )

Details

(Keywords: dev-doc-complete, html5, Whiteboard: [wanted2.1?][inbound])

Attachments

(5 files, 2 obsolete files)

It's now part of HTML5, and might be help us get people off of doing foo.innerHTML += "..."; http://dev.w3.org/html5/spec/Overview.html#insertadjacenthtml It's too late for FF4, but there's no reason not to do it ASAP after. Ms2ger expressed some interest in doing it (or rather, didn't violently oppose it when I suggested it)
Keywords: html5
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
Whiteboard: [wanted2.1?]
Looking at this per discussion with bz.
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Attached patch Implement insertAdjacentHTML (obsolete) — Splinter Review
Attached patch Tests for insertAdjacentHTML (obsolete) — Splinter Review
Need to revise the patch to take into account http://www.w3.org/Bugs/Public/show_bug.cgi?id=12434 The current patch behaves like IE on the non-optimized code path and per current spec on the optimized code path, so the patch is buggy either way.
Attachment #523282 - Attachment is obsolete: true
Attachment #523282 - Flags: review?(bzbarsky)
Attachment #523283 - Attachment is obsolete: true
Attachment #524158 - Flags: review?(bzbarsky)
Attachment #523283 - Flags: review?(bzbarsky)
Comment on attachment 524157 [details] [diff] [review] Implement insertAdjacentHTML, v2 Please fix the checkin comment's try stuff before pushing. >+ // HTML5 parser has notified, but not fired mutation events. This is duplicating code in SetInnerHTML. Can we factor it out into a helper instead? You need to rev the nsIDOMNSHTMLElement.idl iid. I assume the createContextualFragment call will need to be merged with the patch for bug 596182? r=me with those nits addressed. Sorry for the lag here....
Attachment #524157 - Flags: review?(bzbarsky) → review+
Comment on attachment 524158 [details] [diff] [review] Tests for insertAdjacentHTML, v2 r=me
Attachment #524158 - Flags: review?(bzbarsky) → review+
Any chance this can make FF6? Branching is in a week.
(In reply to comment #11) > Any chance this can make FF6? Branching is in a week. Unlikely. :-( This depends on stuff that happens to depend on the patch for bug 482909. In retrospect, it would have been a better idea to write the patches in a different order to avoid depending on bug 482909, but if I tried to reorder them now, I'd end up invalidating a bunch of reviews I've already obtained. Also, I'm generally hesitant to reorder the patches in haste at this point. Also, even if bug 482909 got review before the branching, it would be at least against the spirit of the new rules to dump the queue on central right before a release train leaves.
Flags: in-testsuite?
Whiteboard: [wanted2.1?] → [wanted2.1?][inbound]
Target Milestone: --- → mozilla8
...and backed out the test. Bug 650493 had landed in the meantime and had changed the exact mutation events that fire. The mutation event expectations is the test case weren't based on a spec but based on what the Gecko behavior was when I wrote the test.
http://hg.mozilla.org/mozilla-central/rev/047bd50613ab leaving open since the tests have to be relanded yet
This patch applies over attachment 524158 [details] [diff] [review]. This patch comments out the part of the tests that fails until bug 676808 is fixed. I suggest relanding the tests plus this patch.
Attachment #551019 - Flags: review?(bzbarsky)
Comment on attachment 551019 [details] [diff] [review] Disable the part of the tests that needs bug 676808 to be fixed Moving review request to optimize timezone situation.
Attachment #551019 - Flags: review?(bzbarsky) → review?(Olli.Pettay)
Attachment #551019 - Flags: review?(Olli.Pettay) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Depends on: 681052
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: