[Webkit-unassigned] [Bug 45395] New: GObject Introspection enhancements
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 8 09:25:04 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=45395
Summary: GObject Introspection enhancements
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: Linux
Status: UNCONFIRMED
Severity: Enhancement
Priority: P2
Component: WebKit Gtk
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: gabomdq at gmail.com
Created an attachment (id=66904)
--> (https://bugs.webkit.org/attachment.cgi?id=66904)
gobject introspection enhancements
This is a patch for the GObject bindings script so it generates gobject introspection annotations the g-ir-scanner tool properly understand. There also a bunch of fixes for the existing annotations to make them comply with the recent changes in gobject-introspection trunk.
There's a workaround added for some functions names in the CodeGeneratorGObject.pm script, that's in my opinion the simplest of several possible fixes to a naming convention problem between what this script generates and what the scanner expects.
The problem arises in functions belonging to classes like WebKitDOMTHMLElement, where the scanner logic that matches methods to classes expects the method to be called webkit_domhtml_element_something while we output them as webkit_dom_html_element_something. The workaround I implemented is to output the function as webkit_domhtml_element_something where appropriate and set up a #define for each of these functions as to preserve compatibility with the rest of the codebase.
With this patch installed, after the build is done I rerun the following command under a jhbuild shell to check what's up with the scanner...
g-ir-scanner --warn-all --symbol-prefix=webkit -v --namespace WebKit --nsversion=3.0 \
--include=GObject-2.0 \
--include=Gtk-3.0 \
--include=JSCore-3.0 \
--include=Soup-2.4 \
--library=webkitgtk-3.0 \
--libtool="./doltlibtool" \
--pkg gobject-2.0 \
--pkg gtk+-3.0 \
--pkg libsoup-2.4 \
--output WebKit-3.0.gir \
--add-include-path ./WebKit/gtk \
--add-include-path . \
-I./WebKit/gtk \
-I./WebKit/gtk \
-I./DerivedSources \
-I./DerivedSources/webkit \
-I./JavaScriptCore/ForwardingHeaders \
-I./JavaScriptCore/API \
-I. \
WebKit/gtk/webkit/webkitversion.h DerivedSources/webkit/WebKitDOMCSSRule.h DerivedSources/webkit/WebKitDOMCSSRuleList.h DerivedSources/webkit/WebKitDOMCSSStyleDeclaration.h DerivedSources/webkit/WebKitDOMCSSStyleSheet.h DerivedSources/webkit/WebKitDOMCSSValue.h DerivedSources/webkit/WebKitDOMMediaList.h DerivedSources/webkit/WebKitDOMStyleMedia.h DerivedSources/webkit/WebKitDOMStyleSheet.h DerivedSources/webkit/WebKitDOMStyleSheetList.h DerivedSources/webkit/WebKitDOMAttr.h DerivedSources/webkit/WebKitDOMCDATASection.h DerivedSources/webkit/WebKitDOMCharacterData.h DerivedSources/webkit/WebKitDOMComment.h DerivedSources/webkit/WebKitDOMDocument.h DerivedSources/webkit/WebKitDOMDocumentFragment.h DerivedSources/webkit/WebKitDOMDocumentType.h DerivedSources/webkit/WebKitDOMDOMImplementation.h DerivedSources/webkit/WebKitDOMDOMStringList.h DerivedSources/webkit/WebKitDOMDOMStringMap.h DerivedSources/webkit/WebKitDOMElement.h DerivedSources/webkit/WebKitDOMEntityRefe
rence.h DerivedSources/webkit/WebKitDOMEvent.h DerivedSources/webkit/WebKitDOMMessagePort.h DerivedSources/webkit/WebKitDOMMouseEvent.h DerivedSources/webkit/WebKitDOMNamedNodeMap.h DerivedSources/webkit/WebKitDOMNode.h DerivedSources/webkit/WebKitDOMNodeFilter.h DerivedSources/webkit/WebKitDOMNodeIterator.h DerivedSources/webkit/WebKitDOMNodeList.h DerivedSources/webkit/WebKitDOMProcessingInstruction.h DerivedSources/webkit/WebKitDOMRange.h DerivedSources/webkit/WebKitDOMText.h DerivedSources/webkit/WebKitDOMTreeWalker.h DerivedSources/webkit/WebKitDOMUIEvent.h DerivedSources/webkit/WebKitDOMBlob.h DerivedSources/webkit/WebKitDOMFile.h DerivedSources/webkit/WebKitDOMFileList.h DerivedSources/webkit/WebKitDOMHTMLAnchorElement.h DerivedSources/webkit/WebKitDOMHTMLAppletElement.h DerivedSources/webkit/WebKitDOMHTMLAreaElement.h DerivedSources/webkit/WebKitDOMHTMLBaseElement.h DerivedSources/webkit/WebKitDOMHTMLBaseFontElement.h DerivedSources/webkit/WebKitDOMHTMLBlockquoteElem
ent.h DerivedSources/webkit/WebKitDOMHTMLBodyElement.h DerivedSources/webkit/WebKitDOMHTMLBRElement.h DerivedSources/webkit/WebKitDOMHTMLButtonElement.h DerivedSources/webkit/WebKitDOMHTMLCanvasElement.h DerivedSources/webkit/WebKitDOMHTMLCollection.h DerivedSources/webkit/WebKitDOMHTMLDirectoryElement.h DerivedSources/webkit/WebKitDOMHTMLDivElement.h DerivedSources/webkit/WebKitDOMHTMLDListElement.h DerivedSources/webkit/WebKitDOMHTMLDocument.h DerivedSources/webkit/WebKitDOMHTMLElement.h DerivedSources/webkit/WebKitDOMHTMLEmbedElement.h DerivedSources/webkit/WebKitDOMHTMLFieldSetElement.h DerivedSources/webkit/WebKitDOMHTMLFontElement.h DerivedSources/webkit/WebKitDOMHTMLFormElement.h DerivedSources/webkit/WebKitDOMHTMLFrameElement.h DerivedSources/webkit/WebKitDOMHTMLFrameSetElement.h DerivedSources/webkit/WebKitDOMHTMLHeadElement.h DerivedSources/webkit/WebKitDOMHTMLHeadingElement.h DerivedSources/webkit/WebKitDOMHTMLHRElement.h DerivedSources/webkit/WebKitDOMHTMLHtmlEle
ment.h DerivedSources/webkit/WebKitDOMHTMLIFrameElement.h DerivedSources/webkit/WebKitDOMHTMLImageElement.h DerivedSources/webkit/WebKitDOMHTMLInputElement.h DerivedSources/webkit/WebKitDOMHTMLIsIndexElement.h DerivedSources/webkit/WebKitDOMHTMLLabelElement.h DerivedSources/webkit/WebKitDOMHTMLLegendElement.h DerivedSources/webkit/WebKitDOMHTMLLIElement.h DerivedSources/webkit/WebKitDOMHTMLLinkElement.h DerivedSources/webkit/WebKitDOMHTMLMapElement.h DerivedSources/webkit/WebKitDOMHTMLMarqueeElement.h DerivedSources/webkit/WebKitDOMHTMLMediaElement.h DerivedSources/webkit/WebKitDOMHTMLMenuElement.h DerivedSources/webkit/WebKitDOMHTMLMetaElement.h DerivedSources/webkit/WebKitDOMHTMLModElement.h DerivedSources/webkit/WebKitDOMHTMLObjectElement.h DerivedSources/webkit/WebKitDOMHTMLOListElement.h DerivedSources/webkit/WebKitDOMHTMLOptGroupElement.h DerivedSources/webkit/WebKitDOMHTMLOptionElement.h DerivedSources/webkit/WebKitDOMHTMLOptionsCollection.h DerivedSources/webkit/WebK
itDOMHTMLParagraphElement.h DerivedSources/webkit/WebKitDOMHTMLParamElement.h DerivedSources/webkit/WebKitDOMHTMLPreElement.h DerivedSources/webkit/WebKitDOMHTMLQuoteElement.h DerivedSources/webkit/WebKitDOMHTMLScriptElement.h DerivedSources/webkit/WebKitDOMHTMLSelectElement.h DerivedSources/webkit/WebKitDOMHTMLStyleElement.h DerivedSources/webkit/WebKitDOMHTMLTableElement.h DerivedSources/webkit/WebKitDOMHTMLTableCaptionElement.h DerivedSources/webkit/WebKitDOMHTMLTableColElement.h DerivedSources/webkit/WebKitDOMHTMLTableSectionElement.h DerivedSources/webkit/WebKitDOMHTMLTableCellElement.h DerivedSources/webkit/WebKitDOMHTMLTextAreaElement.h DerivedSources/webkit/WebKitDOMHTMLTitleElement.h DerivedSources/webkit/WebKitDOMHTMLTableRowElement.h DerivedSources/webkit/WebKitDOMHTMLUListElement.h DerivedSources/webkit/WebKitDOMMediaError.h DerivedSources/webkit/WebKitDOMTimeRanges.h DerivedSources/webkit/WebKitDOMValidityState.h DerivedSources/webkit/WebKitDOMDOMApplicationCach
e.h DerivedSources/webkit/WebKitDOMBarInfo.h DerivedSources/webkit/WebKitDOMConsole.h DerivedSources/webkit/WebKitDOMDOMWindow.h DerivedSources/webkit/WebKitDOMDOMSelection.h DerivedSources/webkit/WebKitDOMEventTarget.h DerivedSources/webkit/WebKitDOMHistory.h DerivedSources/webkit/WebKitDOMLocation.h DerivedSources/webkit/WebKitDOMMemoryInfo.h DerivedSources/webkit/WebKitDOMObject.h DerivedSources/webkit/WebKitDOMNavigator.h DerivedSources/webkit/WebKitDOMScreen.h DerivedSources/webkit/WebKitDOMWebKitPoint.h DerivedSources/webkit/WebKitDOMDOMMimeType.h DerivedSources/webkit/WebKitDOMDOMMimeTypeArray.h DerivedSources/webkit/WebKitDOMDOMPlugin.h DerivedSources/webkit/WebKitDOMDOMPluginArray.h DerivedSources/webkit/WebKitDOMDatabase.h DerivedSources/webkit/WebKitDOMStorage.h DerivedSources/webkit/WebKitDOMXPathExpression.h DerivedSources/webkit/WebKitDOMXPathNSResolver.h DerivedSources/webkit/WebKitDOMXPathResult.h DerivedSources/webkit/webkitdom.h DerivedSources/webkit/webkit
domdefines.h ./DerivedSources/webkit/WebKitDOMHTMLAudioElement.h ./WebKit/gtk/webkit/webkit.h ./WebKit/gtk/webkit/webkitdefines.h ./WebKit/gtk/webkit/webkitdownload.h ./WebKit/gtk/webkit/webkiterror.h ./WebKit/gtk/webkit/webkithittestresult.h ./WebKit/gtk/webkit/webkitnetworkrequest.h ./WebKit/gtk/webkit/webkitnetworkresponse.h ./WebKit/gtk/webkit/webkitsoupauthdialog.h ./WebKit/gtk/webkit/webkitwebbackforwardlist.h ./WebKit/gtk/webkit/webkitwebdatasource.h ./WebKit/gtk/webkit/webkitwebframe.h ./WebKit/gtk/webkit/webkitwebhistoryitem.h ./WebKit/gtk/webkit/webkitwebinspector.h ./WebKit/gtk/webkit/webkitwebnavigationaction.h ./WebKit/gtk/webkit/webkitwebpolicydecision.h ./WebKit/gtk/webkit/webkitgeolocationpolicydecision.h ./WebKit/gtk/webkit/webkitwebresource.h ./WebKit/gtk/webkit/webkitwebsettings.h ./WebKit/gtk/webkit/webkitwebwindowfeatures.h ./WebKit/gtk/webkit/webkitwebview.h ./WebKit/gtk/webkit/webkitwebdatabase.h ./WebKit/gtk/webkit/webkitsecurityorigin.h \
./WebKit/gtk/webkit/*.cpp
The output I get is:
WebKit/gtk/webkit/webkitwebview.h:402: Warning: WebKit: Unknown container Type(target_giname=WebKit.DOMDocument, ctype=WebKitDOMDocument*) for element-type annotation
WebKit/gtk/webkit/webkiterror.h:61: Warning: WebKit: webkit_network_error_quark: Couldn't find corresponding enumeration
WebKit/gtk/webkit/webkiterror.h:64: Warning: WebKit: webkit_policy_error_quark: Couldn't find corresponding enumeration
WebKit/gtk/webkit/webkiterror.h:67: Warning: WebKit: webkit_plugin_error_quark: Couldn't find corresponding enumeration
<unknown>:: Warning: WebKit: (GLibSignal)current-toplevel: return value: Missing (transfer) annotation
WebKit/gtk/webkit/webkitwebframe.h:146: Warning: WebKit: webkit_web_frame_get_global_context: return value: Unresolved type: 'JSGlobalContextRef'
<unknown>:: Warning: WebKit: (GLibSignal)inspect-web-view: return value: Missing (transfer) annotation
<unknown>:: Warning: WebKit: (GLibSignal)navigation-requested: return value: Unresolved type: 'WebKitNavigationResponse'
<unknown>:: Warning: WebKit: (Callback)current_toplevel: return value: Missing (transfer) annotation
<unknown>:: Warning: WebKit: (Callback)create_web_view: return value: Missing (transfer) annotation
<unknown>:: Warning: WebKit: (Callback)window_object_cleared: argument context: Unresolved type: 'JSGlobalContextRef'
<unknown>:: Warning: WebKit: (Callback)window_object_cleared: argument window_object: Unresolved type: 'JSObjectRef'
Also, verifying the WebKit gir file also helps to check everything is in working order.
So, the most important pending item is fixing the JS unresolved types, I tried playing with JSCore.gir but didnt get any positive results. Also, i'm not sure if the default transfer mode should be none, it seemed the safest bet.
I tested this with a Python test app that uses pygobject, that you can check in my blog http://mdqinc.com/blog, and everything seems to be working fine.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list