Bug 53916

Summary: [Qt] WebKit patches required to work with a modularized version of Qt
Product: WebKit Reporter: Kristian Amlie <kristian.amlie>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Critical CC: abecsi, benjamin, commit-queue, eric, laszlo.gombos, ossy, rclbelem
Priority: P1 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Added-full-webkit-module-profile-and-a-syncqt-profile
none
Added-include-paths-for-QtScript
none
Avoided-UiTools-dependency-if-the-module-is-not-present
laszlo.gombos: review-
Updated-include-paths-for-phonon
eric: review-
Made-sure-that-the-build-webkit-qmake-argument-is-always-respected
none
Updated-include-paths-for-phonon-v2
none
Updated-include-paths-for-phonon-v3
laszlo.gombos: review-
Updated-include-paths-for-phonon-v4
none
Updated-include-paths-for-phonon-v5
none
Avoided-UiTools-dependency-if-the-module-is-not-present-v2
none
Added-full-webkit-module-profile-and-a-syncqt-profile-v2
none
Added-full-webkit-module-profile-and-a-syncqt-profile-v3
none
Made-sure-that-the-build-webkit-qmake-argument-is-always-respected-v2 none

Description Kristian Amlie 2011-02-07 07:40:11 PST
These patches are required in order to get WebKit to compile after Qt has been modularized (see http://labs.qt.nokia.com/2011/01/21/status-of-qt-modularization/).

All patches should work also when compiling against the monolithic version of Qt.
Comment 1 Kristian Amlie 2011-02-07 07:51:02 PST
Created attachment 81472 [details]
Added-full-webkit-module-profile-and-a-syncqt-profile
Comment 2 Kristian Amlie 2011-02-07 07:51:27 PST
Created attachment 81473 [details]
Added-include-paths-for-QtScript
Comment 3 Kristian Amlie 2011-02-07 07:52:45 PST
Created attachment 81474 [details]
Avoided-UiTools-dependency-if-the-module-is-not-present
Comment 4 Kristian Amlie 2011-02-07 07:53:12 PST
Created attachment 81475 [details]
Updated-include-paths-for-phonon
Comment 5 Kristian Amlie 2011-02-07 07:53:44 PST
Created attachment 81476 [details]
Made-sure-that-the-build-webkit-qmake-argument-is-always-respected
Comment 6 Benjamin Poulain 2011-02-07 08:24:49 PST
P1 since important for release process of Qt.

Kristian: good job at making patches. Do all of that work with and without modularization?
Comment 7 Eric Seidel (no email) 2011-02-07 15:15:09 PST
One patch per bug is generally preferred.
Comment 8 Eric Seidel (no email) 2011-02-07 15:15:39 PST
Comment on attachment 81473 [details]
Added-include-paths-for-QtScript

rs=me.
Comment 9 Eric Seidel (no email) 2011-02-07 15:16:40 PST
Comment on attachment 81475 [details]
Updated-include-paths-for-phonon

View in context: https://bugs.webkit.org/attachment.cgi?id=81475&action=review

> Source/WebCore/ChangeLog:10
> +        No new tests. (OOPS!)

You'll need to remove thsi line (generally replacing it with explaination of testing or why testing is impossible.  In this case you can just write something like "build fix, no tests.")
Comment 10 Kristian Amlie 2011-02-08 00:08:30 PST
> Do all of that work with and without modularization?

I tested with both versions, so they should work. We will probably need a couple of more patches down the line though, but this is a start.

> One patch per bug is generally preferred.

Ok. I didn't know about the one-patch-per-bug policy. Is it ok to go forward with this one, and I will remember it for next time?

> You'll need to remove thsi line (generally replacing it with explaination of testing or why testing is impossible.  In this case you can just write something like "build fix, no tests.")

Right. I guess I trusted the prepare-Changelog script too blindly. I'll fix it.
Comment 11 Kristian Amlie 2011-02-08 00:14:41 PST
Created attachment 81608 [details]
Updated-include-paths-for-phonon-v2
Comment 12 Laszlo Gombos 2011-02-08 19:02:18 PST
Comment on attachment 81608 [details]
Updated-include-paths-for-phonon-v2

Should $$QMAKE_LIBDIR_QT change as well ?
Comment 13 Laszlo Gombos 2011-02-08 19:42:29 PST
Comment on attachment 81474 [details]
Avoided-UiTools-dependency-if-the-module-is-not-present

These tools build without UiTools. There is a mechanism to control the UiTools dependency in WebKit.pri.

Would the following work ? 

-disable_uitools: DEFINES *= QT_NO_UITOOLS
+contains(QT_CONFIG, modular):!contains(QT_CONFIG, uitools)|disable_uitools: DEFINES *= QT_NO_UITOOLS
Comment 14 Laszlo Gombos 2011-02-08 20:14:15 PST
Comment on attachment 81472 [details]
Added-full-webkit-module-profile-and-a-syncqt-profile

View in context: https://bugs.webkit.org/attachment.cgi?id=81472&action=review

> Source/WebKit/qt/qt_webkit_version.pri:10
> +QT.webkit.depends = core gui network script

Only the mandatory dependencies needs to be listed here ? What about optional dependencies like multimedia ? 

I think this list should also be aligned with the list in QMAKE_PKGCONFIG_REQUIRES (in WebCore.pro), which at the moment does not contain QtScript.
Comment 15 WebKit Commit Bot 2011-02-08 20:34:23 PST
Comment on attachment 81473 [details]
Added-include-paths-for-QtScript

Clearing flags on attachment: 81473

Committed r78013: <http://trac.webkit.org/changeset/78013>
Comment 16 Kristian Amlie 2011-02-10 02:29:14 PST
Created attachment 81941 [details]
Updated-include-paths-for-phonon-v3

> Should $$QMAKE_LIBDIR_QT change as well ?

Oops, my bad. I accidentally submitted an old version of the patch. This one is the one I meant to submit.
Comment 17 Laszlo Gombos 2011-02-10 05:32:26 PST
Comment on attachment 81941 [details]
Updated-include-paths-for-phonon-v3

r- as the I think $$QMAKE_LIBDIR_QT should change as well.

Perhaps we can set $$QT.XX.includes in WebKit.pri depending on the contains(QT_CONFIG, modular) test.
Comment 18 Kristian Amlie 2011-02-15 02:47:22 PST
Created attachment 82432 [details]
Updated-include-paths-for-phonon-v4
Comment 19 Kristian Amlie 2011-02-15 02:50:55 PST
> r- as the I think $$QMAKE_LIBDIR_QT should change as well.

Included in new patch.

> Perhaps we can set $$QT.XX.includes in WebKit.pri depending on the contains QT_CONFIG, modular) test.

This turned out to not be so trivial. The includes are inside a scope "contains(DEFINES, ENABLE_VIDEO=1)", however the define is given by the features.pri profile which is inside the WebCore directory. I'm not intimately familiar with how the building on WebKit works, but I assume that it is kind of bad to make WebKit.pri depend on something that is only present inside one of its subprojects. Or do you disagree?
Comment 20 Kristian Amlie 2011-02-17 07:35:05 PST
Created attachment 82800 [details]
Updated-include-paths-for-phonon-v5

Updated patch after IRC discussion with Laszlo.
Comment 21 Laszlo Gombos 2011-02-17 08:07:44 PST
Comment on attachment 82800 [details]
Updated-include-paths-for-phonon-v5

r=me.
Comment 22 WebKit Commit Bot 2011-02-17 08:28:09 PST
Comment on attachment 82800 [details]
Updated-include-paths-for-phonon-v5

Clearing flags on attachment: 82800

Committed r78834: <http://trac.webkit.org/changeset/78834>
Comment 23 Kristian Amlie 2011-02-18 00:29:54 PST
Created attachment 82929 [details]
Avoided-UiTools-dependency-if-the-module-is-not-present-v2

> Would the following work ? 

> -disable_uitools: DEFINES *= QT_NO_UITOOLS
> +contains(QT_CONFIG, modular):!contains(QT_CONFIG, uitools)|disable_uitools: DEFINES *= QT_NO_UITOOLS

Yes, that should work.
Comment 24 WebKit Commit Bot 2011-02-18 19:26:11 PST
Comment on attachment 82929 [details]
Avoided-UiTools-dependency-if-the-module-is-not-present-v2

Clearing flags on attachment: 82929

Committed r79072: <http://trac.webkit.org/changeset/79072>
Comment 25 Kristian Amlie 2011-02-22 03:56:16 PST
Created attachment 83295 [details]
Added-full-webkit-module-profile-and-a-syncqt-profile-v2

After discussing both with Laszlo and my own team, this is the updated patch. The depends statement has changed to include all optional modules, and is used by the Qt build system to order the link arguments correctly. If a module is missing it will simply be omitted from the link as usual.

The modules mentioned inside the sync.profile stay as they are, since they express which headers are needed, and the optional modules are not part of that.
Comment 26 Kristian Amlie 2011-02-22 03:58:42 PST
Oh, and btw multimedia is not included among the optional dependencies because it is part of mobility, not Qt.
Comment 27 Kristian Amlie 2011-02-28 01:19:16 PST
Created attachment 84029 [details]
Added-full-webkit-module-profile-and-a-syncqt-profile-v3

Rebased patch.
Comment 28 Kristian Amlie 2011-02-28 01:20:02 PST
Created attachment 84030 [details]
Made-sure-that-the-build-webkit-qmake-argument-is-always-respected-v2

Rebased patch.
Comment 29 WebKit Commit Bot 2011-02-28 02:04:35 PST
Comment on attachment 84030 [details]
Made-sure-that-the-build-webkit-qmake-argument-is-always-respected-v2

Clearing flags on attachment: 84030

Committed r79846: <http://trac.webkit.org/changeset/79846>
Comment 30 WebKit Commit Bot 2011-02-28 03:07:06 PST
Comment on attachment 84029 [details]
Added-full-webkit-module-profile-and-a-syncqt-profile-v3

Clearing flags on attachment: 84029

Committed r79848: <http://trac.webkit.org/changeset/79848>
Comment 31 WebKit Commit Bot 2011-02-28 03:07:14 PST
All reviewed patches have been landed.  Closing bug.
Comment 32 Ademar Reis 2011-02-28 09:33:37 PST
*** Bug 37211 has been marked as a duplicate of this bug. ***