Changeset 39596 in webkit
- Timestamp:
- Jan 5, 2009 12:39:12 AM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r39595 r39596 1 2009-01-04 David Smith <catfish.man@gmail.com> 2 3 Reviewed by Oliver Hunt. 4 5 Avoid redundant AtomicString conversions 6 7 * dom/Node.cpp: 8 (WebCore::Node::getElementsByTagName): Pass starAtom instead of "*" 9 (WebCore::Node::getElementsByTagNameNS): Take an AtomicString for the namespace URI 10 (WebCore::Node::isDefaultNamespace): Ditto 11 (WebCore::Node::lookupPrefix): Ditto 12 (WebCore::Node::lookupNamespacePrefix): Ditto 13 * dom/Node.h: Ditto 14 1 15 2009-01-04 Darin Adler <darin@apple.com> 2 16 -
trunk/WebCore/dom/Node.cpp
r39563 r39596 1377 1377 PassRefPtr<NodeList> Node::getElementsByTagName(const String& name) 1378 1378 { 1379 return getElementsByTagNameNS( "*", name);1379 return getElementsByTagNameNS(starAtom, name); 1380 1380 } 1381 1381 1382 PassRefPtr<NodeList> Node::getElementsByTagNameNS(const String& namespaceURI, const String& localName)1382 PassRefPtr<NodeList> Node::getElementsByTagNameNS(const AtomicString& namespaceURI, const String& localName) 1383 1383 { 1384 1384 if (localName.isNull()) … … 1399 1399 result.first->second = new DynamicNodeList::Caches; 1400 1400 1401 return TagNodeList::create(this, namespaceURI.isEmpty() ? nullAtom : AtomicString(namespaceURI), name, result.first->second);1401 return TagNodeList::create(this, namespaceURI.isEmpty() ? nullAtom : namespaceURI, name, result.first->second); 1402 1402 } 1403 1403 … … 1615 1615 } 1616 1616 1617 bool Node::isDefaultNamespace(const String &namespaceURI) const1617 bool Node::isDefaultNamespace(const AtomicString &namespaceURI) const 1618 1618 { 1619 1619 // Implemented according to … … 1665 1665 } 1666 1666 1667 String Node::lookupPrefix(const String &namespaceURI) const1667 String Node::lookupPrefix(const AtomicString &namespaceURI) const 1668 1668 { 1669 1669 // Implemented according to … … 1760 1760 } 1761 1761 1762 String Node::lookupNamespacePrefix(const String &_namespaceURI, const Element *originalElement) const1762 String Node::lookupNamespacePrefix(const AtomicString &_namespaceURI, const Element *originalElement) const 1763 1763 { 1764 1764 if (_namespaceURI.isNull()) -
trunk/WebCore/dom/Node.h
r39504 r39596 143 143 bool isSameNode(Node* other) const { return this == other; } 144 144 bool isEqualNode(Node*) const; 145 bool isDefaultNamespace(const String& namespaceURI) const;146 String lookupPrefix(const String& namespaceURI) const;145 bool isDefaultNamespace(const AtomicString& namespaceURI) const; 146 String lookupPrefix(const AtomicString& namespaceURI) const; 147 147 String lookupNamespaceURI(const String& prefix) const; 148 String lookupNamespacePrefix(const String& namespaceURI, const Element* originalElement) const;148 String lookupNamespacePrefix(const AtomicString& namespaceURI, const Element* originalElement) const; 149 149 150 150 String textContent(bool convertBRsToNewlines = false) const; … … 482 482 483 483 PassRefPtr<NodeList> getElementsByTagName(const String&); 484 PassRefPtr<NodeList> getElementsByTagNameNS(const String& namespaceURI, const String& localName);484 PassRefPtr<NodeList> getElementsByTagNameNS(const AtomicString& namespaceURI, const String& localName); 485 485 PassRefPtr<NodeList> getElementsByName(const String& elementName); 486 486 PassRefPtr<NodeList> getElementsByClassName(const String& classNames);
Note: See TracChangeset
for help on using the changeset viewer.