diff options
author | Russell Brenner <russellbrenner@google.com> | 2010-11-18 17:33:13 -0800 |
---|---|---|
committer | Russell Brenner <russellbrenner@google.com> | 2010-12-02 13:47:21 -0800 |
commit | 6b70adc33054f8aee8c54d0f460458a9df11b8a5 (patch) | |
tree | 103a13998c33944d6ab3b8318c509a037e639460 /WebCore/dom/Element.cpp | |
parent | bdf4ebc8e70b2d221b6ee7a65660918ecb1d33aa (diff) | |
download | external_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.zip external_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.tar.gz external_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.tar.bz2 |
Merge WebKit at r72274: Initial merge by git.
Change-Id: Ie51f0b4a16da82942bd516dce59cfb79ebbe25fb
Diffstat (limited to 'WebCore/dom/Element.cpp')
-rw-r--r-- | WebCore/dom/Element.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/WebCore/dom/Element.cpp b/WebCore/dom/Element.cpp index 9afde07..5497465 100644 --- a/WebCore/dom/Element.cpp +++ b/WebCore/dom/Element.cpp @@ -159,7 +159,7 @@ PassRefPtr<Element> Element::cloneElementWithChildren() PassRefPtr<Element> Element::cloneElementWithoutChildren() { - RefPtr<Element> clone = document()->createElement(tagQName(), false); + RefPtr<Element> clone = cloneElementWithoutAttributesAndChildren(); // 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()); @@ -173,6 +173,11 @@ PassRefPtr<Element> Element::cloneElementWithoutChildren() return clone.release(); } +PassRefPtr<Element> Element::cloneElementWithoutAttributesAndChildren() const +{ + return document()->createElement(tagQName(), false); +} + void Element::removeAttribute(const QualifiedName& name, ExceptionCode& ec) { if (m_attributeMap) { @@ -1518,7 +1523,7 @@ AtomicString Element::computeInheritedLanguage() const value = static_cast<const Document*>(n)->contentLanguage(); } - n = n->parent(); + n = n->parentNode(); } return value; |