Bug 43054 - WebBackForwardList.get_{back|forward}_list_with_limit not introspectable
Summary: WebBackForwardList.get_{back|forward}_list_with_limit not introspectable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Gustavo Noronha (kov)
URL: https://bugzilla.gnome.org/show_bug.c...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-27 09:46 PDT by Lucian
Modified: 2010-08-17 13:01 PDT (History)
4 users (show)

See Also:


Attachments
proposed patch (22.31 KB, patch)
2010-08-13 12:29 PDT, Gustavo Noronha (kov)
no flags Details | Formatted Diff | Diff
proposed patch (10.71 KB, patch)
2010-08-17 12:30 PDT, Gustavo Noronha (kov)
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lucian 2010-07-27 09:46:17 PDT
Those methods are marked with introspectable="0" by the scanner, which means that there are missing annotations from the gtk-doc of those functions.

At the very least, we need (transfer) and (element-type) annotations. (element-type) should be WebHistoryItem, but I'm not sure about (transfer).

introspection gtk-doc info: http://live.gnome.org/GObjectIntrospection/Annotations
pygobject bug :https://bugzilla.gnome.org/show_bug.cgi?id=625096
Comment 1 Gustavo Noronha (kov) 2010-08-13 12:29:55 PDT
Created attachment 64364 [details]
proposed patch

This should fix the problem, including the crash lucian told me about when getting the WebBackForwardList from the view more than once (GI thought the ownership was being transferred, but it was not). You'll notice the patch moves all of the docstrings to the header file, and here's why:

The g-ir-scanner is currently unable to parse .cpp files. That is why we only feed it .h files in our build system, I imagine. That means any annotation added to the .cpp file docstrings are going to be ignored. The first thing that came to my mind, that would not be too disruptive is to add a smaller docstring in the header file that would only have the information required by the introspection. I tried that, but it breaks our documentation generation horribly. gtk-doc prefers the docstring it finds in the header, and ignores the one in the .cpp file. If I tell gtk-doc to ignore the header file it generates a rather empty page that only lists the example \o/

So I believe our only way out here, other than fixing the g-ir-scanner to read the .cpp files, is to move all doc strings to .h files. If we have a consensus around this, I will do follow-up patches moving the docstrings for each object, and trying to add the required GI annotation to all of them in the process. Comments?
Comment 2 Gustavo Noronha (kov) 2010-08-17 12:19:14 PDT
Comment on attachment 64364 [details]
proposed patch

Another patch coming, adapted to the new reality of g-ir-scanner tolerating .cpp files.
Comment 3 Gustavo Noronha (kov) 2010-08-17 12:30:55 PDT
Created attachment 64617 [details]
proposed patch

This patch is adapted to the new reality of g-ir-scanner accepting .cpp files, and much more ortodox, because of that ;D
Comment 4 Martin Robinson 2010-08-17 12:54:11 PDT
Comment on attachment 64617 [details]
proposed patch

LGTM!
Comment 5 Gustavo Noronha (kov) 2010-08-17 13:01:40 PDT
Landed as r65532.