[GTK] Cleanup WebKitDOMObject
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Mar 2014 13:45:06 +0000 (13:45 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Mar 2014 13:45:06 +0000 (13:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=130246

Reviewed by Martin Robinson.

Remove unneeded getter and fix coding style.

* bindings/gobject/WebKitDOMObject.cpp:
(webkitDOMObjectSetProperty):
(webkit_dom_object_class_init):

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

Source/WebCore/ChangeLog
Source/WebCore/bindings/gobject/WebKitDOMObject.cpp

index 8626850..bb59efa 100644 (file)
@@ -1,3 +1,16 @@
+2014-03-17  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK] Cleanup WebKitDOMObject
+        https://bugs.webkit.org/show_bug.cgi?id=130246
+
+        Reviewed by Martin Robinson.
+
+        Remove unneeded getter and fix coding style.
+
+        * bindings/gobject/WebKitDOMObject.cpp:
+        (webkitDOMObjectSetProperty):
+        (webkit_dom_object_class_init):
+
 2014-03-17  Darin Adler  <darin@apple.com>
 
         Stop using deprecatedCharacters in HTMLTreeBuilder
index 332bdb7..352c658 100644 (file)
@@ -19,19 +19,14 @@ static void webkit_dom_object_init(WebKitDOMObject*)
 {
 }
 
-static void webkit_dom_object_get_property(GObject* object, guint propertyId, GValue*, GParamSpec* paramSpec)
+static void webkitDOMObjectSetProperty(GObject* object, guint propertyId, const GValue* value, GParamSpec* pspec)
 {
-    G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, paramSpec);
-}
-
-static void webkit_dom_object_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
-{
-    switch (prop_id) {
+    switch (propertyId) {
     case PROP_CORE_OBJECT:
         WEBKIT_DOM_OBJECT(object)->coreObject = g_value_get_pointer(value);
         break;
     default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec);
         break;
     }
 }
@@ -39,14 +34,14 @@ static void webkit_dom_object_set_property(GObject* object, guint prop_id, const
 static void webkit_dom_object_class_init(WebKitDOMObjectClass* klass)
 {
     GObjectClass* gobjectClass = G_OBJECT_CLASS(klass);
-    gobjectClass->set_property = webkit_dom_object_set_property;
-    gobjectClass->get_property = webkit_dom_object_get_property;
-
-    g_object_class_install_property(gobjectClass,
-                                    PROP_CORE_OBJECT,
-                                    g_param_spec_pointer("core-object",
-                                                         "Core Object",
-                                                         "The WebCore object the WebKitDOMObject wraps",
-                                                         static_cast<GParamFlags>(G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)));
+    gobjectClass->set_property = webkitDOMObjectSetProperty;
+
+    g_object_class_install_property(
+        gobjectClass,
+        PROP_CORE_OBJECT,
+        g_param_spec_pointer(
+            "core-object",
+            "Core Object",
+            "The WebCore object the WebKitDOMObject wraps",
+            static_cast<GParamFlags>(G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)));
 }
-