WPT: dom/nodes/Document-createCDATASection-xhtml.xhtml fails due to missing exception in Document.createCDATASection() Test: https://wpt.fyi/results/dom/nodes/Document-createCDATASection-xhtml.xhtml?run_id=586650004&run_id=579020002&run_id=594530003&run_id=583030005 Spec: https://dom.spec.whatwg.org/#dom-document-createcdatasection Issue: We don't implement step 2 of "createCDATASection(data)".
Created attachment 401841 [details] Patch
Comment on attachment 401841 [details] Patch r=me
Created attachment 401843 [details] Patch
Committed r263003: <https://trac.webkit.org/changeset/263003> All reviewed patches have been landed. Closing bug and clearing flags on attachment 401843 [details].
<rdar://problem/64330801>
<rdar://problem/64330800>
Comment on attachment 401843 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401843&action=review > Source/WebCore/dom/Document.cpp:1031 > + if (data.contains("]]>")) Does cdatasection::create not need the check? Performance implications seem non-trivial here.
(In reply to Alexey Proskuryakov from comment #7) > Comment on attachment 401843 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=401843&action=review > > > Source/WebCore/dom/Document.cpp:1031 > > + if (data.contains("]]>")) > > Does cdatasection::create not need the check? I don't believe it does. The only other caller of CDATASection::create (other than right after this check) is XMLDocumentParser::cdataBlock, and I don't think the parser can get into this issue. > > Performance implications seem non-trivial here. Really? I don't think of something like document.createCDATASection() getting called all that much from the DOM. We now match the other major browsers and the spec, so it does turn out to a perf issue, we should also raise it with the standards folks.
(In reply to Sam Weinig from comment #8) > (In reply to Alexey Proskuryakov from comment #7) > > Comment on attachment 401843 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=401843&action=review > > > > > Source/WebCore/dom/Document.cpp:1031 > > > + if (data.contains("]]>")) > > > > Does cdatasection::create not need the check? > > I don't believe it does. The only other caller of CDATASection::create > (other than right after this check) is XMLDocumentParser::cdataBlock, and I > don't think the parser can get into this issue. > > > > > Performance implications seem non-trivial here. > > Really? I don't think of something like document.createCDATASection() > getting called all that much from the DOM. We now match the other major > browsers and the spec, so it does turn out to a perf issue, we should also > raise it with the standards folks. I agree with Sam here.