Qt integration with Chromium

1,495 views
Skip to first unread message

Ariya Hidayat

unread,
Jun 26, 2013, 12:06:06 AM6/26/13
to phan...@googlegroups.com
See this blog post for details:

https://blog.qt.digia.com/blog/2013/06/25/experimenting-with-chromium-and-qt/


Before anyone asks, remember that this stuff is still experimental
(Linux only, X11 is still mandated, no QNetworkAccessManager support,
etc). However, as the project gets more mature, I believe this is our
optimal ticket to use Chromium technology (hence, also Blink) in the
easiest possibly way (read: not inflicting too much pain on our side).

My gut feeling says that this is PhantomJS 3 material :)


Best regards,


--
Ariya Hidayat, http://ariya.ofilabs.com
http://twitter.com/ariyahidayat
http://gplus.to/ariyahidayat

Bryan Bishop

unread,
Jun 26, 2013, 12:09:50 AM6/26/13
to phan...@googlegroups.com, Bryan Bishop, Ariya Hidayat
On Tue, Jun 25, 2013 at 11:06 PM, Ariya Hidayat <ariya....@gmail.com> wrote:
etc). However, as the project gets more mature, I believe this is our
optimal ticket to use Chromium technology (hence, also Blink) in the
easiest possibly way (read: not inflicting too much pain on our side).

Ariya, would you be personally more interested in a future PhantomJS build on top of Blink rather than WebKit? I have been experimenting with WebKitDFB and the gtk gobject bindings in WebKit. Unfortunately, gtk dropped their cairo-directfb support a while ago, so it would cause a regression of the actually-headless feature.

The one advantage to Blink that I can think of is that it's v8, as opposed to JavaScriptCore in WebKit. However, both modern v8 and modern JSC are close to feature parity I think, so v8 would only be advantageous to those who are doing other v8 things (possibly nodejs things that I don't want to consider here).

- Bryan
http://heybryan.org/
1 512 203 0507

Ariya Hidayat

unread,
Jun 26, 2013, 12:56:59 AM6/26/13
to Bryan Bishop, phan...@googlegroups.com
I wrote a little bit on that topic in the previous discussion:
https://groups.google.com/forum/#!topic/phantomjs/z_147Zj1l58/discussion.

I don't think anything has changed much since then. The long-term-ish
plan can leverage from the blog post I've mentioned.

Ariya Hidayat

unread,
Sep 12, 2013, 10:24:47 AM9/12/13
to phan...@googlegroups.com
See the follow-up blog post:
http://blog.qt.digia.com/blog/2013/09/12/introducing-the-qt-webengine/.

Seems that Digia folks wisely decided to really go with this Chromium
route. I think it will be wise if PhantomJS adopts this new Qt
WebEngine.

James Greene

unread,
Sep 12, 2013, 11:18:26 AM9/12/13
to phan...@googlegroups.com
Yay! Agreed.

Sincerely,
    James Greene



--
You received this message because you are subscribed to the Google Groups "phantomjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phantomjs+...@googlegroups.com.
Visit this group at http://groups.google.com/group/phantomjs.
For more options, visit https://groups.google.com/groups/opt_out.

marc fawzi

unread,
Sep 12, 2013, 5:06:21 PM9/12/13
to phan...@googlegroups.com
Hi

I'm new here but I do have a question re: WebGL... Will Qt Web Engine allow screen capturing of WebGL rendered graphics? In my case, I'd like to use WebGL 2D drawing library instead of SVG which is what I'm using today while retaining the ability to run a backend PhantomJS service that generates PNG versions of the graphics to serve to old browsers and also for displaying 100s of such graphics in scaled down size (thumnails) in a browsable catalog. 

Just wondering....

:) 

James Greene

unread,
Sep 12, 2013, 5:32:24 PM9/12/13
to phan...@googlegroups.com
I would assume so since it's wrapping Chromium but since we haven't actually got our hands on Qt WebEngine yet, it's not possible to guarantee that. :)

Sincerely,
    James Greene

William Schaller

unread,
Oct 6, 2013, 1:07:30 AM10/6/13
to phan...@googlegroups.com
Forgive me if I seem naive, but why would you cling to Qt, wrapping chromium, instead of transitioning phantomjs to use Chromium directly? What is Qt providing that something much lighter, such as chromium embedded framework, couldn't?

I've been poking around in the Cef3 source code, and it looks to me like a lot of the phantomjs code would port quite nicely to use Cef, and be simplified in implementation as well. They've got offscreen rendering working with it, so running headless isn't a problem. Static linking is not a problem either, and as far as I can tell, it would reduce the binary size. The javascript engine is accessible via Cef, so porting the JS part of Phantom would be completely doable.

As for rasterization, with a few patches to Cef, you could utilize chrome's PrintWebViewHelper code either directly or as a base. It already paginates, rasterizes, and generates PDFs of browser tab contents.

Best of all, chromium and cef already exist. Qt WebEngine is only so much vaporware at the moment, and is a long way from reaching stability. Proceeding with PhantomJS2 based on Qt 5.2 seems to me like so much wasted effort, since Qt is itself moving in a new direction, and the old Webkit stuff is going to go stale very quickly. In all likelihood, you'd end up with the same sort of deluge of issues that exist now because of stagnation with Qt and the Qt webkit port.

The Qt folks certainly see the writing on the wall -- WebKit as it was is effectively dead with the departure of Google, and good riddance IMO. Chrome, Opera, and now Qt will all be drinking the Blink koolaid, so why not join the party...

Am I missing something here?

Bryan Bishop

unread,
Oct 6, 2013, 1:16:14 AM10/6/13
to phantomjs, Bryan Bishop
On Sun, Oct 6, 2013 at 12:07 AM, William Schaller <wsch...@gmail.com> wrote:
> Am I missing something here?

Yes: time. None of the core contributors have had the time to do a
Chromium build. As you can see, there's really only one individual
working on the qt5 port at the moment. At any rate, switching to
Chromium would mean rewriting PhantomJS because all of the hooks are
based on Qt. If you're going to do that, you might as well just use
PyV8 + Chromium or something. But that wouldn't be "PhantomJS", would
it?

Ariya Hidayat

unread,
Oct 6, 2013, 1:23:40 AM10/6/13
to phan...@googlegroups.com
> Am I missing something here?

I suggest reading my other post:
https://groups.google.com/d/msg/phantomjs/EiXb4iRU7WA/6nOOksNAv_kJ.

If you want to build pure Chromium-based solution ("PhantomJS 3" in
the said post) right now, knock yourself out. However, if you want me
to spearhead the effort and maintain it, you need a more convincing
story than just "in theory, X should work". This is not about
technical arguments (I am working with Chromium code base on a daily
basis, I don't need to be sold on its benefits), rather with
engineering constraints and project management.


Regards,

William Schaller

unread,
Oct 6, 2013, 1:39:46 AM10/6/13
to phan...@googlegroups.com
I'm not here to throw stones, by any means, you've done some really fantastic work here. I consider my question answered.

Ariya Hidayat

unread,
Oct 6, 2013, 1:48:33 AM10/6/13
to phan...@googlegroups.com
Totally understood, your question was legit.

I think we need some condensed version of the relevant mailing-list
discussions as a wiki page.
> --
> You received this message because you are subscribed to the Google Groups
> "phantomjs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to phantomjs+...@googlegroups.com.
> Visit this group at http://groups.google.com/group/phantomjs.
> For more options, visit https://groups.google.com/groups/opt_out.



Reply all
Reply to author
Forward
0 new messages