Commit 8ff043c3 authored by carlosgc@webkit.org's avatar carlosgc@webkit.org

REGRESSION(r158821): [GTK] API break due to removed properties in GObject DOM bindings

https://bugs.webkit.org/show_bug.cgi?id=124489

Reviewed by Philippe Normand.

In r158821, several properties were changed from readonly to
CustomSetter. The GObject DOM bindings currently skips any
attribute having a custom getter or setter, and those properties
are not generated anymore. We should add support for generating
attributes having a custom getter or setter in GObject DOM
bindings generator, but to fix the ABI break now we bring the old
implementatiom back as custom implementation. This fixes the ABI
compatibility, but not the API since the GObject properties are
not generated.

* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_audio_track_get_kind):
(webkit_dom_audio_track_get_language):
(webkit_dom_text_track_get_kind):
(webkit_dom_text_track_get_language):
(webkit_dom_video_track_get_kind):
(webkit_dom_video_track_get_language):
* bindings/gobject/WebKitDOMCustom.h:
* bindings/gobject/WebKitDOMCustom.symbols:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4442837c
2013-11-18 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r158821): [GTK] API break due to removed properties in GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=124489
Reviewed by Philippe Normand.
In r158821, several properties were changed from readonly to
CustomSetter. The GObject DOM bindings currently skips any
attribute having a custom getter or setter, and those properties
are not generated anymore. We should add support for generating
attributes having a custom getter or setter in GObject DOM
bindings generator, but to fix the ABI break now we bring the old
implementatiom back as custom implementation. This fixes the ABI
compatibility, but not the API since the GObject properties are
not generated.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_audio_track_get_kind):
(webkit_dom_audio_track_get_language):
(webkit_dom_text_track_get_kind):
(webkit_dom_text_track_get_language):
(webkit_dom_video_track_get_kind):
(webkit_dom_video_track_get_language):
* bindings/gobject/WebKitDOMCustom.h:
* bindings/gobject/WebKitDOMCustom.symbols:
2013-11-18 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update GObject DOM symbols file after r158662.
......
......@@ -20,6 +20,7 @@
#include "WebKitDOMCustom.h"
#include "JSMainThreadExecState.h"
#include "WebKitDOMAudioTrackPrivate.h"
#include "WebKitDOMBlob.h"
#include "WebKitDOMDOMStringList.h"
#include "WebKitDOMHTMLCollection.h"
......@@ -34,7 +35,10 @@
#include "WebKitDOMObject.h"
#include "WebKitDOMPrivate.h"
#include "WebKitDOMProcessingInstruction.h"
#include "WebKitDOMTextTrackPrivate.h"
#include "WebKitDOMVideoTrackPrivate.h"
#include "WebKitDOMWebKitNamedFlow.h"
#include "gobject/ConvertToUTF8String.h"
using namespace WebKit;
......@@ -64,6 +68,90 @@ void webkit_dom_html_media_element_set_current_time(WebKitDOMHTMLMediaElement* s
#endif /* ENABLE(VIDEO) */
}
gchar* webkit_dom_audio_track_get_kind(WebKitDOMAudioTrack* self)
{
#if ENABLE(VIDEO_TRACK)
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_AUDIO_TRACK(self), 0);
WebCore::AudioTrack* item = WebKit::core(self);
gchar* result = convertToUTF8String(item->kind());
return result;
#else
WEBKIT_WARN_FEATURE_NOT_PRESENT("Video Track")
return 0;
#endif /* ENABLE(VIDEO_TRACK) */
}
gchar* webkit_dom_audio_track_get_language(WebKitDOMAudioTrack* self)
{
#if ENABLE(VIDEO_TRACK)
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_AUDIO_TRACK(self), 0);
WebCore::AudioTrack* item = WebKit::core(self);
gchar* result = convertToUTF8String(item->language());
return result;
#else
WEBKIT_WARN_FEATURE_NOT_PRESENT("Video Track")
return 0;
#endif /* ENABLE(VIDEO_TRACK) */
}
gchar* webkit_dom_text_track_get_kind(WebKitDOMTextTrack* self)
{
#if ENABLE(VIDEO_TRACK)
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_TEXT_TRACK(self), 0);
WebCore::TextTrack* item = WebKit::core(self);
gchar* result = convertToUTF8String(item->kind());
return result;
#else
WEBKIT_WARN_FEATURE_NOT_PRESENT("Video Track")
return 0;
#endif /* ENABLE(VIDEO_TRACK) */
}
gchar* webkit_dom_text_track_get_language(WebKitDOMTextTrack* self)
{
#if ENABLE(VIDEO_TRACK)
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_TEXT_TRACK(self), 0);
WebCore::TextTrack* item = WebKit::core(self);
gchar* result = convertToUTF8String(item->language());
return result;
#else
WEBKIT_WARN_FEATURE_NOT_PRESENT("Video Track")
return 0;
#endif /* ENABLE(VIDEO_TRACK) */
}
gchar* webkit_dom_video_track_get_kind(WebKitDOMVideoTrack* self)
{
#if ENABLE(VIDEO_TRACK)
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_VIDEO_TRACK(self), 0);
WebCore::VideoTrack* item = WebKit::core(self);
gchar* result = convertToUTF8String(item->kind());
return result;
#else
WEBKIT_WARN_FEATURE_NOT_PRESENT("Video Track")
return 0;
#endif /* ENABLE(VIDEO_TRACK) */
}
gchar* webkit_dom_video_track_get_language(WebKitDOMVideoTrack* self)
{
#if ENABLE(VIDEO_TRACK)
WebCore::JSMainThreadNullState state;
g_return_val_if_fail(WEBKIT_DOM_IS_VIDEO_TRACK(self), 0);
WebCore::VideoTrack* item = WebKit::core(self);
gchar* result = convertToUTF8String(item->language());
return result;
#else
WEBKIT_WARN_FEATURE_NOT_PRESENT("Video Track")
return 0;
#endif /* ENABLE(VIDEO_TRACK) */
}
/* Compatibility */
WebKitDOMBlob* webkit_dom_blob_webkit_slice(WebKitDOMBlob* self, gint64 start, gint64 end, const gchar* content_type)
{
......
......@@ -50,6 +50,54 @@ WEBKIT_API void webkit_dom_html_media_element_set_current_time(WebKitDOMHTMLMedi
*/
WEBKIT_API gboolean webkit_dom_html_input_element_is_edited(WebKitDOMHTMLInputElement* input);
/**
* webkit_dom_audio_track_get_kind:
* @self: A #WebKitDOMAudioTrack
*
* Returns: A #gchar
*/
WEBKIT_API gchar* webkit_dom_audio_track_get_kind(WebKitDOMAudioTrack* self);
/**
* webkit_dom_audio_track_get_language:
* @self: A #WebKitDOMAudioTrack
*
* Returns: A #gchar
*/
WEBKIT_API gchar* webkit_dom_audio_track_get_language(WebKitDOMAudioTrack* self);
/**
* webkit_dom_text_track_get_kind:
* @self: A #WebKitDOMTextTrack
*
* Returns: A #gchar
*/
WEBKIT_API gchar* webkit_dom_text_track_get_kind(WebKitDOMTextTrack* self);
/**
* webkit_dom_text_track_get_language:
* @self: A #WebKitDOMTextTrack
*
* Returns: A #gchar
*/
WEBKIT_API gchar* webkit_dom_text_track_get_language(WebKitDOMTextTrack* self);
/**
* webkit_dom_video_track_get_kind:
* @self: A #WebKitDOMVideoTrack
*
* Returns: A #gchar
*/
WEBKIT_API gchar* webkit_dom_video_track_get_kind(WebKitDOMVideoTrack* self);
/**
* webkit_dom_video_track_get_language:
* @self: A #WebKitDOMVideoTrack
*
* Returns: A #gchar
*/
WEBKIT_API gchar* webkit_dom_video_track_get_language(WebKitDOMVideoTrack* self);
/**
* webkit_dom_blob_webkit_slice:
* @self: A #WebKitDOMBlob
......
gboolean webkit_dom_html_text_area_element_is_edited(WebKitDOMHTMLTextAreaElement*)
gboolean webkit_dom_html_input_element_is_edited(WebKitDOMHTMLInputElement*)
void webkit_dom_html_media_element_set_current_time(WebKitDOMHTMLMediaElement*, gdouble, GError**)
gchar* webkit_dom_audio_track_get_kind(WebKitDOMAudioTrack*)
gchar* webkit_dom_audio_track_get_language(WebKitDOMAudioTrack*)
gchar* webkit_dom_text_track_get_kind(WebKitDOMTextTrack*)
gchar* webkit_dom_text_track_get_language(WebKitDOMTextTrack*)
gchar* webkit_dom_video_track_get_kind(WebKitDOMVideoTrack*)
gchar* webkit_dom_video_track_get_language(WebKitDOMVideoTrack*)
WebKitDOMBlob* webkit_dom_blob_webkit_slice(WebKitDOMBlob*, gint64, gint64, const gchar*)
gchar* webkit_dom_html_element_get_class_name(WebKitDOMHTMLElement*)
void webkit_dom_html_element_set_class_name(WebKitDOMHTMLElement*, const gchar*)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment