Bug 18468 - Cairo build does not work with CURL
Summary: Cairo build does not work with CURL
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows Vista
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 17730
  Show dependency treegraph
 
Reported: 2008-04-13 19:48 PDT by Daniel Zucker
Modified: 2008-04-23 10:53 PDT (History)
1 user (show)

See Also:


Attachments
Cairo Curl build fix (3.47 KB, patch)
2008-04-13 19:50 PDT, Daniel Zucker
aroben: review-
Details | Formatted Diff | Diff
updated patch with changes suggested by aroben (3.55 KB, patch)
2008-04-14 09:20 PDT, Daniel Zucker
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Zucker 2008-04-13 19:48:01 PDT
Some build fixes are needed to get the Cairo version to build with Curl.  This patch adds some header files to fix build problems, and adds stub functions for some required functions in WebCore::ResourceHandle.
Comment 1 Daniel Zucker 2008-04-13 19:50:02 PDT
Created attachment 20512 [details]
Cairo Curl build fix

This patch has some build fixes required for Cairo Curl
Comment 2 Adam Roben (:aroben) 2008-04-14 08:02:47 PDT
Comment on attachment 20512 [details]
Cairo Curl build fix

+#if PLATFORM(CF)
+#include <CoreFoundation/CoreFoundation.h>
+#include <WebKitSystemInterface/WebKitSystemInterface.h>
+#endif
 
Can you explain why these changes are needed? In particular I don't see a reason to ever include WebKitSystemInterface.h in another header file, since WebKitSystemInterface.h only declares functions, not types. Can we move these #includes to the source files that require them? If they're needed by this header, can we replace them with the appropriate forward declarations?

+++ WebCore/platform/network/curl/ResourceHandleCurl.cpp	(working copy)
@@ -176,4 +176,11 @@ void ResourceHandle::loadResourceSynchro
     response = syncLoader.resourceResponse();
 }
 
+//stubs needed for windows version
+void ResourceHandle::didReceiveAuthenticationChallenge(const AuthenticationChallenge&) {notImplemented();};
+void ResourceHandle::receivedCredential(const AuthenticationChallenge&, const Credential&) {notImplemented();};
+void ResourceHandle::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&) {notImplemented();};
+void ResourceHandle::receivedCancellation(const AuthenticationChallenge&){notImplemented();};
+
+

Even though these are just stubs I think you should format them correctly. That way it'll be easier to see the changes when someone does implement them.

+++ WebKit/win/WebError.h	(working copy)
@@ -28,6 +28,8 @@
 
 #include "WebKit.h"
 
+#include <wtf/RetainPtr.h>
+

This #include should follow the WebCore #includes, to keep things in lexicographical order.
Comment 3 Daniel Zucker 2008-04-14 08:10:48 PDT
With regard to the first comment, these lines:

+#if PLATFORM(CF)
+#include <CoreFoundation/CoreFoundation.h>
+#include <WebKitSystemInterface/WebKitSystemInterface.h>
+#endif

are required since we need to define CFDataRef for the compile to work.

If you prefer, the only thing I really need to include is "typedef const struct __CFData * CFDataRef;".  I thought it was cleaner to include the entire *.h file, but I can easily change.  I will upload a new patch shortly.
Comment 4 Daniel Zucker 2008-04-14 09:20:03 PDT
Created attachment 20533 [details]
updated patch with changes suggested by aroben

Implemented all changes suggested by Aroben:
--replaced #includes with single required forward declaration
--moved #include <wtf/RetainPtr.h> as requested
--added proper formatting to stub functions
Comment 5 Adam Roben (:aroben) 2008-04-14 09:34:05 PDT
Comment on attachment 20533 [details]
updated patch with changes suggested by aroben

r=me
Comment 6 Matt Lilek 2008-04-23 10:53:06 PDT
Landed in r32442.