summaryrefslogtreecommitdiffstats
path: root/WebCore/dom/Element.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-07-08 12:51:48 +0100
committerSteve Block <steveblock@google.com>2010-07-09 15:33:40 +0100
commitca9cb53ed1119a3fd98fafa0972ffeb56dee1c24 (patch)
treebb45155550ec013adc0ad10f4d7d354c6469b022 /WebCore/dom/Element.cpp
parentd4b24d9a829ed7de70381c8b99fb75a07ab40466 (diff)
downloadexternal_webkit-ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24.zip
external_webkit-ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24.tar.gz
external_webkit-ca9cb53ed1119a3fd98fafa0972ffeb56dee1c24.tar.bz2
Merge WebKit at r62496: Initial merge by git
Change-Id: Ie3da0770eca22a70a632e3571f31cfabc80facb2
Diffstat (limited to 'WebCore/dom/Element.cpp')
-rw-r--r--WebCore/dom/Element.cpp17
1 files changed, 13 insertions, 4 deletions
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> 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