[GTK] TextTrack::addCue can raise an exception since r163974
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Apr 2014 08:03:00 +0000 (08:03 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Apr 2014 08:03:00 +0000 (08:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=132227

Reviewed by Martin Robinson.

webkit_dom_text_track_add_cue() now receives a GError paramater
which is an API break. Add
webkit_dom_text_track_add_cue_with_error and keep
webkit_dom_text_track_add_cue as deprecated to keep API
compatibility.

* bindings/gobject/WebKitDOMDeprecated.cpp:
(webkit_dom_text_track_add_cue):
* bindings/gobject/WebKitDOMDeprecated.h:
* bindings/gobject/WebKitDOMDeprecated.symbols:
* bindings/gobject/webkitdom.symbols:
* bindings/scripts/CodeGeneratorGObject.pm:
(GetEffectiveFunctionName):

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

Source/WebCore/ChangeLog
Source/WebCore/bindings/gobject/WebKitDOMDeprecated.cpp
Source/WebCore/bindings/gobject/WebKitDOMDeprecated.h
Source/WebCore/bindings/gobject/WebKitDOMDeprecated.symbols
Source/WebCore/bindings/gobject/webkitdom.symbols
Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm

index c956888..58efae9 100644 (file)
@@ -1,5 +1,26 @@
 2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
 
+        [GTK] TextTrack::addCue can raise an exception since r163974
+        https://bugs.webkit.org/show_bug.cgi?id=132227
+
+        Reviewed by Martin Robinson.
+
+        webkit_dom_text_track_add_cue() now receives a GError paramater
+        which is an API break. Add
+        webkit_dom_text_track_add_cue_with_error and keep
+        webkit_dom_text_track_add_cue as deprecated to keep API
+        compatibility.
+
+        * bindings/gobject/WebKitDOMDeprecated.cpp:
+        (webkit_dom_text_track_add_cue):
+        * bindings/gobject/WebKitDOMDeprecated.h:
+        * bindings/gobject/WebKitDOMDeprecated.symbols:
+        * bindings/gobject/webkitdom.symbols:
+        * bindings/scripts/CodeGeneratorGObject.pm:
+        (GetEffectiveFunctionName):
+
+2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
+
         [GTK] TextTrackCue API changed in r163649
         https://bugs.webkit.org/show_bug.cgi?id=132226
 
index bd17874..080377d 100644 (file)
@@ -29,6 +29,7 @@
 #include "WebKitDOMObject.h"
 #include "WebKitDOMPrivate.h"
 #include "WebKitDOMProcessingInstruction.h"
+#include "WebKitDOMTextTrack.h"
 #include "WebKitDOMVTTCue.h"
 #include "WebKitDOMWebKitNamedFlow.h"
 
@@ -795,3 +796,10 @@ void webkit_dom_text_track_cue_set_text(WebKitDOMTextTrackCue* self, const gchar
     g_return_if_fail(WEBKIT_DOM_IS_VTT_CUE(self));
     webkit_dom_vtt_cue_set_text(WEBKIT_DOM_VTT_CUE(self), value);
 }
+
+// WebKitDOMTextTrack
+
+void webkit_dom_text_track_add_cue(WebKitDOMTextTrack* self, WebKitDOMTextTrackCue* cue)
+{
+    return webkit_dom_text_track_add_cue_with_error(self, cue, nullptr);
+}
index 0b1c861..311f6fa 100644 (file)
@@ -1013,6 +1013,16 @@ webkit_dom_text_track_cue_get_text(WebKitDOMTextTrackCue* self);
 WEBKIT_DEPRECATED_FOR(webkit_dom_vtt_cue_set_text) void
 webkit_dom_text_track_cue_set_text(WebKitDOMTextTrackCue* self, const gchar* value);
 
+/**
+ * webkit_dom_text_track_add_cue:
+ * @self: A #WebKitDOMTextTrack
+ * @cue: A #WebKitDOMTextTrackCue
+ *
+ * Deprecated: 2.6: Use webkit_dom_text_track_add_cue_with_error() instead.
+ */
+WEBKIT_DEPRECATED_FOR(webkit_dom_text_track_add_cue_with_error) void
+webkit_dom_text_track_add_cue(WebKitDOMTextTrack* self, WebKitDOMTextTrackCue* cue);
+
 G_END_DECLS
 
 #endif /* WEBKIT_DISABLE_DEPRECATED */
index 384386e..acdf9e3 100644 (file)
@@ -82,3 +82,4 @@ gchar* webkit_dom_text_track_cue_get_align(WebKitDOMTextTrackCue*)
 void webkit_dom_text_track_cue_set_align(WebKitDOMTextTrackCue*, const gchar*, GError**)
 gchar* webkit_dom_text_track_cue_get_text(WebKitDOMTextTrackCue*)
 void webkit_dom_text_track_cue_set_text(WebKitDOMTextTrackCue*, const gchar*)
+void webkit_dom_text_track_add_cue(WebKitDOMTextTrack*, WebKitDOMTextTrackCue*)
index c11b10a..996cadf 100644 (file)
@@ -1704,6 +1704,7 @@ void webkit_dom_html_video_element_set_webkit_wireless_video_playback_disabled(W
 gulong webkit_dom_html_video_element_get_webkit_decoded_frame_count(WebKitDOMHTMLVideoElement*)
 gulong webkit_dom_html_video_element_get_webkit_dropped_frame_count(WebKitDOMHTMLVideoElement*)
 void webkit_dom_text_track_add_cue(WebKitDOMTextTrack*, WebKitDOMTextTrackCue*)
+void webkit_dom_text_track_add_cue_with_error(WebKitDOMTextTrack*, WebKitDOMTextTrackCue*, GError**)
 void webkit_dom_text_track_remove_cue(WebKitDOMTextTrack*, WebKitDOMTextTrackCue*, GError**)
 gboolean webkit_dom_text_track_dispatch_event(WebKitDOMTextTrack*, WebKitDOMEvent*, GError**)
 gchar* webkit_dom_text_track_get_id(WebKitDOMTextTrack*)
index a0d1bb2..db24b57 100644 (file)
@@ -942,6 +942,12 @@ sub GetEffectiveFunctionName {
         return "webkit_dom_html_input_element_get_capture_enabled";
     }
 
+    # webkit_dom_text_track_add_cue raises an exception since r163974. We need to add a with_error version to
+    # keep API backwards compatibility.
+    if ($functionName eq "webkit_dom_text_track_add_cue") {
+        return "webkit_dom_text_track_add_cue_with_error";
+    }
+
     return $functionName;
 }