Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: Source/bindings/scripts/deprecated_code_generator_v8.pm

Issue 19540003: Use getAttribute instead of fastGetAttribute for SVG animated types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/deprecated_code_generator_v8.pm
diff --git a/Source/bindings/scripts/deprecated_code_generator_v8.pm b/Source/bindings/scripts/deprecated_code_generator_v8.pm
index 1b4d5b72c0ebd997b4c50c56b24da45dd96948b5..22d61a14f74009ba1f2c07d45752cf41659aaa07 100644
--- a/Source/bindings/scripts/deprecated_code_generator_v8.pm
+++ b/Source/bindings/scripts/deprecated_code_generator_v8.pm
@@ -190,14 +190,6 @@ my %callbackFunctionTypeHash = ();
my %enumTypeHash = ();
-my %svgAnimatedTypeHash = ("SVGAnimatedAngle" => 1, "SVGAnimatedBoolean" => 1,
- "SVGAnimatedEnumeration" => 1, "SVGAnimatedInteger" => 1,
- "SVGAnimatedLength" => 1, "SVGAnimatedLengthList" => 1,
- "SVGAnimatedNumber" => 1, "SVGAnimatedNumberList" => 1,
- "SVGAnimatedPreserveAspectRatio" => 1,
- "SVGAnimatedRect" => 1, "SVGAnimatedString" => 1,
- "SVGAnimatedTransformList" => 1);
-
my %svgAttributesInHTMLHash = ("class" => 1, "id" => 1, "onabort" => 1, "onclick" => 1,
"onerror" => 1, "onload" => 1, "onmousedown" => 1,
"onmouseenter" => 1, "onmouseleave" => 1,
@@ -5723,8 +5715,7 @@ sub IsSVGAnimatedType
{
my $type = shift;
- return 1 if $svgAnimatedTypeHash{$type};
- return 0;
+ return $type =~ /^SVGAnimated/;
}
sub GetSequenceType
@@ -5869,7 +5860,8 @@ sub GetterExpression
$functionName = "getClassAttribute";
$contentAttributeName = "";
} else {
- $functionName = "fastGetAttribute";
+ # We cannot use fast attributes for animated SVG types.
+ $functionName = IsSVGAnimatedType($attribute->type) ? "getAttribute" : "fastGetAttribute";
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698