[GTK] Limit the amount of API exposed to GObject DOM bindings API
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jun 2014 06:24:06 +0000 (06:24 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jun 2014 06:24:06 +0000 (06:24 +0000)
commitd6dae69c63f0f8772854b844772ea13c8006d406
tree3fec98410ba5e1310508f2933f64c4a155b09da4
parent4fe6619c4199b7b357ca2c68ab0de834c23cecd1
[GTK] Limit the amount of API exposed to GObject DOM bindings API
https://bugs.webkit.org/show_bug.cgi?id=133726

Reviewed by Gustavo Noronha Silva.

Source/WebCore:
Split the GObject DOM bindings API into stable and unstable. The
unstable API is not included in the main webkitdom.h file, so that
to use it users have to include the headers individually and
define a macro WEBKIT_DOM_USE_UNSTABLE_API. For unstable methods
of stable classes we generate a {ClassName}Unstable.h header file
containing the unstable API. From now on we only keep backwards
compatibility for the stable API.

* PlatformGTK.cmake: Split GObject DOM bindings related variables
into Stable and Unstable. Add also
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_media_element_set_current_time): Deleted.
(webkit_dom_text_track_get_kind): Deleted.
(webkit_dom_text_track_get_mode): Deleted.
(webkit_dom_text_track_set_mode): Deleted.
* bindings/gobject/WebKitDOMCustom.h:
* bindings/gobject/WebKitDOMCustom.symbols: Remove custom symbols
added due to API changes.
* bindings/gobject/WebKitDOMPrivate.h: Include webkitdomdefines-unstable.h.
* bindings/gobject/webkitdom.symbols: Remove all unstable symbols.
* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction): Do not skip webkit_dom_html_media_element_set_current_time anymore.
(GenerateHeader): Only force single header include for stable
headers and add WEBKIT_DOM_USE_UNSTABLE_API #ifdef to unstable headers.
(GenerateFunction): Only add stable symbols to the symbols
array. Add function prototypes to main header or unstable header
depending on whether it's an unstable symbol for a stable class or
not. Also add Stability gtk-doc tag to unstable methods.
(GenerateEndHeader): Add required #endifs
(WriteData): Write also an Unstable.h header when appropriate and
only generate a symbols file for stable classes.
(ReadStableSymbols): Read the stable symbols for the current class.
(GenerateInterface): Call ReadStableSymbols.
* bindings/scripts/gobject-generate-headers.pl: Generate webkitdomdefines-unstable.h.
* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
* bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
* bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
* bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
* bindings/scripts/test/GObject/WebKitDOMTestException.h:
* bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h:
* bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
* bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
* bindings/scripts/test/GObject/WebKitDOMTestNode.h:
* bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
* bindings/scripts/test/GObject/WebKitDOMattribute.h:
* bindings/scripts/test/GObject/WebKitDOMreadonly.h:

Tools:
Don't make fatal finding files without a .symbols file, since now
only the stable DOM API has .symbols files.

* gtk/webkitdom.py:
(get_all_webkitdom_symbol_files):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
29 files changed:
Source/WebCore/ChangeLog
Source/WebCore/PlatformGTK.cmake
Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp
Source/WebCore/bindings/gobject/WebKitDOMCustom.h
Source/WebCore/bindings/gobject/WebKitDOMCustom.symbols
Source/WebCore/bindings/gobject/WebKitDOMPrivate.h
Source/WebCore/bindings/gobject/webkitdom.symbols
Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm
Source/WebCore/bindings/scripts/gobject-generate-headers.pl
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestException.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNode.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMattribute.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMreadonly.h
Tools/ChangeLog
Tools/gtk/webkitdom.py