SVG bindings are improperly being generated with "fastGetAttribute"
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 14 Dec 2013 01:53:17 +0000 (01:53 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 14 Dec 2013 01:53:17 +0000 (01:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=125670

Reviewed by Darin Adler.

A bug was introduced in r152845 that improperly called the
IsSVGAnimatedType using the $attribute hash, rather than the
expected $attribute->signature->type.

* bindings/scripts/CodeGenerator.pm:
(GetterExpression): Clean up attribute type confusion.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160578 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGenerator.pm

index 5b72b2e5523137494cccfa32844eb6856e17fd16..5eaad647845efc109c4173913317c14e6302d8c9 100644 (file)
@@ -1,3 +1,17 @@
+2013-12-13  Brent Fulgham  <bfulgham@apple.com>
+
+        SVG bindings are improperly being generated with "fastGetAttribute"
+        https://bugs.webkit.org/show_bug.cgi?id=125670
+
+        Reviewed by Darin Adler.
+
+        A bug was introduced in r152845 that improperly called the
+        IsSVGAnimatedType using the $attribute hash, rather than the
+        expected $attribute->signature->type.
+
+        * bindings/scripts/CodeGenerator.pm:
+        (GetterExpression): Clean up attribute type confusion.
+
 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Unreviewed build fix after r160548
 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Unreviewed build fix after r160548
index 250547152d4777a9fc93bf76a9061a37477532bd..943959f54aaf18e4b9f1d400484d679da84fe713 100644 (file)
@@ -555,14 +555,16 @@ sub GetterExpression
         return ($generator->WK_lcfirst($generator->AttributeNameForGetterAndSetter($attribute)));
     }
 
         return ($generator->WK_lcfirst($generator->AttributeNameForGetterAndSetter($attribute)));
     }
 
+    my $attributeType = $attribute->signature->type;
+
     my $functionName;
     if ($attribute->signature->extendedAttributes->{"URL"}) {
         $functionName = "getURLAttribute";
     my $functionName;
     if ($attribute->signature->extendedAttributes->{"URL"}) {
         $functionName = "getURLAttribute";
-    } elsif ($attribute->signature->type eq "boolean") {
+    } elsif ($attributeType eq "boolean") {
         $functionName = "fastHasAttribute";
         $functionName = "fastHasAttribute";
-    } elsif ($attribute->signature->type eq "long") {
+    } elsif ($attributeType eq "long") {
         $functionName = "getIntegralAttribute";
         $functionName = "getIntegralAttribute";
-    } elsif ($attribute->signature->type eq "unsigned long") {
+    } elsif ($attributeType eq "unsigned long") {
         $functionName = "getUnsignedIntegralAttribute";
     } else {
         if ($contentAttributeName eq "WebCore::HTMLNames::idAttr") {
         $functionName = "getUnsignedIntegralAttribute";
     } else {
         if ($contentAttributeName eq "WebCore::HTMLNames::idAttr") {
@@ -571,7 +573,7 @@ sub GetterExpression
         } elsif ($contentAttributeName eq "WebCore::HTMLNames::nameAttr") {
             $functionName = "getNameAttribute";
             $contentAttributeName = "";
         } elsif ($contentAttributeName eq "WebCore::HTMLNames::nameAttr") {
             $functionName = "getNameAttribute";
             $contentAttributeName = "";
-        } elsif ($generator->IsSVGAnimatedType($attribute)) {
+        } elsif ($generator->IsSVGAnimatedType($attributeType)) {
             $functionName = "getAttribute";
         } else {
             $functionName = "fastGetAttribute";
             $functionName = "getAttribute";
         } else {
             $functionName = "fastGetAttribute";