Title: [138297] trunk/Source/WebCore
- Revision
- 138297
- Author
- [email protected]
- Date
- 2012-12-20 13:59:29 -0800 (Thu, 20 Dec 2012)
Log Message
CodeGen: Make [Reflect] use getIdAttribute and getNameAttribute
https://bugs.webkit.org/show_bug.cgi?id=105549
Reviewed by Andreas Kling.
Let the codegen use getIdAttribute and getNameAttribute when we know the attribute
is HTMLNames::idAttr or HTMLNames::nameAttr respectively. The more specialized functions
do not search for the attribute if it knows that the element does not have that attribute
speeding up the case where id or name are not present.
This improves Dromaeo/dom-attr by 5% and Bindings/undefined-id-getter by 2%
No new tests. No change in behavior
* bindings/scripts/CodeGenerator.pm:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (138296 => 138297)
--- trunk/Source/WebCore/ChangeLog 2012-12-20 21:40:14 UTC (rev 138296)
+++ trunk/Source/WebCore/ChangeLog 2012-12-20 21:59:29 UTC (rev 138297)
@@ -1,5 +1,23 @@
2012-12-20 Erik Arvidsson <[email protected]>
+ CodeGen: Make [Reflect] use getIdAttribute and getNameAttribute
+ https://bugs.webkit.org/show_bug.cgi?id=105549
+
+ Reviewed by Andreas Kling.
+
+ Let the codegen use getIdAttribute and getNameAttribute when we know the attribute
+ is HTMLNames::idAttr or HTMLNames::nameAttr respectively. The more specialized functions
+ do not search for the attribute if it knows that the element does not have that attribute
+ speeding up the case where id or name are not present.
+
+ This improves Dromaeo/dom-attr by 5% and Bindings/undefined-id-getter by 2%
+
+ No new tests. No change in behavior
+
+ * bindings/scripts/CodeGenerator.pm:
+
+2012-12-20 Erik Arvidsson <[email protected]>
+
fastAttributeLookupAllowed: classAttr is only animatable by SVG styled elements
https://bugs.webkit.org/show_bug.cgi?id=105565
Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (138296 => 138297)
--- trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm 2012-12-20 21:40:14 UTC (rev 138296)
+++ trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm 2012-12-20 21:59:29 UTC (rev 138297)
@@ -600,7 +600,13 @@
} elsif ($attribute->signature->type eq "unsigned long") {
$functionName = "getUnsignedIntegralAttribute";
} else {
- if ($generator->CanUseFastAttribute($attribute)) {
+ if ($contentAttributeName eq "WebCore::HTMLNames::idAttr") {
+ $functionName = "getIdAttribute";
+ $contentAttributeName = "";
+ } elsif ($contentAttributeName eq "WebCore::HTMLNames::nameAttr") {
+ $functionName = "getNameAttribute";
+ $contentAttributeName = "";
+ } elsif ($generator->CanUseFastAttribute($attribute)) {
$functionName = "fastGetAttribute";
} else {
$functionName = "getAttribute";
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes