Title: [116423] trunk/Source/WebCore
- Revision
- 116423
- Author
- [email protected]
- Date
- 2012-05-08 08:20:54 -0700 (Tue, 08 May 2012)
Log 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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (116422 => 116423)
--- trunk/Source/WebCore/ChangeLog 2012-05-08 14:59:58 UTC (rev 116422)
+++ trunk/Source/WebCore/ChangeLog 2012-05-08 15:20:54 UTC (rev 116423)
@@ -1,5 +1,18 @@
2012-05-08 Andreas Kling <[email protected]>
+ 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.
+
+2012-05-08 Andreas Kling <[email protected]>
+
Shrink ElementAttributeData by factoring out Attr object count.
<http://webkit.org/b/85825>
Modified: trunk/Source/WebCore/dom/Element.cpp (116422 => 116423)
--- trunk/Source/WebCore/dom/Element.cpp 2012-05-08 14:59:58 UTC (rev 116422)
+++ trunk/Source/WebCore/dom/Element.cpp 2012-05-08 15:20:54 UTC (rev 116423)
@@ -704,9 +704,17 @@
{
document()->incDOMTreeVersion();
- if (isIdAttributeName(attr->name()))
- idAttributeChanged(attr);
- else if (attr->name() == HTMLNames::nameAttr)
+ if (isIdAttributeName(attr->name())) {
+ if (attributeData()) {
+ if (attr->isNull())
+ attributeData()->setIdForStyleResolution(nullAtom);
+ else if (document()->inQuirksMode())
+ attributeData()->setIdForStyleResolution(attr->value().lower());
+ else
+ attributeData()->setIdForStyleResolution(attr->value());
+ }
+ setNeedsStyleRecalc();
+ } else if (attr->name() == HTMLNames::nameAttr)
setHasName(!attr->isNull());
if (!needsStyleRecalc() && document()->attached()) {
@@ -745,19 +753,6 @@
document()->axObjectCache()->postNotification(renderer(), AXObjectCache::AXInvalidStatusChanged, true);
}
-void Element::idAttributeChanged(Attribute* attr)
-{
- if (attributeData()) {
- if (attr->isNull())
- attributeData()->setIdForStyleResolution(nullAtom);
- else if (document()->inQuirksMode())
- attributeData()->setIdForStyleResolution(attr->value().lower());
- else
- attributeData()->setIdForStyleResolution(attr->value());
- }
- setNeedsStyleRecalc();
-}
-
// Returns true is the given attribute is an event handler.
// We consider an event handler any attribute that begins with "on".
// It is a simple solution that has the advantage of not requiring any
Modified: trunk/Source/WebCore/dom/Element.h (116422 => 116423)
--- trunk/Source/WebCore/dom/Element.h 2012-05-08 14:59:58 UTC (rev 116422)
+++ trunk/Source/WebCore/dom/Element.h 2012-05-08 15:20:54 UTC (rev 116423)
@@ -431,8 +431,6 @@
virtual bool shouldRegisterAsNamedItem() const { return false; }
virtual bool shouldRegisterAsExtraNamedItem() const { return false; }
- void idAttributeChanged(Attribute*);
-
HTMLCollection* ensureCachedHTMLCollection(CollectionType);
private:
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes