Summary: | Implement Document.cloneNode() | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jesse Costello-Good <jesse> | ||||
Component: | DOM | Assignee: | Ryosuke Niwa <rniwa> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Enhancement | CC: | ap, arv, cdumez, commit-queue, d-r, esprehn+autocc, fmalita, gyuyoung.kim, kangil.han, kling, koivisto, mail, pdr, rniwa, schenney, syoichi | ||||
Priority: | P2 | Keywords: | BlinkMergeCandidate | ||||
Version: | 420+ | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 10489 | ||||||
Attachments: |
|
Description
Jesse Costello-Good
2006-11-18 16:56:03 PST
Per the DOM spec, "cloning Document, DocumentType, Entity, and Notation nodes is implementation dependent." I couldn't find any Mozilla documentation either, so we may have to reverse-engineer it. A perhaps non-obvious feature of this method is that if the target of the clone() method has a node <xsl:import href="">, the cloned document should be able to resolve the href attribute in the same way that the target would. In other words, the cloned document needs to behave the same as if it had been loaded from the same URL as the target document. Related bug: http://bugs.webkit.org/show_bug.cgi?id=10313 *** Bug 119928 has been marked as a duplicate of this bug. *** *** Bug 125285 has been marked as a duplicate of this bug. *** Created attachment 218776 [details]
Fixes the bug
Comment on attachment 218776 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=218776&action=review > Source/WebCore/dom/Document.cpp:3039 > + return isXHTMLDocument() ? createXHTML(0, url()) : create(0, url()); nullptr please, not 0 > Source/WebCore/html/HTMLDocument.cpp:370 > + return create(0, url()); nullptr please, not 0 > Source/WebCore/svg/SVGDocument.cpp:105 > + return create(0, url()); nullptr please, not 0 > Source/WebCore/svg/SVGDocument.h:56 > + virtual PassRefPtr<Document> cloneDocumentWithoutChildren() const OVERRIDE FINAL; Class is FINAL so no need to mark function FINAL, but I suppose there’s no harm in it. Committed r160330: <http://trac.webkit.org/changeset/160330> Mass moving XML DOM bugs to the "DOM" Component. |