Title: [123730] trunk/Source/WebCore
- Revision
- 123730
- Author
- [email protected]
- Date
- 2012-07-26 04:52:40 -0700 (Thu, 26 Jul 2012)
Log Message
2% of all samples running grid demo show up in StyleResolver::canShareStyleWithElement, 20% of those due to getAttribute instead of fastGetAttribute
https://bugs.webkit.org/show_bug.cgi?id=92257
Reviewed by Andreas Kling.
This check was added 7 years ago by hyatt in:
http://trac.webkit.org/changeset/10984
And then later made slow after triggering an ASSERT added:
http://trac.webkit.org/changeset/97670
SVG uses a "type" attribute (and it is animatable), but only when
used on filter elements:
http://www.w3.org/TR/SVG/attindex.html
In any case, this does not apply here, and is certainly not what
this check was originally intended for.
I've moved the check to canShareStyleWithControl
as it is only needed when the elements in question are both input elements.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (123729 => 123730)
--- trunk/Source/WebCore/ChangeLog 2012-07-26 11:40:06 UTC (rev 123729)
+++ trunk/Source/WebCore/ChangeLog 2012-07-26 11:52:40 UTC (rev 123730)
@@ -1,3 +1,27 @@
+2012-07-26 Eric Seidel <[email protected]>
+
+ 2% of all samples running grid demo show up in StyleResolver::canShareStyleWithElement, 20% of those due to getAttribute instead of fastGetAttribute
+ https://bugs.webkit.org/show_bug.cgi?id=92257
+
+ Reviewed by Andreas Kling.
+
+ This check was added 7 years ago by hyatt in:
+ http://trac.webkit.org/changeset/10984
+ And then later made slow after triggering an ASSERT added:
+ http://trac.webkit.org/changeset/97670
+
+ SVG uses a "type" attribute (and it is animatable), but only when
+ used on filter elements:
+ http://www.w3.org/TR/SVG/attindex.html
+ In any case, this does not apply here, and is certainly not what
+ this check was originally intended for.
+
+ I've moved the check to canShareStyleWithControl
+ as it is only needed when the elements in question are both input elements.
+
+ * css/StyleResolver.cpp:
+ (WebCore::StyleResolver::collectMatchingRulesForList):
+
2012-07-26 Yury Semikhatsky <[email protected]>
Web Inspector: add memory reporting routine to StyleResolver
Modified: trunk/Source/WebCore/css/StyleResolver.cpp (123729 => 123730)
--- trunk/Source/WebCore/css/StyleResolver.cpp 2012-07-26 11:40:06 UTC (rev 123729)
+++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-07-26 11:52:40 UTC (rev 123730)
@@ -1312,6 +1312,9 @@
if (!thisInputElement || !otherInputElement)
return false;
+ if (thisInputElement->fastGetAttribute(typeAttr) != otherInputElement->fastGetAttribute(typeAttr))
+ return false;
+
if (thisInputElement->isAutofilled() != otherInputElement->isAutofilled())
return false;
if (thisInputElement->shouldAppearChecked() != otherInputElement->shouldAppearChecked())
@@ -1372,8 +1375,9 @@
return true;
}
-inline bool elementHasDirectionAuto(Element* element)
+static inline bool elementHasDirectionAuto(Element* element)
{
+ // FIXME: This line is surprisingly hot, we may wish to inline hasDirectionAuto into StyleResolver.
return element->isHTMLElement() && toHTMLElement(element)->hasDirectionAuto();
}
@@ -1417,8 +1421,6 @@
return false;
if (m_element == m_element->document()->cssTarget())
return false;
- if (element->getAttribute(typeAttr) != m_element->getAttribute(typeAttr))
- return false;
if (element->fastGetAttribute(XMLNames::langAttr) != m_element->fastGetAttribute(XMLNames::langAttr))
return false;
if (element->fastGetAttribute(langAttr) != m_element->fastGetAttribute(langAttr))
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes