From ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Thu, 8 Jul 2010 12:51:48 +0100 Subject: Merge WebKit at r62496: Initial merge by git Change-Id: Ie3da0770eca22a70a632e3571f31cfabc80facb2 --- WebCore/dom/Element.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'WebCore/dom/Element.cpp') diff --git a/WebCore/dom/Element.cpp b/WebCore/dom/Element.cpp index adbb720..3dbd880 100644 --- a/WebCore/dom/Element.cpp +++ b/WebCore/dom/Element.cpp @@ -33,6 +33,7 @@ #include "CSSStyleSelector.h" #include "ClientRect.h" #include "ClientRectList.h" +#include "DatasetDOMStringMap.h" #include "Document.h" #include "DocumentFragment.h" #include "ElementRareData.h" @@ -153,10 +154,10 @@ PassRefPtr Element::cloneElementWithoutChildren() // This is a sanity check as HTML overloads some of the DOM methods. ASSERT(isHTMLElement() == clone->isHTMLElement()); - // Clone attributes. - if (namedAttrMap) - clone->attributes()->setAttributes(*attributes(true)); // Call attributes(true) to force attribute synchronization to occur (for svg and style) before cloning happens. - + // Call attributes(true) to force attribute synchronization to occur for SVG and style attributes. + if (NamedNodeMap* attributeMap = attributes(true)) + clone->attributes()->setAttributes(*attributeMap); + clone->copyNonAttributeProperties(this); return clone.release(); @@ -1520,6 +1521,14 @@ bool Element::webkitMatchesSelector(const String& selector, ExceptionCode& ec) return false; } +DOMStringMap* Element::dataset() +{ + ElementRareData* data = ensureRareData(); + if (!data->m_datasetDOMStringMap) + data->m_datasetDOMStringMap = DatasetDOMStringMap::create(this); + return data->m_datasetDOMStringMap.get(); +} + KURL Element::getURLAttribute(const QualifiedName& name) const { #if !ASSERT_DISABLED -- cgit v1.1