Create a method in Element to compare attributes with other Element
authorcaio.oliveira@openbossa.org <caio.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Mar 2012 19:02:04 +0000 (19:02 +0000)
committercaio.oliveira@openbossa.org <caio.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Mar 2012 19:02:04 +0000 (19:02 +0000)
commit18ed8f31ac776aa373be1e85eb3be04dae9f0a07
tree5fc410b591e4369dc0cc9e5ac264c1ec17b410d5
parentc1599799421246ada110705876120ea6ee377c29
Create a method in Element to compare attributes with other Element
https://bugs.webkit.org/show_bug.cgi?id=80169

Reviewed by Ryosuke Niwa.

Avoid manually peeking at attribute storage to get this information. This
simplify the callsites. The actual implementation of comparison was moved to
ElementAttributeData. The mapsEquivalent() function still exists for the sake
of DocumentType nodes.

* dom/Element.cpp:
(WebCore::Element::hasEquivalentAttributes):
(WebCore):
* dom/Element.h:
(Element):
* dom/ElementAttributeData.cpp:
(WebCore::ElementAttributeData::isEquivalent):
(WebCore):
* dom/ElementAttributeData.h:
(ElementAttributeData):
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::mapsEquivalent):
* dom/Node.cpp:
(WebCore::Node::isEqualNode):
* editing/htmlediting.cpp:
(WebCore::areIdenticalElements): Use Element::hasTagName() instead of matching
directly to make code a bit clearer.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/ElementAttributeData.cpp
Source/WebCore/dom/ElementAttributeData.h
Source/WebCore/dom/NamedNodeMap.cpp
Source/WebCore/dom/Node.cpp
Source/WebCore/editing/htmlediting.cpp