Bug 123448 - [GTK] DOM bindings documentation errors
Summary: [GTK] DOM bindings documentation errors
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-29 09:17 PDT by Philippe Normand
Modified: 2013-10-29 10:51 PDT (History)
6 users (show)

See Also:


Attachments
Patch (39.98 KB, patch)
2013-10-29 09:22 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (40.14 KB, patch)
2013-10-29 10:27 PDT, Philippe Normand
cgarcia: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2013-10-29 09:17:53 PDT
I have a patch for those issues, excepted the gtkdoc-scan WEBKIT_DEPRECATED_FOR warnings.
Comment 1 Philippe Normand 2013-10-29 09:22:56 PDT
Created attachment 215392 [details]
Patch
Comment 2 Carlos Garcia Campos 2013-10-29 09:28:00 PDT
Comment on attachment 215392 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=215392&action=review

> Source/WebCore/bindings/gobject/WebKitDOMCustom.h:467
> + * Returns: A double

why not a #gdouble?

> Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:979
> +    if (IsGDOMClassType($function->signature->type) && ($returnType ne "void")) {

can IsGDOMClassType return true for void? In that case I guess we should fix IsGDOMClassType instead.

> Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:982
> +        push(@hBody, " * Returns: A $returnType\n");

I think you should check if the type is a glib one to use # so that a link is generated. Also in case of pointers we should remove the *
Comment 3 Philippe Normand 2013-10-29 09:52:39 PDT
(In reply to comment #2)
> (From update of attachment 215392 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=215392&action=review
> 
> > Source/WebCore/bindings/gobject/WebKitDOMCustom.h:467
> > + * Returns: A double
> 
> why not a #gdouble?
> 

Because I missed it :)

> > Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:979
> > +    if (IsGDOMClassType($function->signature->type) && ($returnType ne "void")) {
> 
> can IsGDOMClassType return true for void? 

No.

> In that case I guess we should fix IsGDOMClassType instead.
> 

Thing is IsGDOMClassType doesn't check $returnType. I changed this code only to make sure we don't have a Return tag for void functions. TBH I don't really want to debug this spaghetti code much more :)

> > Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:982
> > +        push(@hBody, " * Returns: A $returnType\n");
> 
> I think you should check if the type is a glib one to use # so that a link is generated. Also in case of pointers we should remove the *

Ok I'll see if I can improve that...
Comment 4 Carlos Garcia Campos 2013-10-29 10:03:16 PDT
Comment on attachment 215392 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=215392&action=review

>>> Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:979
>>> +    if (IsGDOMClassType($function->signature->type) && ($returnType ne "void")) {
>> 
>> can IsGDOMClassType return true for void? In that case I guess we should fix IsGDOMClassType instead.
> 
> No.

There's $returnValueIsGDOMType already, maybe we can use that instead of calling IsGDOMClassType again
Comment 5 Philippe Normand 2013-10-29 10:27:57 PDT
Created attachment 215396 [details]
Patch
Comment 6 Carlos Garcia Campos 2013-10-29 10:33:09 PDT
Comment on attachment 215396 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=215396&action=review

Looks great, thanks. Please add also the description for return tags having a g-i annotation too.

> Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:980
>          push(@hBody, " * Returns: (transfer none):\n");

Sorry I missed this one before, but this would be empty too, it doesn't give a warning because of the g-i annotation, but it should also have a description.
Comment 7 Philippe Normand 2013-10-29 10:51:41 PDT
Committed r158200: <http://trac.webkit.org/changeset/158200>