Title: [186496] trunk/Source/WebCore
Revision
186496
Author
calva...@igalia.com
Date
2015-07-08 03:34:41 -0700 (Wed, 08 Jul 2015)

Log Message

[GTK] Deactivate GObject bindings for static methods
https://bugs.webkit.org/show_bug.cgi?id=146717

Reviewed by Carlos Garcia Campos.

Static methods are currently not supported by GObject bindings so we deactivate them from the generation.

Current tests suffice. Expectations updated.

* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction): Skip isStatic functions.
* bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
(webkit_dom_test_interface_implements_method4): Deleted.
(webkit_dom_test_interface_supplemental_method4): Deleted.
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_class_method): Deleted.
(webkit_dom_test_obj_class_method_with_optional): Deleted.
(webkit_dom_test_obj_overloaded_method1): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (186495 => 186496)


--- trunk/Source/WebCore/ChangeLog	2015-07-08 10:28:23 UTC (rev 186495)
+++ trunk/Source/WebCore/ChangeLog	2015-07-08 10:34:41 UTC (rev 186496)
@@ -1,3 +1,26 @@
+2015-07-08  Xabier Rodriguez Calvar  <calva...@igalia.com>
+
+        [GTK] Deactivate GObject bindings for static methods
+        https://bugs.webkit.org/show_bug.cgi?id=146717
+
+        Reviewed by Carlos Garcia Campos.
+
+        Static methods are currently not supported by GObject bindings so we deactivate them from the generation.
+
+        Current tests suffice. Expectations updated.
+
+        * bindings/scripts/CodeGeneratorGObject.pm:
+        (SkipFunction): Skip isStatic functions.
+        * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
+        * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
+        (webkit_dom_test_interface_implements_method4): Deleted.
+        (webkit_dom_test_interface_supplemental_method4): Deleted.
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
+        (webkit_dom_test_obj_class_method): Deleted.
+        (webkit_dom_test_obj_class_method_with_optional): Deleted.
+        (webkit_dom_test_obj_overloaded_method1): Deleted.
+
 2015-07-07  Benjamin Poulain  <bpoul...@apple.com>
 
         Remove the overflow checks from the important vectors used by the content extensions machines

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (186495 => 186496)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm	2015-07-08 10:28:23 UTC (rev 186495)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm	2015-07-08 10:34:41 UTC (rev 186496)
@@ -287,6 +287,9 @@
     my $callWith = $function->signature->extendedAttributes->{"CallWith"};
     my $isUnsupportedCallWith = $codeGenerator->ExtendedAttributeContains($callWith, "ScriptArguments") || $codeGenerator->ExtendedAttributeContains($callWith, "CallStack");
 
+    # Static methods are unsupported
+    return 1 if $function->isStatic;
+
     if (($isCustomFunction || $isUnsupportedCallWith) &&
         $functionName ne "webkit_dom_node_replace_child" &&
         $functionName ne "webkit_dom_node_insert_before" &&

Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp (186495 => 186496)


--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp	2015-07-08 10:28:23 UTC (rev 186495)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp	2015-07-08 10:34:41 UTC (rev 186496)
@@ -289,26 +289,6 @@
 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
 }
 
-void webkit_dom_test_interface_implements_method4(WebKitDOMTestInterface* self)
-{
-#if ENABLE(Condition1) || ENABLE(Condition2)
-#if ENABLE(Condition22) || ENABLE(Condition23)
-    WebCore::JSMainThreadNullState state;
-    g_return_if_fail(WEBKIT_DOM_IS_TEST_INTERFACE(self));
-    WebCore::TestInterface* item = WebKit::core(self);
-    item->implementsMethod4();
-#else
-    UNUSED_PARAM(self);
-    WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition22")
-    WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition23")
-#endif /* ENABLE(Condition22) || ENABLE(Condition23) */
-#else
-    UNUSED_PARAM(self);
-    WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
-    WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
-#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
-}
-
 void webkit_dom_test_interface_supplemental_method1(WebKitDOMTestInterface* self)
 {
 #if ENABLE(Condition1) || ENABLE(Condition2)
@@ -368,26 +348,6 @@
 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
 }
 
-void webkit_dom_test_interface_supplemental_method4(WebKitDOMTestInterface* self)
-{
-#if ENABLE(Condition1) || ENABLE(Condition2)
-#if ENABLE(Condition11) || ENABLE(Condition12)
-    WebCore::JSMainThreadNullState state;
-    g_return_if_fail(WEBKIT_DOM_IS_TEST_INTERFACE(self));
-    WebCore::TestInterface* item = WebKit::core(self);
-    WebCore::TestSupplemental::supplementalMethod4(item);
-#else
-    UNUSED_PARAM(self);
-    WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition11")
-    WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition12")
-#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
-#else
-    UNUSED_PARAM(self);
-    WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
-    WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
-#endif /* ENABLE(Condition1) || ENABLE(Condition2) */
-}
-
 gchar* webkit_dom_test_interface_get_implements_str1(WebKitDOMTestInterface* self)
 {
 #if ENABLE(Condition1) || ENABLE(Condition2)

Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.h (186495 => 186496)


--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.h	2015-07-08 10:28:23 UTC (rev 186495)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.h	2015-07-08 10:34:41 UTC (rev 186496)
@@ -99,15 +99,6 @@
 webkit_dom_test_interface_implements_method2(WebKitDOMTestInterface* self, const gchar* strArg, WebKitDOMTestObj* objArg, GError** error);
 
 /**
- * webkit_dom_test_interface_implements_method4:
- * @self: A #WebKitDOMTestInterface
- *
- * Stability: Unstable
-**/
-WEBKIT_API void
-webkit_dom_test_interface_implements_method4(WebKitDOMTestInterface* self);
-
-/**
  * webkit_dom_test_interface_supplemental_method1:
  * @self: A #WebKitDOMTestInterface
  *
@@ -131,15 +122,6 @@
 webkit_dom_test_interface_supplemental_method2(WebKitDOMTestInterface* self, const gchar* strArg, WebKitDOMTestObj* objArg, GError** error);
 
 /**
- * webkit_dom_test_interface_supplemental_method4:
- * @self: A #WebKitDOMTestInterface
- *
- * Stability: Unstable
-**/
-WEBKIT_API void
-webkit_dom_test_interface_supplemental_method4(WebKitDOMTestInterface* self);
-
-/**
  * webkit_dom_test_interface_get_implements_str1:
  * @self: A #WebKitDOMTestInterface
  *

Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp (186495 => 186496)


--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp	2015-07-08 10:28:23 UTC (rev 186495)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp	2015-07-08 10:34:41 UTC (rev 186496)
@@ -1362,53 +1362,6 @@
 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
 }
 
-void webkit_dom_test_obj_class_method(WebKitDOMTestObj* self)
-{
-    WebCore::JSMainThreadNullState state;
-    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
-    WebCore::TestObj* item = WebKit::core(self);
-    item->classMethod();
-}
-
-glong webkit_dom_test_obj_class_method_with_optional(WebKitDOMTestObj* self, glong arg)
-{
-    WebCore::JSMainThreadNullState state;
-    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), 0);
-    WebCore::TestObj* item = WebKit::core(self);
-    glong result = item->classMethodWithOptional(arg);
-    return result;
-}
-
-void webkit_dom_test_obj_overloaded_method1(WebKitDOMTestObj* self, glong arg)
-{
-#if ENABLE(Condition1)
-    WebCore::JSMainThreadNullState state;
-    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
-    WebCore::TestObj* item = WebKit::core(self);
-    item->overloadedMethod1(arg);
-#else
-    UNUSED_PARAM(self);
-    UNUSED_PARAM(arg);
-    WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
-#endif /* ENABLE(Condition1) */
-}
-
-void webkit_dom_test_obj_overloaded_method1(WebKitDOMTestObj* self, const gchar* type)
-{
-#if ENABLE(Condition1)
-    WebCore::JSMainThreadNullState state;
-    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
-    g_return_if_fail(type);
-    WebCore::TestObj* item = WebKit::core(self);
-    WTF::String convertedType = WTF::String::fromUTF8(type);
-    item->overloadedMethod1(convertedType);
-#else
-    UNUSED_PARAM(self);
-    UNUSED_PARAM(type);
-    WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
-#endif /* ENABLE(Condition1) */
-}
-
 void webkit_dom_test_obj_convert1(WebKitDOMTestObj* self, WebKitDOMTestNode* value)
 {
     WebCore::JSMainThreadNullState state;

Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h (186495 => 186496)


--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h	2015-07-08 10:28:23 UTC (rev 186495)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h	2015-07-08 10:34:41 UTC (rev 186496)
@@ -466,47 +466,6 @@
 webkit_dom_test_obj_conditional_method3(WebKitDOMTestObj* self);
 
 /**
- * webkit_dom_test_obj_class_method:
- * @self: A #WebKitDOMTestObj
- *
- * Stability: Unstable
-**/
-WEBKIT_API void
-webkit_dom_test_obj_class_method(WebKitDOMTestObj* self);
-
-/**
- * webkit_dom_test_obj_class_method_with_optional:
- * @self: A #WebKitDOMTestObj
- * @arg: A #glong
- *
- * Returns: A #glong
- *
- * Stability: Unstable
-**/
-WEBKIT_API glong
-webkit_dom_test_obj_class_method_with_optional(WebKitDOMTestObj* self, glong arg);
-
-/**
- * webkit_dom_test_obj_overloaded_method1:
- * @self: A #WebKitDOMTestObj
- * @arg: A #glong
- *
- * Stability: Unstable
-**/
-WEBKIT_API void
-webkit_dom_test_obj_overloaded_method1(WebKitDOMTestObj* self, glong arg);
-
-/**
- * webkit_dom_test_obj_overloaded_method1:
- * @self: A #WebKitDOMTestObj
- * @type: A #gchar
- *
- * Stability: Unstable
-**/
-WEBKIT_API void
-webkit_dom_test_obj_overloaded_method1(WebKitDOMTestObj* self, const gchar* type);
-
-/**
  * webkit_dom_test_obj_convert1:
  * @self: A #WebKitDOMTestObj
  * @value: A #WebKitDOMTestNode
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to