Title: [167752] trunk/Source/WebCore
Revision
167752
Author
carlo...@webkit.org
Date
2014-04-24 00:17:15 -0700 (Thu, 24 Apr 2014)

Log Message

[GTK] HTML Media capture attribute is a boolean since r163958
https://bugs.webkit.org/show_bug.cgi?id=132061

Reviewed by Gustavo Noronha Silva.

Add new methods webkit_dom_html_input_element_get_capture_enabled
and webkit_dom_html_input_element_set_capture_enabled using a
boolean and deprecate the old methods.

* bindings/gobject/WebKitDOMDeprecated.cpp:
(webkit_dom_html_input_element_get_capture):
(webkit_dom_html_input_element_set_capture):
* bindings/gobject/WebKitDOMDeprecated.h:
* bindings/gobject/WebKitDOMDeprecated.symbols:
* bindings/gobject/webkitdom.symbols:
* bindings/scripts/CodeGeneratorGObject.pm:
(GetEffectiveFunctionName): Helper function to rename API methods
for special cases.
(GenerateFunction): Use GetEffectiveFunctionName().

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (167751 => 167752)


--- trunk/Source/WebCore/ChangeLog	2014-04-24 07:07:06 UTC (rev 167751)
+++ trunk/Source/WebCore/ChangeLog	2014-04-24 07:17:15 UTC (rev 167752)
@@ -1,3 +1,25 @@
+2014-04-23  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [GTK] HTML Media capture attribute is a boolean since r163958
+        https://bugs.webkit.org/show_bug.cgi?id=132061
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Add new methods webkit_dom_html_input_element_get_capture_enabled
+        and webkit_dom_html_input_element_set_capture_enabled using a
+        boolean and deprecate the old methods.
+
+        * bindings/gobject/WebKitDOMDeprecated.cpp:
+        (webkit_dom_html_input_element_get_capture):
+        (webkit_dom_html_input_element_set_capture):
+        * bindings/gobject/WebKitDOMDeprecated.h:
+        * bindings/gobject/WebKitDOMDeprecated.symbols:
+        * bindings/gobject/webkitdom.symbols:
+        * bindings/scripts/CodeGeneratorGObject.pm:
+        (GetEffectiveFunctionName): Helper function to rename API methods
+        for special cases.
+        (GenerateFunction): Use GetEffectiveFunctionName().
+
 2014-04-23  Praveen R Jadhav  <pravee...@samsung.com>
 
         [MediaStream] Implement MediaStream active attribute

Modified: trunk/Source/WebCore/bindings/gobject/WebKitDOMDeprecated.cpp (167751 => 167752)


--- trunk/Source/WebCore/bindings/gobject/WebKitDOMDeprecated.cpp	2014-04-24 07:07:06 UTC (rev 167751)
+++ trunk/Source/WebCore/bindings/gobject/WebKitDOMDeprecated.cpp	2014-04-24 07:17:15 UTC (rev 167752)
@@ -657,3 +657,16 @@
 {
     g_warning("%s: Access to the DOM Shadow Root has been removed from WebKit, this function does nothing.", __func__);
 }
+
+// WebKitDOMHTMLInputElement
+
+gchar* webkit_dom_html_input_element_get_capture(WebKitDOMHTMLInputElement*)
+{
+    g_warning("The WebKitDOMHTMLInputElement:capture property has converted to a boolean according to the specification. This method will always return NULL. Use webkit_dom_html_input_element_get_capture_enabled() instead.");
+    return nullptr;
+}
+
+void webkit_dom_html_input_element_set_capture(WebKitDOMHTMLInputElement*, const gchar*)
+{
+    g_warning("The WebKitDOMHTMLInputElement:capture property has converted to a boolean according to the specification. This method does nothing. Use webkit_dom_html_input_element_set_capture_enabled() instead.");
+}

Modified: trunk/Source/WebCore/bindings/gobject/WebKitDOMDeprecated.h (167751 => 167752)


--- trunk/Source/WebCore/bindings/gobject/WebKitDOMDeprecated.h	2014-04-24 07:07:06 UTC (rev 167751)
+++ trunk/Source/WebCore/bindings/gobject/WebKitDOMDeprecated.h	2014-04-24 07:17:15 UTC (rev 167752)
@@ -765,7 +765,27 @@
 WEBKIT_DEPRECATED void
 webkit_dom_shadow_root_set_reset_style_inheritance(WebKitDOMShadowRoot* self, gboolean value);
 
+/**
+ * webkit_dom_html_input_element_get_capture:
+ * @self: A #WebKitDOMHTMLInputElement
+ *
+ * Returns: A #gchar
+ *
+ * Deprecated: 2.6: Use webkit_dom_html_input_element_get_capture_enabled() instead.
+ */
+WEBKIT_DEPRECATED_FOR(webkit_dom_html_input_element_get_capture_enabled) gchar*
+webkit_dom_html_input_element_get_capture(WebKitDOMHTMLInputElement* self);
 
+/**
+ * webkit_dom_html_input_element_set_capture:
+ * @self: A #WebKitDOMHTMLInputElement
+ * @value: A #gchar
+ *
+ * Deprecated: 2.6: Use webkit_dom_html_input_element_set_capture_enabled() instead.
+ */
+WEBKIT_DEPRECATED_FOR(webkit_dom_html_input_element_set_capture_enabled) void
+webkit_dom_html_input_element_set_capture(WebKitDOMHTMLInputElement* self, const gchar* value);
+
 G_END_DECLS
 
 #endif /* WEBKIT_DISABLE_DEPRECATED */

Modified: trunk/Source/WebCore/bindings/gobject/WebKitDOMDeprecated.symbols (167751 => 167752)


--- trunk/Source/WebCore/bindings/gobject/WebKitDOMDeprecated.symbols	2014-04-24 07:07:06 UTC (rev 167751)
+++ trunk/Source/WebCore/bindings/gobject/WebKitDOMDeprecated.symbols	2014-04-24 07:17:15 UTC (rev 167752)
@@ -4,6 +4,8 @@
 gchar* webkit_dom_html_element_get_class_name(WebKitDOMHTMLElement*)
 void webkit_dom_html_element_set_class_name(WebKitDOMHTMLElement*, const gchar*)
 WebKitDOMDOMTokenList* webkit_dom_html_element_get_class_list(WebKitDOMHTMLElement*)
+gchar* webkit_dom_html_input_element_get_capture(WebKitDOMHTMLInputElement*)
+void webkit_dom_html_input_element_set_capture(WebKitDOMHTMLInputElement*, const gchar*)
 void webkit_dom_html_form_element_dispatch_form_change(WebKitDOMHTMLFormElement*)
 void webkit_dom_html_form_element_dispatch_form_input(WebKitDOMHTMLFormElement*)
 gboolean webkit_dom_webkit_named_flow_get_overflow(WebKitDOMWebKitNamedFlow*)

Modified: trunk/Source/WebCore/bindings/gobject/webkitdom.symbols (167751 => 167752)


--- trunk/Source/WebCore/bindings/gobject/webkitdom.symbols	2014-04-24 07:07:06 UTC (rev 167751)
+++ trunk/Source/WebCore/bindings/gobject/webkitdom.symbols	2014-04-24 07:17:15 UTC (rev 167752)
@@ -802,6 +802,8 @@
 void webkit_dom_html_image_element_set_vspace(WebKitDOMHTMLImageElement*, glong)
 glong webkit_dom_html_image_element_get_width(WebKitDOMHTMLImageElement*)
 void webkit_dom_html_image_element_set_width(WebKitDOMHTMLImageElement*, glong)
+gboolean webkit_dom_html_input_element_get_capture_enabled(WebKitDOMHTMLInputElement*)
+void webkit_dom_html_input_element_set_capture_enabled(WebKitDOMHTMLInputElement*, gboolean)
 gboolean webkit_dom_html_image_element_get_complete(WebKitDOMHTMLImageElement*)
 gchar* webkit_dom_html_image_element_get_lowsrc(WebKitDOMHTMLImageElement*)
 void webkit_dom_html_image_element_set_lowsrc(WebKitDOMHTMLImageElement*, const gchar*)

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (167751 => 167752)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm	2014-04-24 07:07:06 UTC (rev 167751)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm	2014-04-24 07:17:15 UTC (rev 167752)
@@ -930,6 +930,21 @@
     return ($version, $replacement);
 }
 
+sub GetEffectiveFunctionName {
+    my $functionName = shift;
+
+    # Rename webkit_dom_html_input_element_[set|get]_capture functions since they were changed to set/receive a
+    # boolean instead of a string in r163958. The old methods are now manually added as deprecated.
+    if ($functionName eq "webkit_dom_html_input_element_set_capture") {
+        return "webkit_dom_html_input_element_set_capture_enabled";
+    }
+    if ($functionName eq "webkit_dom_html_input_element_get_capture") {
+        return "webkit_dom_html_input_element_get_capture_enabled";
+    }
+
+    return $functionName;
+}
+
 sub GenerateFunction {
     my ($object, $interfaceName, $function, $prefix, $parentNode) = @_;
 
@@ -941,7 +956,7 @@
 
     my ($deprecationVersion, $deprecationReplacement) = GetFunctionDeprecationInformation($function, $parentNode);
     my $functionSigType = $prefix eq "set_" ? "void" : $function->signature->type;
-    my $functionName = "webkit_dom_" . $decamelize . "_" . $prefix . decamelize($function->signature->name);
+    my $functionName = GetEffectiveFunctionName("webkit_dom_" . $decamelize . "_" . $prefix . decamelize($function->signature->name));
     my $returnType = GetGlibTypeName($functionSigType);
     my $returnValueIsGDOMType = IsGDOMClassType($functionSigType);
     my $raisesException = $function->signature->extendedAttributes->{"RaisesException"};
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to