A small number or routines in the WebKit API classes assume a CoreGraphics backend. This patch conditionalizes these regions of the code to allow a Cairo-based WebKit.dll to be built.
Comment on attachment 19268[details]
Patch to conditionalize some CG/Cairo calls in WebKit proper.
Good general direction. Some comments:
#include "config.h"
+#include "NotImplemented.h"
#include "WebDragClient.h"
This is wrong. The first include after "config.h" should be the file's own header "WebDragClient.h". There should be a blank line after that before the rest of the includes.
+#else
+ notImplemented ();
+#endif
No space before the parenthesis.
void WebFrame::dispatchDidReceiveAuthenticationChallenge(DocumentLoader* loader, unsigned long identifier, const AuthenticationChallenge& challenge)
{
+#if USE(CFNETWORK)
Not answering the challenge at all will simply make the browser hang. You should probably do something better than that. Or is there some reason this is OK?
+#if PLATFORM(CG)
It seems strange to just conditionalize the printing code without adding a call to notImplemented(). How is this different from the createDragImage case?
+#if !PLATFORM(CAIRO)
#if !defined(NDEBUG) && defined(USE_DEBUG_SAFARI_THEME)
I think this is backwards. It should be #if PLATFORM(CG), since SafariTheme relies on CG. In the future we might need to add a conditional about whether SafariTheme is being included, since someone with CG still might not want SafariTheme. I definitely don't think that "CAIRO" is a good way to say "no SafariTheme".
The purpose of WebKitGraphics is to give a way to draw text if you can't compile C++ code. There's no reason to have it if the context is a WebCore::GraphicsContext object. I suggest leaving these functions out entirely for non-CG platforms.
The main set of patches (the 26.62 KB patch) works around various build errors in WebKit.dll. The COM stuff makes heavy use of Apple-specific libraries, which must be commented out.
The small patch (965 bytes) just modifies the configuration as necessary to build.
I managed to build a version of webkit completely independent from CoreGraphics.
It wasn't difficult, because i just closed all the #include CoreGraphics/* in an #if PLATFORM(CG) directive.
That way I built a WinLauncher executable that doesn't require CoreGraphics.dll.
I did the same for the CFNetwork library, but I wonder how to replace the CFURLCache mechanism implemented in WebView.cpp.
Any idea?
Eventually I will post a patch containing my modifications.
Created attachment 25535[details]
Patch against current sources
Small update that enables the scroll/pan function (i.e., click mouse wheel, then mouse movement becomes scroll).
Created attachment 26448[details]
Update against ToT (2009-01-05)
Much of this patch is a duplicate of 23092. Once that patch is approved and landed this patch will nearly go away.
New patch (2009-05-29) prevents for all ports from including winsock.
In WebCore/config.h, the code to define _WINSOCKAPI_ should be moved
into #if PLATFORM(WIN) ~ #endif that defines WTF_USE_CURL. And every file
that includes curl.h should include winsock2.h before.
WebCore/HistoryPropertyList.h should be copied into WEBKITOUTPUTDIR.
I think it's better to use some environmental variable (as $PRODUCTION)
than use config.h only. WebCorePrefix.h includes CoreServices.h but CF-Lite
doesn't have it.
All elements of the Windows Cairo software, build system, and configuration are now part of WebKit proper. I am closing this issue now that all sub-issue work is complete.
Thanks to everyone for their help!
2008-02-21 17:42 PST, Brent Fulgham
2008-02-27 17:49 PST, Brent Fulgham
2008-03-07 15:18 PST, Brent Fulgham
2008-05-28 13:35 PDT, Brent Fulgham
2008-10-22 23:11 PDT, Brent Fulgham
2008-11-11 21:45 PST, Brent Fulgham
2008-11-11 21:48 PST, Brent Fulgham
2008-11-25 16:30 PST, Brent Fulgham
2008-11-26 14:06 PST, Brent Fulgham
2008-11-29 19:34 PST, Brent Fulgham
2008-12-11 13:36 PST, Brent Fulgham
2008-12-14 21:59 PST, Brent Fulgham
2008-12-17 21:06 PST, Mital Vora
2009-01-05 18:07 PST, Brent Fulgham
2009-01-11 14:03 PST, Brent Fulgham
2009-01-23 21:28 PST, Brent Fulgham
2009-03-24 13:58 PDT, Brent Fulgham
2009-05-29 11:54 PDT, Brent Fulgham
2009-07-13 12:05 PDT, Brent Fulgham