2008-04-09 Antti Koivisto <antti@apple.com>
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Apr 2008 18:36:49 +0000 (18:36 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Apr 2008 18:36:49 +0000 (18:36 +0000)
commita8f6074290bc2e0088cf7db5c82e40e9dd30f114
treef457af79a133562b6d006f1f31fe98727f4e87f2
parent34797921185305601b5e8d979aacd77cad1a3815
2008-04-09  Antti Koivisto  <antti@apple.com>

        Reviewed by Mitz.

        Avoid unnecessary calls to virtual updateStyleAttributeIfNeeded() method.
        - do the the checking in call sites instead of inside the function
        - rename to updateStyleAttribute()
        - use namedAttrMap directly (for getting id attribute) in insertedIntoDocument/removedFromDocument
          to avoid calling attributes() which may trigger style attribute update.

        * dom/Element.cpp:
        (WebCore::Element::attributes):
        (WebCore::Element::getAttribute):
        (WebCore::Element::hasAttributes):
        (WebCore::Element::insertedIntoDocument):
        (WebCore::Element::removedFromDocument):
        * dom/Element.h:
        (WebCore::Element::updateStyleAttribute):
        * dom/NamedAttrMap.cpp:
        (WebCore::NamedAttrMap::addAttribute):
        * dom/StyledElement.cpp:
        (WebCore::StyledElement::updateStyleAttribute):
        * dom/StyledElement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/dom/Element.cpp
WebCore/dom/Element.h
WebCore/dom/NamedAttrMap.cpp
WebCore/dom/StyledElement.cpp
WebCore/dom/StyledElement.h