Document calls createElement with the wrong parameters.
Created attachment 167998 [details] Patch
This isn't so trivial as the others I've seen today. Document::importNode calls Document::createElement with a QualifiedName and ExceptionCode. The Document::createElement that takes a QualifiedName doesn't generate an exception; the second argument is a bool, which the ExceptionCode autocasts into. There is, however, a Document::createElement that takes an AtomicString and an Exception code. I wonder if that was the original intent. CCing Kent Tamura, who looks like he wrote that code in the first place. Hi Kent! Would you mind taking a look at this?
(In reply to comment #2) > This isn't so trivial as the others I've seen today. > > Document::importNode calls Document::createElement with a QualifiedName and ExceptionCode. The Document::createElement that takes a QualifiedName doesn't generate an exception; the second argument is a bool, which the ExceptionCode autocasts into. > > There is, however, a Document::createElement that takes an AtomicString and an Exception code. I wonder if that was the original intent. CCing Kent Tamura, who looks like he wrote that code in the first place. > > Hi Kent! Would you mind taking a look at this? I could imagine that you'd need to invoke the version that actually takes a ec: if the document is an xml doc, a different type of element needs to be created.
(In reply to comment #3) > (In reply to comment #2) > > This isn't so trivial as the others I've seen today. > > > > Document::importNode calls Document::createElement with a QualifiedName and ExceptionCode. The Document::createElement that takes a QualifiedName doesn't generate an exception; the second argument is a bool, which the ExceptionCode autocasts into. > > > > There is, however, a Document::createElement that takes an AtomicString and an Exception code. I wonder if that was the original intent. CCing Kent Tamura, who looks like he wrote that code in the first place. > > > > Hi Kent! Would you mind taking a look at this? > > I could imagine that you'd need to invoke the version that actually takes a ec: if the document is an xml doc, a different type of element needs to be created. So we likely need 'oldElement->localName()' instead of 'oldElement->tagQName()'?
The purpose of http://trac.webkit.org/changeset/104275 was to use createElement with QualifiedName argument. So the patch is correct.
Comment on attachment 167998 [details] Patch ok
Comment on attachment 167998 [details] Patch Alright, thanks for taking a look! Throwing this into the queue.
Comment on attachment 167998 [details] Patch Clearing flags on attachment: 167998 Committed r131015: <http://trac.webkit.org/changeset/131015>
All reviewed patches have been landed. Closing bug.