Changeset 116423 in webkit


Ignore:
Timestamp:
May 8, 2012 8:20:54 AM (12 years ago)
Author:
kling@webkit.org
Message:

Element: Merge idAttributeChanged() into attributeChanged().
<http://webkit.org/b/85885>

Reviewed by Antti Koivisto.

No new tests, code churn only.

  • dom/Element.h:
  • dom/Element.cpp:

(WebCore::Element::attributeChanged): There's no need for this to be a standalone function anymore.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r116419 r116423  
     12012-05-08  Andreas Kling  <kling@webkit.org>
     2
     3        Element: Merge idAttributeChanged() into attributeChanged().
     4        <http://webkit.org/b/85885>
     5
     6        Reviewed by Antti Koivisto.
     7
     8        No new tests, code churn only.
     9
     10        * dom/Element.h:
     11        * dom/Element.cpp:
     12        (WebCore::Element::attributeChanged): There's no need for this to be a standalone function anymore.
     13
    1142012-05-08  Andreas Kling  <kling@webkit.org>
    215
  • trunk/Source/WebCore/dom/Element.cpp

    r116277 r116423  
    705705    document()->incDOMTreeVersion();
    706706
    707     if (isIdAttributeName(attr->name()))
    708         idAttributeChanged(attr);
    709     else if (attr->name() == HTMLNames::nameAttr)
     707    if (isIdAttributeName(attr->name())) {
     708        if (attributeData()) {
     709            if (attr->isNull())
     710                attributeData()->setIdForStyleResolution(nullAtom);
     711            else if (document()->inQuirksMode())
     712                attributeData()->setIdForStyleResolution(attr->value().lower());
     713            else
     714                attributeData()->setIdForStyleResolution(attr->value());
     715        }
     716        setNeedsStyleRecalc();
     717    } else if (attr->name() == HTMLNames::nameAttr)
    710718        setHasName(!attr->isNull());
    711719
     
    746754}
    747755
    748 void Element::idAttributeChanged(Attribute* attr)
    749 {
    750     if (attributeData()) {
    751         if (attr->isNull())
    752             attributeData()->setIdForStyleResolution(nullAtom);
    753         else if (document()->inQuirksMode())
    754             attributeData()->setIdForStyleResolution(attr->value().lower());
    755         else
    756             attributeData()->setIdForStyleResolution(attr->value());
    757     }
    758     setNeedsStyleRecalc();
    759 }
    760    
    761756// Returns true is the given attribute is an event handler.
    762757// We consider an event handler any attribute that begins with "on".
  • trunk/Source/WebCore/dom/Element.h

    r116277 r116423  
    432432    virtual bool shouldRegisterAsExtraNamedItem() const { return false; }
    433433
    434     void idAttributeChanged(Attribute*);
    435 
    436434    HTMLCollection* ensureCachedHTMLCollection(CollectionType);
    437435
Note: See TracChangeset for help on using the changeset viewer.