Changeset 116423 in webkit
- Timestamp:
- May 8, 2012 8:20:54 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r116419 r116423 1 2012-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 1 14 2012-05-08 Andreas Kling <kling@webkit.org> 2 15 -
trunk/Source/WebCore/dom/Element.cpp
r116277 r116423 705 705 document()->incDOMTreeVersion(); 706 706 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) 710 718 setHasName(!attr->isNull()); 711 719 … … 746 754 } 747 755 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 else756 attributeData()->setIdForStyleResolution(attr->value());757 }758 setNeedsStyleRecalc();759 }760 761 756 // Returns true is the given attribute is an event handler. 762 757 // We consider an event handler any attribute that begins with "on". -
trunk/Source/WebCore/dom/Element.h
r116277 r116423 432 432 virtual bool shouldRegisterAsExtraNamedItem() const { return false; } 433 433 434 void idAttributeChanged(Attribute*);435 436 434 HTMLCollection* ensureCachedHTMLCollection(CollectionType); 437 435
Note: See TracChangeset
for help on using the changeset viewer.