Changeset 167752 in webkit


Ignore:
Timestamp:
Apr 24, 2014 12:17:15 AM (10 years ago)
Author:
Carlos Garcia Campos
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().

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r167750 r167752  
     12014-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] HTML Media capture attribute is a boolean since r163958
     4        https://bugs.webkit.org/show_bug.cgi?id=132061
     5
     6        Reviewed by Gustavo Noronha Silva.
     7
     8        Add new methods webkit_dom_html_input_element_get_capture_enabled
     9        and webkit_dom_html_input_element_set_capture_enabled using a
     10        boolean and deprecate the old methods.
     11
     12        * bindings/gobject/WebKitDOMDeprecated.cpp:
     13        (webkit_dom_html_input_element_get_capture):
     14        (webkit_dom_html_input_element_set_capture):
     15        * bindings/gobject/WebKitDOMDeprecated.h:
     16        * bindings/gobject/WebKitDOMDeprecated.symbols:
     17        * bindings/gobject/webkitdom.symbols:
     18        * bindings/scripts/CodeGeneratorGObject.pm:
     19        (GetEffectiveFunctionName): Helper function to rename API methods
     20        for special cases.
     21        (GenerateFunction): Use GetEffectiveFunctionName().
     22
    1232014-04-23  Praveen R Jadhav  <praveen.j@samsung.com>
    224
  • trunk/Source/WebCore/bindings/gobject/WebKitDOMDeprecated.cpp

    r167712 r167752  
    658658    g_warning("%s: Access to the DOM Shadow Root has been removed from WebKit, this function does nothing.", __func__);
    659659}
     660
     661// WebKitDOMHTMLInputElement
     662
     663gchar* webkit_dom_html_input_element_get_capture(WebKitDOMHTMLInputElement*)
     664{
     665    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.");
     666    return nullptr;
     667}
     668
     669void webkit_dom_html_input_element_set_capture(WebKitDOMHTMLInputElement*, const gchar*)
     670{
     671    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.");
     672}
  • trunk/Source/WebCore/bindings/gobject/WebKitDOMDeprecated.h

    r167712 r167752  
    766766webkit_dom_shadow_root_set_reset_style_inheritance(WebKitDOMShadowRoot* self, gboolean value);
    767767
     768/**
     769 * webkit_dom_html_input_element_get_capture:
     770 * @self: A #WebKitDOMHTMLInputElement
     771 *
     772 * Returns: A #gchar
     773 *
     774 * Deprecated: 2.6: Use webkit_dom_html_input_element_get_capture_enabled() instead.
     775 */
     776WEBKIT_DEPRECATED_FOR(webkit_dom_html_input_element_get_capture_enabled) gchar*
     777webkit_dom_html_input_element_get_capture(WebKitDOMHTMLInputElement* self);
     778
     779/**
     780 * webkit_dom_html_input_element_set_capture:
     781 * @self: A #WebKitDOMHTMLInputElement
     782 * @value: A #gchar
     783 *
     784 * Deprecated: 2.6: Use webkit_dom_html_input_element_set_capture_enabled() instead.
     785 */
     786WEBKIT_DEPRECATED_FOR(webkit_dom_html_input_element_set_capture_enabled) void
     787webkit_dom_html_input_element_set_capture(WebKitDOMHTMLInputElement* self, const gchar* value);
    768788
    769789G_END_DECLS
  • trunk/Source/WebCore/bindings/gobject/WebKitDOMDeprecated.symbols

    r167712 r167752  
    55void webkit_dom_html_element_set_class_name(WebKitDOMHTMLElement*, const gchar*)
    66WebKitDOMDOMTokenList* webkit_dom_html_element_get_class_list(WebKitDOMHTMLElement*)
     7gchar* webkit_dom_html_input_element_get_capture(WebKitDOMHTMLInputElement*)
     8void webkit_dom_html_input_element_set_capture(WebKitDOMHTMLInputElement*, const gchar*)
    79void webkit_dom_html_form_element_dispatch_form_change(WebKitDOMHTMLFormElement*)
    810void webkit_dom_html_form_element_dispatch_form_input(WebKitDOMHTMLFormElement*)
  • trunk/Source/WebCore/bindings/gobject/webkitdom.symbols

    r167712 r167752  
    803803glong webkit_dom_html_image_element_get_width(WebKitDOMHTMLImageElement*)
    804804void webkit_dom_html_image_element_set_width(WebKitDOMHTMLImageElement*, glong)
     805gboolean webkit_dom_html_input_element_get_capture_enabled(WebKitDOMHTMLInputElement*)
     806void webkit_dom_html_input_element_set_capture_enabled(WebKitDOMHTMLInputElement*, gboolean)
    805807gboolean webkit_dom_html_image_element_get_complete(WebKitDOMHTMLImageElement*)
    806808gchar* webkit_dom_html_image_element_get_lowsrc(WebKitDOMHTMLImageElement*)
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm

    r166568 r167752  
    931931}
    932932
     933sub GetEffectiveFunctionName {
     934    my $functionName = shift;
     935
     936    # Rename webkit_dom_html_input_element_[set|get]_capture functions since they were changed to set/receive a
     937    # boolean instead of a string in r163958. The old methods are now manually added as deprecated.
     938    if ($functionName eq "webkit_dom_html_input_element_set_capture") {
     939        return "webkit_dom_html_input_element_set_capture_enabled";
     940    }
     941    if ($functionName eq "webkit_dom_html_input_element_get_capture") {
     942        return "webkit_dom_html_input_element_get_capture_enabled";
     943    }
     944
     945    return $functionName;
     946}
     947
    933948sub GenerateFunction {
    934949    my ($object, $interfaceName, $function, $prefix, $parentNode) = @_;
     
    942957    my ($deprecationVersion, $deprecationReplacement) = GetFunctionDeprecationInformation($function, $parentNode);
    943958    my $functionSigType = $prefix eq "set_" ? "void" : $function->signature->type;
    944     my $functionName = "webkit_dom_" . $decamelize . "_" . $prefix . decamelize($function->signature->name);
     959    my $functionName = GetEffectiveFunctionName("webkit_dom_" . $decamelize . "_" . $prefix . decamelize($function->signature->name));
    945960    my $returnType = GetGlibTypeName($functionSigType);
    946961    my $returnValueIsGDOMType = IsGDOMClassType($functionSigType);
Note: See TracChangeset for help on using the changeset viewer.