[GTK] Do not ignore 'Replaceable' attributes in the DOM bindings
authorxan@webkit.org <xan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Sep 2011 22:28:31 +0000 (22:28 +0000)
committerxan@webkit.org <xan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Sep 2011 22:28:31 +0000 (22:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=68837

Reviewed by Martin Robinson.

* bindings/scripts/CodeGeneratorGObject.pm: add getters (but not
setters) for 'Replaceable' attributes. Punt for the future
actually making them settable, since it seems non trivial.

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

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

index 9b30e81..b9d95c1 100644 (file)
@@ -1,3 +1,14 @@
+2011-09-26  Xan Lopez  <xlopez@igalia.com>
+
+        [GTK] Do not ignore 'Replaceable' attributes in the DOM bindings
+        https://bugs.webkit.org/show_bug.cgi?id=68837
+
+        Reviewed by Martin Robinson.
+
+        * bindings/scripts/CodeGeneratorGObject.pm: add getters (but not
+        setters) for 'Replaceable' attributes. Punt for the future
+        actually making them settable, since it seems non trivial.
+
 2011-09-26  Ryosuke Niwa  <rniwa@webkit.org>
 
         Leopard build fix.
index 0af0bcf..743c906 100644 (file)
@@ -155,11 +155,10 @@ sub SkipAttribute {
     my $attribute = shift;
     
     if ($attribute->signature->extendedAttributes->{"CustomGetter"} ||
-        $attribute->signature->extendedAttributes->{"CustomSetter"} ||
-        $attribute->signature->extendedAttributes->{"Replaceable"}) {
+        $attribute->signature->extendedAttributes->{"CustomSetter"}) {
         return 1;
     }
-    
+
     my $propType = $attribute->signature->type;
     if ($propType =~ /Constructor$/) {
         return 1;
@@ -307,7 +306,10 @@ sub GetWriteableProperties {
                                  $gtype eq "uint64" || $gtype eq "ulong" || $gtype eq "long" || 
                                  $gtype eq "uint" || $gtype eq "ushort" || $gtype eq "uchar" ||
                                  $gtype eq "char" || $gtype eq "string");
-        if ($writeable && $hasGtypeSignature) {
+        # FIXME: We are not generating setters for 'Replaceable'
+        # attributes now, but we should somehow.
+        my $replaceable = $property->signature->extendedAttributes->{"Replaceable"};
+        if ($writeable && $hasGtypeSignature && !$replaceable) {
             push(@result, $property);
         }
     }
@@ -1039,8 +1041,11 @@ sub GenerateFunctions {
         $function->signature($attribute->signature);
         $function->raisesExceptions($attribute->getterExceptions);
         $object->GenerateFunction($interfaceName, $function, "get_");
-        
-        if ($attribute->type =~ /^readonly/) {
+
+        # FIXME: We are not generating setters for 'Replaceable'
+        # attributes now, but we should somehow.
+        if ($attribute->type =~ /^readonly/ ||
+            $attribute->signature->extendedAttributes->{"Replaceable"}) {
             next TOP;
         }