Skip to content

Commit 645b904

Browse files
mcatanzarocarlosgcampos
authored andcommitted
[WPE][GTK] Remove most property nicks/blurbs
https://bugs.webkit.org/show_bug.cgi?id=250688 Reviewed by Carlos Garcia Campos. GObject property nicks and blurbs are mostly useless and require thinking to write, so we should get rid of almost all of them. This is especially beneficial for translators: most (but not all) of our nicks and blurbs are translated, and it's wasted effort to translate something that is never used. GTK has already removed its nicks and blurbs in https://gitlab.gnome.org/GNOME/gtk/-/issues/4904, and we should follow. Well, mostly. An exception is WebKitSettings. MiniBrowser is using the nicks and blurbs to programatically create its settings dialog. This is probably the best use of nicks and blurbs that I've ever seen. Keep the nicks and blurbs here to not break this. I've also not touched the deprecated GTK DOM API, since all of these files will be deleted in the distant future, and none of them are marked for translation, so they're not actively hurting anything. * Source/JavaScriptCore/API/glib/JSCClass.cpp: (jsc_class_class_init): * Source/JavaScriptCore/API/glib/JSCContext.cpp: (jsc_context_class_init): * Source/JavaScriptCore/API/glib/JSCValue.cpp: (jsc_value_class_init): * Source/JavaScriptCore/API/glib/JSCWeakValue.cpp: (jsc_weak_value_class_init): * Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp: (webkit_web_audio_src_class_init): * Source/WebCore/platform/graphics/gstreamer/DMABufVideoSinkGStreamer.cpp: (webkit_dmabuf_video_sink_class_init): * Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp: (webkit_gl_video_sink_class_init): * Source/WebCore/platform/graphics/gstreamer/TextCombinerPadGStreamer.cpp: (webkit_text_combiner_pad_class_init): * Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp: (webkit_audio_sink_class_init): * Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webkit_web_src_class_init): * Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp: (webkit_media_src_class_init): * Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp: (webkit_video_encoder_class_init): * Source/WebCore/platform/gtk/po/POTFILES.in: * Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: (webkit_media_stream_src_class_init): * Source/WebKit/Shared/API/glib/WebKitHitTestResult.cpp: (webkit_hit_test_result_class_init): * Source/WebKit/Shared/API/glib/WebKitURIRequest.cpp: (webkit_uri_request_class_init): * Source/WebKit/Shared/API/glib/WebKitURIResponse.cpp: (webkit_uri_response_class_init): * Source/WebKit/Shared/API/glib/WebKitUserMessage.cpp: (webkit_user_message_class_init): * Source/WebKit/UIProcess/API/glib/WebKitAutomationSession.cpp: (webkit_automation_session_class_init): * Source/WebKit/UIProcess/API/glib/WebKitDownload.cpp: (webkit_download_class_init): * Source/WebKit/UIProcess/API/glib/WebKitEditorState.cpp: (webkit_editor_state_class_init): * Source/WebKit/UIProcess/API/glib/WebKitFileChooserRequest.cpp: (webkit_file_chooser_request_class_init): * Source/WebKit/UIProcess/API/glib/WebKitFindController.cpp: (webkit_find_controller_class_init): * Source/WebKit/UIProcess/API/glib/WebKitGeolocationManager.cpp: (webkit_geolocation_manager_class_init): * Source/WebKit/UIProcess/API/glib/WebKitInputMethodContext.cpp: (webkit_input_method_context_class_init): * Source/WebKit/UIProcess/API/glib/WebKitNavigationPolicyDecision.cpp: (webkit_navigation_policy_decision_class_init): * Source/WebKit/UIProcess/API/glib/WebKitNotification.cpp: (webkit_notification_class_init): * Source/WebKit/UIProcess/API/glib/WebKitResponsePolicyDecision.cpp: (webkit_response_policy_decision_class_init): * Source/WebKit/UIProcess/API/glib/WebKitURISchemeResponse.cpp: (webkit_uri_scheme_response_class_init): * Source/WebKit/UIProcess/API/glib/WebKitUserContentFilterStore.cpp: (webkit_user_content_filter_store_class_init): * Source/WebKit/UIProcess/API/glib/WebKitUserMediaPermissionRequest.cpp: (webkit_user_media_permission_request_class_init): * Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp: (webkit_web_context_class_init): * Source/WebKit/UIProcess/API/glib/WebKitWebResource.cpp: (webkit_web_resource_class_init): * Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp: (webkit_web_view_class_init): * Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataManager.cpp: (webkit_website_data_manager_class_init): * Source/WebKit/UIProcess/API/glib/WebKitWebsitePolicies.cpp: (webkit_website_policies_class_init): * Source/WebKit/UIProcess/API/glib/WebKitWindowProperties.cpp: (webkit_window_properties_class_init): * Source/WebKit/UIProcess/API/gtk/WebKitColorChooserRequest.cpp: (webkit_color_chooser_request_class_init): * Source/WebKit/UIProcess/API/gtk/WebKitPrintCustomWidget.cpp: (webkit_print_custom_widget_class_init): * Source/WebKit/UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkit_print_operation_class_init): * Source/WebKit/UIProcess/API/gtk/WebKitWebInspector.cpp: (webkit_web_inspector_class_init): * Source/WebKit/WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMObject.cpp: (webkit_dom_object_class_init): * Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebHitTestResult.cpp: (webkit_web_hit_test_result_class_init): * Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp: (webkit_web_page_class_init): * Tools/MiniBrowser/gtk/BrowserCellRendererVariant.c: (browser_cell_renderer_variant_class_init): * Tools/MiniBrowser/gtk/BrowserSettingsDialog.c: (browser_settings_dialog_class_init): * Tools/MiniBrowser/gtk/BrowserTab.c: (browser_tab_class_init): Canonical link: https://commits.webkit.org/258973@main
1 parent cba3185 commit 645b904

47 files changed

Lines changed: 164 additions & 307 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Source/JavaScriptCore/API/glib/JSCClass.cpp‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,7 @@ static void jsc_class_class_init(JSCClassClass* klass)
337337
PROP_CONTEXT,
338338
g_param_spec_object(
339339
"context",
340-
"JSCContext",
341-
"JSC Context",
340+
nullptr, nullptr,
342341
JSC_TYPE_CONTEXT,
343342
static_cast<GParamFlags>(WEBKIT_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)));
344343

@@ -351,8 +350,7 @@ static void jsc_class_class_init(JSCClassClass* klass)
351350
PROP_NAME,
352351
g_param_spec_string(
353352
"name",
354-
"Name",
355-
"The class name",
353+
nullptr, nullptr,
356354
nullptr,
357355
static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));
358356

@@ -365,8 +363,7 @@ static void jsc_class_class_init(JSCClassClass* klass)
365363
PROP_PARENT,
366364
g_param_spec_object(
367365
"parent",
368-
"Partent",
369-
"The parent class",
366+
nullptr, nullptr,
370367
JSC_TYPE_CLASS,
371368
static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));
372369
}

‎Source/JavaScriptCore/API/glib/JSCContext.cpp‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ static void jsc_context_class_init(JSCContextClass* klass)
185185
PROP_VIRTUAL_MACHINE,
186186
g_param_spec_object(
187187
"virtual-machine",
188-
"JSCVirtualMachine",
189-
"JSC Virtual Machine",
188+
nullptr, nullptr,
190189
JSC_TYPE_VIRTUAL_MACHINE,
191190
static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));
192191
}

‎Source/JavaScriptCore/API/glib/JSCValue.cpp‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ static void jsc_value_class_init(JSCValueClass* klass)
120120
PROP_CONTEXT,
121121
g_param_spec_object(
122122
"context",
123-
"JSCContext",
124-
"JSC Context",
123+
nullptr, nullptr,
125124
JSC_TYPE_CONTEXT,
126125
static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));
127126
}

‎Source/JavaScriptCore/API/glib/JSCWeakValue.cpp‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ static void jsc_weak_value_class_init(JSCWeakValueClass* klass)
139139
PROP_VALUE,
140140
g_param_spec_object(
141141
"value",
142-
"JSCValue",
143-
"JSC Value",
142+
nullptr, nullptr,
144143
JSC_TYPE_VALUE,
145144
static_cast<GParamFlags>(WEBKIT_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)));
146145

‎Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,22 +186,24 @@ static void webkit_web_audio_src_class_init(WebKitWebAudioSrcClass* webKitWebAud
186186
GParamFlags flags = static_cast<GParamFlags>(G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
187187
g_object_class_install_property(objectClass,
188188
PROP_RATE,
189-
g_param_spec_float("rate", "rate",
190-
"Sample rate", G_MINDOUBLE, G_MAXDOUBLE,
189+
g_param_spec_float("rate",
190+
nullptr, nullptr,
191+
G_MINDOUBLE, G_MAXDOUBLE,
191192
44100.0, flags));
192193

193194
g_object_class_install_property(objectClass,
194195
PROP_BUS,
195-
g_param_spec_pointer("bus", "bus",
196-
"Bus", flags));
196+
g_param_spec_pointer("bus",
197+
nullptr, nullptr,
198+
flags));
197199

198200
g_object_class_install_property(objectClass, PROP_DESTINATION, g_param_spec_pointer("destination", "destination",
199201
"Destination", flags));
200202

201203
g_object_class_install_property(objectClass,
202204
PROP_FRAMES,
203-
g_param_spec_uint("frames", "frames",
204-
"Number of audio frames to pull at each iteration",
205+
g_param_spec_uint("frames",
206+
nullptr, nullptr,
205207
0, G_MAXUINT8, AudioUtilities::renderQuantumSize, flags));
206208
}
207209

‎Source/WebCore/platform/graphics/gstreamer/DMABufVideoSinkGStreamer.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ static void webkit_dmabuf_video_sink_class_init(WebKitDMABufVideoSinkClass* klas
156156
gst_element_class_add_pad_template(elementClass, gst_static_pad_template_get(&sinkTemplate));
157157
gst_element_class_set_static_metadata(elementClass, "WebKit DMABuf video sink", "Sink/Video", "Renders video", "Zan Dobersek <zdobersek@igalia.com>");
158158

159-
g_object_class_install_property(objectClass, PROP_STATS, g_param_spec_boxed("stats", "Statistics",
160-
"Sink Statistics", GST_TYPE_STRUCTURE, static_cast<GParamFlags>(G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
159+
g_object_class_install_property(objectClass, PROP_STATS, g_param_spec_boxed("stats",
160+
nullptr, nullptr, GST_TYPE_STRUCTURE, static_cast<GParamFlags>(G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
161161
}
162162

163163
bool webKitDMABufVideoSinkIsEnabled()

‎Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ static void webkit_gl_video_sink_class_init(WebKitGLVideoSinkClass* klass)
212212
gst_element_class_add_pad_template(elementClass, gst_static_pad_template_get(&sinkTemplate));
213213
gst_element_class_set_static_metadata(elementClass, "WebKit GL video sink", "Sink/Video", "Renders video", "Philippe Normand <philn@igalia.com>");
214214

215-
g_object_class_install_property(objectClass, PROP_STATS, g_param_spec_boxed("stats", "Statistics",
216-
"Sink Statistics", GST_TYPE_STRUCTURE, static_cast<GParamFlags>(G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
215+
g_object_class_install_property(objectClass, PROP_STATS, g_param_spec_boxed("stats",
216+
nullptr, nullptr, GST_TYPE_STRUCTURE, static_cast<GParamFlags>(G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
217217

218218
elementClass->change_state = GST_DEBUG_FUNCPTR(webKitGLVideoSinkChangeState);
219219
}

‎Source/WebCore/platform/graphics/gstreamer/TextCombinerPadGStreamer.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ static void webkit_text_combiner_pad_class_init(WebKitTextCombinerPadClass* klas
152152
gobjectClass->set_property = GST_DEBUG_FUNCPTR(webkitTextCombinerPadSetProperty);
153153

154154
sObjProperties[PROP_PAD_TAGS] =
155-
g_param_spec_boxed("tags", "Tags", "The currently active tags on the pad", GST_TYPE_TAG_LIST,
155+
g_param_spec_boxed("tags", nullptr, nullptr, GST_TYPE_TAG_LIST,
156156
static_cast<GParamFlags>(G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
157157

158158
sObjProperties[PROP_INNER_COMBINER_PAD] =
159-
g_param_spec_object("inner-combiner-pad", "Internal Combiner Pad", "The internal funnel (or concat) pad associated with this pad", GST_TYPE_PAD,
159+
g_param_spec_object("inner-combiner-pad", nullptr, nullptr, GST_TYPE_PAD,
160160
static_cast<GParamFlags>(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
161161

162162
g_object_class_install_properties(gobjectClass, N_PROPERTIES, sObjProperties);

‎Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,10 @@ static void webkit_audio_sink_class_init(WebKitAudioSinkClass* klass)
309309
oklass->constructed = webKitAudioSinkConstructed;
310310

311311
g_object_class_install_property(oklass, PROP_VOLUME,
312-
g_param_spec_double("volume", "Volume", "The audio volume, 1.0=100%", 0, 10, 1,
312+
g_param_spec_double("volume", nullptr, nullptr, 0, 10, 1,
313313
static_cast<GParamFlags>(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
314314
g_object_class_install_property(oklass, PROP_MUTE,
315-
g_param_spec_boolean("mute", "Mute", "Mute the audio channel without changing the volume", FALSE,
315+
g_param_spec_boolean("mute", nullptr, nullptr, FALSE,
316316
static_cast<GParamFlags>(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
317317

318318
GstElementClass* eklass = GST_ELEMENT_CLASS(klass);

‎Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,27 +218,27 @@ static void webkit_web_src_class_init(WebKitWebSrcClass* klass)
218218
/* Allows setting the uri using the 'location' property, which is used
219219
* for example by gst_element_make_from_uri() */
220220
g_object_class_install_property(oklass, PROP_LOCATION,
221-
g_param_spec_string("location", "location", "Location to read from",
221+
g_param_spec_string("location", nullptr, nullptr,
222222
nullptr, static_cast<GParamFlags>(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
223223

224224
g_object_class_install_property(oklass, PROP_RESOLVED_LOCATION,
225-
g_param_spec_string("resolved-location", "Resolved location", "The location resolved by the server",
225+
g_param_spec_string("resolved-location", nullptr, nullptr,
226226
nullptr, static_cast<GParamFlags>(G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)));
227227

228228
g_object_class_install_property(oklass, PROP_KEEP_ALIVE,
229-
g_param_spec_boolean("keep-alive", "keep-alive", "Use HTTP persistent connections",
229+
g_param_spec_boolean("keep-alive", nullptr, nullptr,
230230
FALSE, static_cast<GParamFlags>(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
231231

232232
g_object_class_install_property(oklass, PROP_EXTRA_HEADERS,
233-
g_param_spec_boxed("extra-headers", "Extra Headers", "Extra headers to append to the HTTP request",
233+
g_param_spec_boxed("extra-headers", nullptr, nullptr,
234234
GST_TYPE_STRUCTURE, static_cast<GParamFlags>(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
235235

236236
g_object_class_install_property(oklass, PROP_COMPRESS,
237-
g_param_spec_boolean("compress", "Compress", "Allow compressed content encodings",
237+
g_param_spec_boolean("compress", nullptr, nullptr,
238238
FALSE, static_cast<GParamFlags>(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
239239

240240
g_object_class_install_property(oklass, PROP_METHOD,
241-
g_param_spec_string("method", "method", "The HTTP method to use (default: GET)",
241+
g_param_spec_string("method", nullptr, nullptr,
242242
nullptr, static_cast<GParamFlags>(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
243243

244244
eklass->set_context = GST_DEBUG_FUNCPTR(webKitWebSrcSetContext);

0 commit comments

Comments
 (0)