Closed Bug 1819923 Opened 2 years ago Closed 1 year ago

Fix wpt failure in perform-microtask-checkpoint-before-construction-xml-parser.xhtml

Categories

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

defect

Tracking

()

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: hsinyi, Assigned: avandolder)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I took a quick look. For HTML we do this in nsHtml5TreeOperation::CreateHTMLElement. For XML we should do something similar in nsXMLContentSink::CreateElement.

We should probably add an mozilla::dom::CustomElementDefinition* aDefinition=nullptr argument to NS_NewElement, which can then forward it to NS_NewHTMLElement and NS_NewXULElement. In nsXMLContentSink::CreateElement we look up the CustomElementDefinition with nsContentUtils::LookupCustomElementDefinition, add an nsAutoMicroTask and AutoCEReaction if there is a CustomElementDefinition and pass it on to NS_NewElement. I think that might be enough. Olly and I think it should be fine to run script at this point, but of course we should run the whole testsuite.

Assignee: nobody → avandolder
Status: NEW → ASSIGNED
Pushed by avandolder@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/93bb462dd37c Perform microtask checkpoint before custom element construction in XML documents. r=peterv,dom-core
Pushed by avandolder@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ef129d948041 Perform microtask checkpoint before custom element construction in XML documents. r=peterv,dom-core
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
Flags: needinfo?(avandolder)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: