From 91437969ddb28bc81b3652986a67aae7e2465db2 Mon Sep 17 00:00:00 2001 From: Kulanthaivel Palanichamy Date: Wed, 15 Aug 2012 17:14:48 -0700 Subject: [WebKit] Browsermark DomAdvSearch and DomSearch optimizations This patch is a combination of the following optimizations. Optimize appendCharactersReplacingEntities [Performance] Optimize innerHTML and outerHTML https://bugs.webkit.org/show_bug.cgi?id=81214 Optimize Dromaeo/dom-query.html by caching NodeRareData on Document https://bugs.webkit.org/show_bug.cgi?id=90059 Optimize Dromaeo/dom-attr.html by speeding up Element::getAttribute() https://bugs.webkit.org/show_bug.cgi?id=90174 Change argument types of Element::getAttribute*() from String to AtomicString https://bugs.webkit.org/show_bug.cgi?id=90246 Conflicts: Source/WebCore/ChangeLog Source/WebCore/dom/Document.cpp Source/WebCore/dom/Document.h Conflicts: Source/WebCore/ChangeLog Change-Id: I9ca3d2e883155e2ad08c3cb0c5912b935ebe9406 --- Source/WebCore/dom/NamedNodeMap.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Source/WebCore/dom/NamedNodeMap.cpp') diff --git a/Source/WebCore/dom/NamedNodeMap.cpp b/Source/WebCore/dom/NamedNodeMap.cpp index 6fa30bf..253bc53 100644 --- a/Source/WebCore/dom/NamedNodeMap.cpp +++ b/Source/WebCore/dom/NamedNodeMap.cpp @@ -54,7 +54,7 @@ NamedNodeMap::~NamedNodeMap() detachAttributesFromElement(); } -PassRefPtr NamedNodeMap::getNamedItem(const String& name) const +PassRefPtr NamedNodeMap::getNamedItem(const AtomicString& name) const { Attribute* a = getAttributeItem(name, shouldIgnoreAttributeCase(m_element)); if (!a) @@ -63,12 +63,12 @@ PassRefPtr NamedNodeMap::getNamedItem(const String& name) const return a->createAttrIfNeeded(m_element); } -PassRefPtr NamedNodeMap::getNamedItemNS(const String& namespaceURI, const String& localName) const +PassRefPtr NamedNodeMap::getNamedItemNS(const AtomicString& namespaceURI, const AtomicString& localName) const { return getNamedItem(QualifiedName(nullAtom, localName, namespaceURI)); } -PassRefPtr NamedNodeMap::removeNamedItem(const String& name, ExceptionCode& ec) +PassRefPtr NamedNodeMap::removeNamedItem(const AtomicString& name, ExceptionCode& ec) { Attribute* a = getAttributeItem(name, shouldIgnoreAttributeCase(m_element)); if (!a) { @@ -79,7 +79,7 @@ PassRefPtr NamedNodeMap::removeNamedItem(const String& name, ExceptionCode return removeNamedItem(a->name(), ec); } -PassRefPtr NamedNodeMap::removeNamedItemNS(const String& namespaceURI, const String& localName, ExceptionCode& ec) +PassRefPtr NamedNodeMap::removeNamedItemNS(const AtomicString& namespaceURI, const AtomicString& localName, ExceptionCode& ec) { return removeNamedItem(QualifiedName(nullAtom, localName, namespaceURI), ec); } @@ -171,7 +171,7 @@ void NamedNodeMap::copyAttributesToVector(Vector >& copy) copy = m_attributes; } -Attribute* NamedNodeMap::getAttributeItemSlowCase(const String& name, bool shouldIgnoreAttributeCase) const +Attribute* NamedNodeMap::getAttributeItemSlowCase(const AtomicString& name, bool shouldIgnoreAttributeCase) const { unsigned len = length(); -- cgit v1.1