Title: [176920] trunk/Source/WebCore
Revision
176920
Author
[email protected]
Date
2014-12-07 05:40:56 -0800 (Sun, 07 Dec 2014)

Log Message

[GTK] Add Since tags to GObject DOM bindings documentation
https://bugs.webkit.org/show_bug.cgi?id=139356

Reviewed by Gustavo Noronha Silva.

Now that we have a small stable API, and new symbols are added
manually, we can also add the version to the symbols file, that
the code generator can ue to add Since tags to the gtk-doc.

* bindings/gobject/webkitdom.symbols: Add @2.8 to the new symbols
added for 2.8.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateConstants): Add Since tag to gtk-doc if there's a version
number for the symbol in the .symbols file.
(GenerateFunction): Ditto.
(ReadStableSymbols):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (176919 => 176920)


--- trunk/Source/WebCore/ChangeLog	2014-12-07 10:02:52 UTC (rev 176919)
+++ trunk/Source/WebCore/ChangeLog	2014-12-07 13:40:56 UTC (rev 176920)
@@ -1,5 +1,24 @@
 2014-12-07  Carlos Garcia Campos  <[email protected]>
 
+        [GTK] Add Since tags to GObject DOM bindings documentation
+        https://bugs.webkit.org/show_bug.cgi?id=139356
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Now that we have a small stable API, and new symbols are added
+        manually, we can also add the version to the symbols file, that
+        the code generator can ue to add Since tags to the gtk-doc.
+
+        * bindings/gobject/webkitdom.symbols: Add @2.8 to the new symbols
+        added for 2.8.
+        * bindings/scripts/CodeGeneratorGObject.pm:
+        (GenerateConstants): Add Since tag to gtk-doc if there's a version
+        number for the symbol in the .symbols file.
+        (GenerateFunction): Ditto.
+        (ReadStableSymbols):
+
+2014-12-07  Carlos Garcia Campos  <[email protected]>
+
         [GTK] Missing API detected in GObject DOM bindings after r176630
         https://bugs.webkit.org/show_bug.cgi?id=139201
 

Modified: trunk/Source/WebCore/bindings/gobject/webkitdom.symbols (176919 => 176920)


--- trunk/Source/WebCore/bindings/gobject/webkitdom.symbols	2014-12-07 10:02:52 UTC (rev 176919)
+++ trunk/Source/WebCore/bindings/gobject/webkitdom.symbols	2014-12-07 13:40:56 UTC (rev 176920)
@@ -22,7 +22,7 @@
 WebKitDOMCSSStyleSheet* webkit_dom_dom_implementation_create_css_style_sheet(WebKitDOMDOMImplementation*, const gchar*, const gchar*, GError**)
 WebKitDOMHTMLDocument* webkit_dom_dom_implementation_create_html_document(WebKitDOMDOMImplementation*, const gchar*)
 GType webkit_dom_dom_window_get_type(void)
-gboolean webkit_dom_dom_window_webkit_message_handlers_post_message(WebKitDOMDOMWindow*, const gchar*, const gchar*)
+gboolean webkit_dom_dom_window_webkit_message_handlers_post_message(WebKitDOMDOMWindow*, const gchar*, const gchar*)@2.8
 GType webkit_dom_document_get_type(void)
 WebKitDOMDocumentType* webkit_dom_document_get_doctype(WebKitDOMDocument*)
 WebKitDOMHTMLCollection* webkit_dom_document_get_images(WebKitDOMDocument*)
@@ -112,10 +112,10 @@
 WebKitDOMCSSStyleDeclaration* webkit_dom_element_get_style(WebKitDOMElement*)
 gchar* webkit_dom_element_get_class_name(WebKitDOMElement*)
 void webkit_dom_element_set_class_name(WebKitDOMElement*, const gchar*)
-void webkit_dom_element_set_inner_html(WebKitDOMElement*, const gchar*, GError**)
-gchar* webkit_dom_element_get_inner_html(WebKitDOMElement*)
-void webkit_dom_element_set_outer_html(WebKitDOMElement*, const gchar*, GError**)
-gchar* webkit_dom_element_get_outer_html(WebKitDOMElement*)
+void webkit_dom_element_set_inner_html(WebKitDOMElement*, const gchar*, GError**)@2.8
+gchar* webkit_dom_element_get_inner_html(WebKitDOMElement*)@2.8
+void webkit_dom_element_set_outer_html(WebKitDOMElement*, const gchar*, GError**)@2.8
+gchar* webkit_dom_element_get_outer_html(WebKitDOMElement*)@2.8
 gchar* webkit_dom_element_get_tag_name(WebKitDOMElement*)
 WebKitDOMElement* webkit_dom_element_get_offset_parent(WebKitDOMElement*)
 glong webkit_dom_element_get_scroll_left(WebKitDOMElement*)

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (176919 => 176920)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm	2014-12-07 10:02:52 UTC (rev 176919)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm	2014-12-07 13:40:56 UTC (rev 176920)
@@ -760,8 +760,10 @@
             my $conditionalString = $codeGenerator->GenerateConditionalString($constant);
             my $constantName = $prefix . $constant->name;
             my $constantValue = $constant->value;
-            my $isStableSymbol = grep {$_ eq $constantName} @stableSymbols;
-            if ($isStableSymbol) {
+            my $stableSymbol = grep {$_ =~ /^\Q$constantName/} @stableSymbols;
+            my $stableSymbolVersion;
+            if ($stableSymbol) {
+                ($dummy, $stableSymbolVersion) = split('@', $stableSymbol, 2);
                 push(@symbols, "$constantName\n");
             }
 
@@ -769,12 +771,15 @@
             push(@constantHeader, "#if ${conditionalString}") if $conditionalString;
             push(@constantHeader, "/**");
             push(@constantHeader, " * ${constantName}:");
+            if ($stableSymbolVersion) {
+                push(@constantHeader, " * Since: ${stableSymbolVersion}");
+            }
             push(@constantHeader, " */");
             push(@constantHeader, "#define $constantName $constantValue");
             push(@constantHeader, "#endif /* ${conditionalString} */") if $conditionalString;
             push(@constantHeader, "\n");
 
-            if ($isStableSymbol or !$isStableClass) {
+            if ($stableSymbol or !$isStableClass) {
                 push(@hBody, join("\n", @constantHeader));
             } else {
                 push(@hBodyUnstable, join("\n", @constantHeader));
@@ -1006,8 +1011,10 @@
 
     my $symbol = "$returnType $functionName($symbolSig)";
     my $isStableClass = scalar(@stableSymbols);
-    my $isStableSymbol = grep {$_ eq $symbol} @stableSymbols;
-    if ($isStableSymbol and $isStableClass) {
+    my ($stableSymbol) = grep {$_ =~ /^\Q$symbol/} @stableSymbols;
+    my $stableSymbolVersion;
+    if ($stableSymbol and $isStableClass) {
+        ($dummy, $stableSymbolVersion) = split('@', $stableSymbol, 2);
         push(@symbols, "$symbol\n");
     }
 
@@ -1043,17 +1050,22 @@
         push(@functionHeader, " * Returns: A #${returnTypeName}");
         $hasReturnTag = 1;
     }
-    if (!$isStableSymbol) {
+    if (!$stableSymbol) {
         if ($hasReturnTag) {
             push(@functionHeader, " *");
         }
         push(@functionHeader, " * Stability: Unstable");
+    } elsif ($stableSymbolVersion) {
+        if ($hasReturnTag) {
+            push(@functionHeader, " *");
+        }
+        push(@functionHeader, " * Since: ${stableSymbolVersion}");
     }
     push(@functionHeader, "**/");
 
     push(@functionHeader, "WEBKIT_API $returnType\n$functionName($functionSig);");
     push(@functionHeader, "\n");
-    if ($isStableSymbol or !$isStableClass) {
+    if ($stableSymbol or !$isStableClass) {
         push(@hBody, join("\n", @functionHeader));
     } else {
         push(@hBodyUnstable, join("\n", @functionHeader));
@@ -1783,17 +1795,19 @@
     foreach $line (@lines) {
         $line =~ s/\n$//;
 
-        if ($line eq "GType ${lowerCaseIfaceName}_get_type(void)") {
+        my ($symbol) = split('@', $line, 2);
+
+        if ($symbol eq "GType ${lowerCaseIfaceName}_get_type(void)") {
             push(@stableSymbols, $line);
             next;
         }
 
-        if (scalar(@stableSymbols) and IsInterfaceSymbol($line, $lowerCaseIfaceName) and $line !~ /^GType/) {
+        if (scalar(@stableSymbols) and IsInterfaceSymbol($symbol, $lowerCaseIfaceName) and $symbol !~ /^GType/) {
             push(@stableSymbols, $line);
             next;
         }
 
-        if (scalar(@stableSymbols) and $line !~ /^GType/) {
+        if (scalar(@stableSymbols) and $symbol !~ /^GType/) {
             warn "Symbol %line found, but a get_type was expected";
         }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to