Changeset 186496 in webkit


Ignore:
Timestamp:
Jul 8, 2015 3:34:41 AM (9 years ago)
Author:
calvaris@igalia.com
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.

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r186491 r186496  
     12015-07-08  Xabier Rodriguez Calvar  <calvaris@igalia.com>
     2
     3        [GTK] Deactivate GObject bindings for static methods
     4        https://bugs.webkit.org/show_bug.cgi?id=146717
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        Static methods are currently not supported by GObject bindings so we deactivate them from the generation.
     9
     10        Current tests suffice. Expectations updated.
     11
     12        * bindings/scripts/CodeGeneratorGObject.pm:
     13        (SkipFunction): Skip isStatic functions.
     14        * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
     15        * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
     16        (webkit_dom_test_interface_implements_method4): Deleted.
     17        (webkit_dom_test_interface_supplemental_method4): Deleted.
     18        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
     19        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
     20        (webkit_dom_test_obj_class_method): Deleted.
     21        (webkit_dom_test_obj_class_method_with_optional): Deleted.
     22        (webkit_dom_test_obj_overloaded_method1): Deleted.
     23
    1242015-07-07  Benjamin Poulain  <bpoulain@apple.com>
    225
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm

    r186020 r186496  
    287287    my $callWith = $function->signature->extendedAttributes->{"CallWith"};
    288288    my $isUnsupportedCallWith = $codeGenerator->ExtendedAttributeContains($callWith, "ScriptArguments") || $codeGenerator->ExtendedAttributeContains($callWith, "CallStack");
     289
     290    # Static methods are unsupported
     291    return 1 if $function->isStatic;
    289292
    290293    if (($isCustomFunction || $isUnsupportedCallWith) &&
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp

    r171294 r186496  
    290290}
    291291
    292 void webkit_dom_test_interface_implements_method4(WebKitDOMTestInterface* self)
    293 {
    294 #if ENABLE(Condition1) || ENABLE(Condition2)
    295 #if ENABLE(Condition22) || ENABLE(Condition23)
    296     WebCore::JSMainThreadNullState state;
    297     g_return_if_fail(WEBKIT_DOM_IS_TEST_INTERFACE(self));
    298     WebCore::TestInterface* item = WebKit::core(self);
    299     item->implementsMethod4();
    300 #else
    301     UNUSED_PARAM(self);
    302     WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition22")
    303     WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition23")
    304 #endif /* ENABLE(Condition22) || ENABLE(Condition23) */
    305 #else
    306     UNUSED_PARAM(self);
    307     WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
    308     WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
    309 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
    310 }
    311 
    312292void webkit_dom_test_interface_supplemental_method1(WebKitDOMTestInterface* self)
    313293{
     
    369349}
    370350
    371 void webkit_dom_test_interface_supplemental_method4(WebKitDOMTestInterface* self)
    372 {
    373 #if ENABLE(Condition1) || ENABLE(Condition2)
    374 #if ENABLE(Condition11) || ENABLE(Condition12)
    375     WebCore::JSMainThreadNullState state;
    376     g_return_if_fail(WEBKIT_DOM_IS_TEST_INTERFACE(self));
    377     WebCore::TestInterface* item = WebKit::core(self);
    378     WebCore::TestSupplemental::supplementalMethod4(item);
    379 #else
    380     UNUSED_PARAM(self);
    381     WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition11")
    382     WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition12")
    383 #endif /* ENABLE(Condition11) || ENABLE(Condition12) */
    384 #else
    385     UNUSED_PARAM(self);
    386     WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
    387     WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition2")
    388 #endif /* ENABLE(Condition1) || ENABLE(Condition2) */
    389 }
    390 
    391351gchar* webkit_dom_test_interface_get_implements_str1(WebKitDOMTestInterface* self)
    392352{
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.h

    r170475 r186496  
    100100
    101101/**
    102  * webkit_dom_test_interface_implements_method4:
    103  * @self: A #WebKitDOMTestInterface
    104  *
    105  * Stability: Unstable
    106 **/
    107 WEBKIT_API void
    108 webkit_dom_test_interface_implements_method4(WebKitDOMTestInterface* self);
    109 
    110 /**
    111102 * webkit_dom_test_interface_supplemental_method1:
    112103 * @self: A #WebKitDOMTestInterface
     
    132123
    133124/**
    134  * webkit_dom_test_interface_supplemental_method4:
    135  * @self: A #WebKitDOMTestInterface
    136  *
    137  * Stability: Unstable
    138 **/
    139 WEBKIT_API void
    140 webkit_dom_test_interface_supplemental_method4(WebKitDOMTestInterface* self);
    141 
    142 /**
    143125 * webkit_dom_test_interface_get_implements_str1:
    144126 * @self: A #WebKitDOMTestInterface
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp

    r185694 r186496  
    13631363}
    13641364
    1365 void webkit_dom_test_obj_class_method(WebKitDOMTestObj* self)
    1366 {
    1367     WebCore::JSMainThreadNullState state;
    1368     g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
    1369     WebCore::TestObj* item = WebKit::core(self);
    1370     item->classMethod();
    1371 }
    1372 
    1373 glong webkit_dom_test_obj_class_method_with_optional(WebKitDOMTestObj* self, glong arg)
    1374 {
    1375     WebCore::JSMainThreadNullState state;
    1376     g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), 0);
    1377     WebCore::TestObj* item = WebKit::core(self);
    1378     glong result = item->classMethodWithOptional(arg);
    1379     return result;
    1380 }
    1381 
    1382 void webkit_dom_test_obj_overloaded_method1(WebKitDOMTestObj* self, glong arg)
    1383 {
    1384 #if ENABLE(Condition1)
    1385     WebCore::JSMainThreadNullState state;
    1386     g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
    1387     WebCore::TestObj* item = WebKit::core(self);
    1388     item->overloadedMethod1(arg);
    1389 #else
    1390     UNUSED_PARAM(self);
    1391     UNUSED_PARAM(arg);
    1392     WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
    1393 #endif /* ENABLE(Condition1) */
    1394 }
    1395 
    1396 void webkit_dom_test_obj_overloaded_method1(WebKitDOMTestObj* self, const gchar* type)
    1397 {
    1398 #if ENABLE(Condition1)
    1399     WebCore::JSMainThreadNullState state;
    1400     g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
    1401     g_return_if_fail(type);
    1402     WebCore::TestObj* item = WebKit::core(self);
    1403     WTF::String convertedType = WTF::String::fromUTF8(type);
    1404     item->overloadedMethod1(convertedType);
    1405 #else
    1406     UNUSED_PARAM(self);
    1407     UNUSED_PARAM(type);
    1408     WEBKIT_WARN_FEATURE_NOT_PRESENT("Condition1")
    1409 #endif /* ENABLE(Condition1) */
    1410 }
    1411 
    14121365void webkit_dom_test_obj_convert1(WebKitDOMTestObj* self, WebKitDOMTestNode* value)
    14131366{
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h

    r185694 r186496  
    467467
    468468/**
    469  * webkit_dom_test_obj_class_method:
    470  * @self: A #WebKitDOMTestObj
    471  *
    472  * Stability: Unstable
    473 **/
    474 WEBKIT_API void
    475 webkit_dom_test_obj_class_method(WebKitDOMTestObj* self);
    476 
    477 /**
    478  * webkit_dom_test_obj_class_method_with_optional:
    479  * @self: A #WebKitDOMTestObj
    480  * @arg: A #glong
    481  *
    482  * Returns: A #glong
    483  *
    484  * Stability: Unstable
    485 **/
    486 WEBKIT_API glong
    487 webkit_dom_test_obj_class_method_with_optional(WebKitDOMTestObj* self, glong arg);
    488 
    489 /**
    490  * webkit_dom_test_obj_overloaded_method1:
    491  * @self: A #WebKitDOMTestObj
    492  * @arg: A #glong
    493  *
    494  * Stability: Unstable
    495 **/
    496 WEBKIT_API void
    497 webkit_dom_test_obj_overloaded_method1(WebKitDOMTestObj* self, glong arg);
    498 
    499 /**
    500  * webkit_dom_test_obj_overloaded_method1:
    501  * @self: A #WebKitDOMTestObj
    502  * @type: A #gchar
    503  *
    504  * Stability: Unstable
    505 **/
    506 WEBKIT_API void
    507 webkit_dom_test_obj_overloaded_method1(WebKitDOMTestObj* self, const gchar* type);
    508 
    509 /**
    510469 * webkit_dom_test_obj_convert1:
    511470 * @self: A #WebKitDOMTestObj
Note: See TracChangeset for help on using the changeset viewer.