Title: [153697] trunk/Source/WebCore
Revision
153697
Author
[email protected]
Date
2013-08-04 06:03:23 -0700 (Sun, 04 Aug 2013)

Log Message

[GTK] Remove legacy hack in CodeGeneratorGObject.pm
https://bugs.webkit.org/show_bug.cgi?id=117545

Patch by Diego Pino Garcia <[email protected]> on 2013-08-04
Reviewed by Carlos Garcia Campos.

There's a checking that sets gtype to uint in case it's ushort. gtype
is a value obtained from GetGValueTypeName(), which never returns
ushort.

* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateProperty): remove unnecessary glitch

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (153696 => 153697)


--- trunk/Source/WebCore/ChangeLog	2013-08-04 07:41:28 UTC (rev 153696)
+++ trunk/Source/WebCore/ChangeLog	2013-08-04 13:03:23 UTC (rev 153697)
@@ -1,3 +1,17 @@
+2013-08-04  Diego Pino Garcia  <[email protected]>
+
+        [GTK] Remove legacy hack in CodeGeneratorGObject.pm
+        https://bugs.webkit.org/show_bug.cgi?id=117545
+
+        Reviewed by Carlos Garcia Campos.
+
+        There's a checking that sets gtype to uint in case it's ushort. gtype 
+        is a value obtained from GetGValueTypeName(), which never returns 
+        ushort.
+
+        * bindings/scripts/CodeGeneratorGObject.pm:
+        (GenerateProperty): remove unnecessary glitch
+
 2013-08-04  Andreas Kling  <[email protected]>
 
         [Mac] Disable screen font substitution at WebCore-level in OS X 10.9+

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (153696 => 153697)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm	2013-08-04 07:41:28 UTC (rev 153696)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm	2013-08-04 13:03:23 UTC (rev 153697)
@@ -522,32 +522,15 @@
     # FIXME: Should we return a default value when isNull == true?
 
     my $postConvertFunction = "";
-    my $done = 0;
     if ($gtype eq "string") {
         push(@txtGetProps, "        g_value_take_string(value, convertToUTF8String(${getterFunctionName}(" . join(", ", @getterArguments) . ")));\n");
-        $done = 1;
     } elsif ($gtype eq "object") {
         push(@txtGetProps, "        RefPtr<WebCore::${propType}> ptr = ${getterFunctionName}(" . join(", ", @getterArguments) . ");\n");
         push(@txtGetProps, "        g_value_set_object(value, WebKit::kit(ptr.get()));\n");
-        $done = 1;
+    } else {
+        push(@txtGetProps, "        g_value_set_$gtype(value, ${convertFunction}${getterFunctionName}(" . join(", ", @getterArguments) . ")${postConvertFunction});\n");
     }
 
-    # FIXME: get rid of this glitch?
-    my $_gtype = $gtype;
-    if ($gtype eq "ushort") {
-        $_gtype = "uint";
-    }
-
-    if (!$done) {
-        if ($attribute->signature->extendedAttributes->{"ImplementedBy"}) {
-            my $implementedBy = $attribute->signature->extendedAttributes->{"ImplementedBy"};
-            $implIncludes{"${implementedBy}.h"} = 1;
-            push(@txtGetProps, "        g_value_set_$_gtype(value, ${convertFunction}${getterFunctionName}(" . join(", ", @getterArguments) .  ")${postConvertFunction});\n");
-        } else {
-            push(@txtGetProps, "        g_value_set_$_gtype(value, ${convertFunction}${getterFunctionName}(" . join(", ", @getterArguments) . ")${postConvertFunction});\n");
-        }
-    }
-
     push(@txtGetProps, "#else\n") if $conditionalString;
     push(@txtGetProps, @conditionalWarn) if scalar(@conditionalWarn);
     push(@txtGetProps, "#endif /* ${conditionalString} */\n") if $conditionalString;
@@ -576,7 +559,7 @@
     my $txtInstallProp = << "EOF";
     g_object_class_install_property(gobjectClass,
                                     ${propEnum},
-                                    g_param_spec_${_gtype}("${propName}", /* name */
+                                    g_param_spec_${gtype}("${propName}", /* name */
                                                            "$nick", /* short description */
                                                            "$long", /* longer - could do with some extra doc stuff here */
                                                            $param_spec_options{$gtype}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to