| Index: WebCore/dom/Element.cpp
|
| ===================================================================
|
| --- WebCore/dom/Element.cpp (revision 10232)
|
| +++ WebCore/dom/Element.cpp (working copy)
|
| @@ -88,11 +88,12 @@
|
|
|
| PassRefPtr<Node> Element::cloneNode(bool deep)
|
| {
|
| - ExceptionCode ec = 0;
|
| - RefPtr<Element> clone = document()->createElementNS(namespaceURI(), nodeName(), ec);
|
| - ASSERT(!ec);
|
| -
|
| - // clone attributes
|
| + RefPtr<Element> clone = document()->createElement(tagQName(), false);
|
| + // This will catch HTML elements in the wrong namespace that are not correctly copied.
|
| + // This is a sanity check as HTML overloads some of the DOM methods.
|
| + ASSERT(isHTMLElement() == clone->isHTMLElement());
|
| +
|
| + // Clone attributes.
|
| if (namedAttrMap)
|
| clone->attributes()->setAttributes(*namedAttrMap);
|
|
|
|
|