Getting bleeding-edge WebKit

938 views
Skip to first unread message

Ariya Hidayat

unread,
Jan 25, 2013, 11:48:21 AM1/25/13
to phan...@googlegroups.com
In the attempt of being more transparent and looking for more helping
hands, here is my latest brain dump.

QtWebKit 2.3 [1] is an initiative to have a fresh QtWebKit module
which stil works with Qt 4.8. It recently enters Beta1 [2], just about
time for our objective on getting an updated QtWebKit for PhantomJS.
There are many ways we could use it, I don't know which one is the
best but here is the first try: let's create a Qt 4.8 setup consists
of QtCore, QtGui, QtNetwork from the latest Qt 4.8.4, but combine it
with QtWebKit 2.3 Beta 1.

As everyone knows, QtWebKit is developed upstream at webkit.org [3].
For some past Qt 4.x releases, a snapshot of some revision will be
imported and placed inside Qt 4.x source tree. This is historically
done via the util/webkit/mkdist-webkit script.

Hence, I did the mkdist-webkit against QtWebKit 2.3 Beta1 and I put
the result in this repository:
https://bitbucket.org/ariya/qt4-retrofit. Currently, nothing works
(surprise!). You can try to build Qt there and it'll happily skip
QtWebKit. There have been some build setup tweaks between QtWebKit 2.2
and 2.3 which I still need to investigate.

In case you want to help, let me know if you need further information.
Otherwise, play with that qt4-retrofit repository and discuss your
strategies or experiences here. I will still keep everyone posted with
whatever moves I have in mind.



[1] http://blogs.kde.org/2012/11/14/introducing-qtwebkit-23
[2] http://blogs.kde.org/2013/01/21/qtwebkit-23-beta-1-tagged
[3] http://trac.webkit.org/wiki/QtWebKit

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

Vitaliy Slobodin

unread,
Jan 25, 2013, 11:54:52 AM1/25/13
to phan...@googlegroups.com
Hi!

I already tried to use it. With success on Windows.
And yes, I wanted to make an offer to switch to this QtWebKit version sometime ago.
But, I'm a little busy right now on my primary job.
If you want instructions about building PhantomJS with this QtWebkit, just ping me.

Thanks, Vitaliy.

James Greene

unread,
Jan 25, 2013, 11:58:00 AM1/25/13
to phan...@googlegroups.com
Vitaliy:
Definitely share the instructions when you get a chance. That'd be awesome. :)

Sincerely,
    James Greene



--
You received this message because you are subscribed to the Google Groups "phantomjs" group.
Visit this group at http://groups.google.com/group/phantomjs?hl=en.
 
 

Jon Leighton

unread,
Jan 25, 2013, 12:04:34 PM1/25/13
to phan...@googlegroups.com
Great stuff. Is the aim to continue to stay on Qt 4.8? Shouldn't we try
to move to Qt 5 now that it's released?
>> <http://webkit.org> [3].
>> For some past Qt 4.x releases, a snapshot of some revision will be
>> imported and placed inside Qt 4.x source tree. This is historically
>> done via the util/webkit/mkdist-webkit script.
>>
>> Hence, I did the mkdist-webkit against QtWebKit 2.3 Beta1 and I put
>> the result in this repository:
>> https://bitbucket.org/ariya/qt4-retrofit. Currently, nothing works
>> (surprise!). You can try to build Qt there and it'll happily skip
>> QtWebKit. There have been some build setup tweaks between QtWebKit 2.2
>> and 2.3 which I still need to investigate.
>>
>> In case you want to help, let me know if you need further information.
>> Otherwise, play with that qt4-retrofit repository and discuss your
>> strategies or experiences here. I will still keep everyone posted with
>> whatever moves I have in mind.
>>
>> *
>> *

Vitaliy Slobodin

unread,
Jan 25, 2013, 12:56:14 PM1/25/13
to phan...@googlegroups.com
Unfortunately, static build of Qt5 is completely broken on Windows for now (idk about Linux/OS X).

James, yes, I will. But they will for Windows only. But I have free time on this weekend, so I can try to build QtWebkit 2.3 on Linux.

James Greene

unread,
Jan 25, 2013, 2:18:24 PM1/25/13
to phan...@googlegroups.com
I'm on Windows, so I'll be content either way. :-P

Sincerely,
    James Greene



On Fri, Jan 25, 2013 at 11:56 AM, Vitaliy Slobodin <vitaliy....@gmail.com> wrote:
Unfortunately, static build of Qt5 is completely broken on Windows for now (idk about Linux/OS X).

James, yes, I will. But they will for Windows only. But I have free time on this weekend, so I can try to build QtWebkit 2.3 on Linux.

--

Ariya Hidayat

unread,
Jan 25, 2013, 9:50:37 PM1/25/13
to phan...@googlegroups.com
Vitaliy, if you're building QtWebKit 2.3 according to the official
instructions, it works just fine on Linux.

What I'm trying to keep is the Qt 4.8 + QtWebKit 2.3 in one unified
repository and build setup. This has two advantages:

(1) mkdist-webkit script should already generate all the bindings and
other tools. Thus, we don't need another set of dependency (Ruby for
JSC assembler, Perl for IDL compiler, etc).

(2) We can import it to our source tree just like the previous attempt
with plain vanilla Qt 4.8
(seehttp://code.google.com/p/phantomjs/issues/detail?id=226).

Of course, this is assuming that my take on such a qt4-retrofit is not
impossible.


Regards,

Ariya Hidayat

unread,
Jan 25, 2013, 10:02:06 PM1/25/13
to phan...@googlegroups.com
> Great stuff. Is the aim to continue to stay on Qt 4.8? Shouldn't we try
> to move to Qt 5 now that it's released?

This is another strategy I want to pursue. However, from my limited
time playing with Qt 5, I'm still not satisfied with the stability,
compared to 4.8 which we already use for a while.

If the mix-and-match of Qt 4.8 and QtWebKit 2.3 is too hard to
realize, I think we need to bite the bullet and focus the effort on Qt
5 porting.


Thank you!

Regards,

Ariya Hidayat

unread,
Jan 25, 2013, 10:58:53 PM1/25/13
to phan...@googlegroups.com
Some minor updates.

Apparently it's possible to build WTF (Web Template Framework) and
JavaScriptCore, to a certain extent.

From that qt4-retrofit check out, first build Qt minimalistically
(takes at most 10 mins):

./configure -prefix $PWD -v --opensource --confirm-license -release
-fast -nomake demos -nomake docs -nomake examples -nomake translations
-nomake tools -no-exceptions -no-stl -no-libmng -no-libtiff -no-icu
-no-declarative -no-multimedia -no-opengl -no-openvg -no-phonon
-no-qt3support -no-script -no-scripttools -no-svg -no-xmlpatterns
-graphicssystem raster -qt-libjpeg -qt-libpng -qt-zlib -openssl -arch
x86 -cocoa -no-dwarf2 -no-dbus -no-glib -no-gstreamer -no-cups -no-sm
-no-xinerama -no-xkb
make -j4

After it's done, it's time for WTF:

cd src/3rdparty/webkit/Source/WTF
QMAKEPATH=$PWD/../../Tools/qmake ../../../../../bin/qmake
make -j4

And finally also:

cd src/3rdparty/webkit/Source/JavaScriptCore
QMAKEPATH=$PWD/../../Tools/qmake ../../../../../bin/qmake
make -j4

The final linking stage still fails, hence we won't have the `jsc`
executable (a test shell for JavaScriptCore). However, so far it's
quite promising since you'll find the following static libs:

src/3rdparty/webkit/Source/JavaScriptCore/release/libJavaScriptCore.a
src/3rdparty/webkit/Source/WTF/release/libWTF.a

One peculiar thing is that on Mac OS X, the debug versions of both
libraries will be produced as well. Only the release versions exist on
Linux.

Again, ideas to move this closer to our goal will be appreciated!
Reply all
Reply to author
Forward
0 new messages