[webkit-qt] Use Cases for QtWebKit

Milian Wolff milian.wolff at kdab.com
Fri Jul 19 17:20:40 PDT 2013


Hey all!

After the discussion during the BoF at QtCS a few days ago, let me be the 
first to outline a few use cases of QtWebKit and the (imo) required 
functionality to achive them.

# The Browser

fullfledged browser with all bells and whistles 

* proxy might need to be setup
* need API to set URL, need to be notified about URL changes (i.e. when a link 
was clicked or the history was modified [1])
* handle downloads, dialogs
* print page
* might want to extend the browser with additional functionality / plugins, 
i.e. via JavaScript that operates on the DOM
* developer console and similar features to improve HTML/JavaScript/...
* control over cookies and permissions (disable js etc. pp.)

# The Sandbox

framework for "HTML5 apps", i.e. all of the above minus the fullfledged bit

* disable functionality such as file:// or qrc:// access
* offer a way to register custom url schemes
* sandboxing, multi-process (i.e. one process per view)
* disable remote access, preferrably even full controll similar to what QNAM 
gives
* disable advanced features (file api e.g. [2])
* bridge between C++/QML/HTML, i.e. allow to "publish" QObjects or QML objects 
in HTML, make it possible to send messages between C++/QML and HTML

# The Toolkit

basically allow writing 3rdparty tools such as phantomjs based on QtWebKit,
which should require all of the above and some more

* good debugging support (as mentioned above: developer console, etc. pp.)
* API to interact with the website (send events and such, maybe just use plain 
JavaScript)
* headless mode, to run on a server without any graphics (X11 or such)

# Conclusion

AFAIK, most of the above is already there in what we have right now and/or 
what is provided by the underlying API - be it WebKit of Chromium. The most 
glaring omissions are the C++/QML and HTML bridge. An accapted, fast solution 
to that problem, i.e. similar (preferably better) to the qwebchannel [3] would 
help tremendously here. Furthermore, it should be possible to run a given 
javascript snippet / function in the context of the HTML process. Paired with 
the message passing, this should then allow for writing browser extensions, 
interacting with the website etc. pp.

Anyhow, these are just my 0.02$ - YMMV. I hope to see more use cases which can 
then be taken into account in the future development of QtWebKit! Rock on, and 
see you at DevDays [4] or latest next year at the QtCS?!

Cheers!

[1]: http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html
[2]: http://www.w3.org/TR/file-upload/
[3]: http://qt.gitorious.org/~milianw/qt-labs/milianws-qwebchannel
[4]: http://www.qtdeveloperdays.com/

-- 
Milian Wolff | milian.wolff at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions


More information about the webkit-qt mailing list