Webkit2 MacOS build fix
Created attachment 69770 [details]
Committed r69103: <http://trac.webkit.org/changeset/69103>
This change broke the Windows build: <http://build.webkit.org/builders/Windows%20Debug%20%28Build%29/builds/25146/steps/compile-webkit/logs/stdio>
This is breaking Windows because WKNativeEvent.h is an API header, but PLATFORM() is not API. We need to remove the use of PLATFORM from this public header.
Please correct me if I'm wrong, but there's no plan to support webkit2 in qt-webkit-2.1, so I'm removing the block of Bug 39121 (qt-webkit-2.1 master bug).
typedef NSEvent *WKNativeEventPtr;
#elif defined(WIN32) || defined(_WIN32)
typedef const struct tagMSG* WKNativeEventPtr;
typedef const void* WKNativeEventPtr;
When building Qt in macos it ends up using typedef NSEvent *WKNativeEventPtr; what breaks Qt build. As this is a public file the PLATFORM() macro cannot be used.
How can we have a Qt specific typedef without using PLATFORM?
I am considering that file WKNativeEvent will not be included by QtWebKit users and that it will be wrapped by QtWebKit.
Then it is enough to put a definition in WebKit2.pro.
[10:48am] lca: kenneth_: I was thinking about defining something in our .pro and using ifdef to check if it is defined
[10:48am] aroben: lca: you'd have to do that for all projects that include WebKit2 headers, too
[10:48am] kenneth_: how would that help a user ot QtWebKit2
[10:48am] kenneth_: exactly
[10:49am] kenneth_: everyone would have to put that in their .pro
Kenneth, Adam, is WKNativeEvent really public API? Should not Qt wrap it?
(In reply to comment #6)
> Kenneth, Adam, is WKNativeEvent really public API? Should not Qt wrap it?
It is used by WKPage. But since you wrap WKPage it seems find to wrap WKNativeEvent, too.
Thought we might expose the C API as well.
Created attachment 70070 [details]
I rolled out last patch because it broke some builds. The problem was that PLATFORM() macro may not be used in file WKNativeEvent.h.
Qt build is broken in MacOS because of the use of __APPLE__ macro in that file. As it is a public file it is not easy conciliate the use of __APPLE__
and Qt when building Qt in MacOS. A solution is to have a Qt specific WKNativeEvent.h that only has the typedef needed by Qt.
Committed r69304: <http://trac.webkit.org/changeset/69304>
I do not like that we need a new file. Why not just change #ifdef __APPLE__ to
#ifdef __APPLE__ && !defined(BUILDING_QT__) ?
(In reply to comment #11)
> I do not like that we need a new file. Why not just change #ifdef __APPLE__ to
> #ifdef __APPLE__ && !defined(BUILDING_QT__) ?
Because it is a public file. QtWebKit users would need to define BUILDING_QT__ if they want to include WKNativeEvent.h.