HasIDFlag and HasClassFlag can be removed.
authormorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2012 07:20:19 +0000 (07:20 +0000)
committermorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2012 07:20:19 +0000 (07:20 +0000)
commita6fcc6c304670d58ea521cadbb22aac5666ce5ce
tree2a0df1fe9450d27af70a737ddc1e0daec41bf5ed
parent6e03ee7d4e05d39b070ba49b03eba389ad1bd0b8
HasIDFlag and HasClassFlag can be removed.
https://bugs.webkit.org/show_bug.cgi?id=77861

Reviewed by Andreas Kling.

Replaced HasIDFlag and HasClassFlag with a check against
ElementAttributeData. It looks these flags (originally bitfields)
were legacy of ancient era, where we didn't cache @id and @class
values and needed a hash lookup for each check.

No new tests. No behavioral change.

* dom/Element.cpp:
(WebCore::Element::idAttributeChanged):
* dom/Element.h:
(WebCore::Element::hasID):
(WebCore):
(WebCore::Element::hasClass):
(WebCore::Node::hasID):
(WebCore::Node::hasClass):
* dom/ElementAttributeData.h:
(WebCore::ElementAttributeData::hasID):
(WebCore::ElementAttributeData::hasClass):
(ElementAttributeData):
* dom/Node.h:
(Node):
(WebCore::nodeStyleChangeShift):
* dom/StyledElement.cpp:
(WebCore::StyledElement::classAttributeChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/ElementAttributeData.h
Source/WebCore/dom/Node.h
Source/WebCore/dom/StyledElement.cpp