Bug 18468

Summary: Cairo build does not work with CURL
Product: WebKit Reporter: Daniel Zucker <zucker>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows Vista   
Bug Depends on:    
Bug Blocks: 17730    
Attachments:
Description Flags
Cairo Curl build fix
aroben: review-
updated patch with changes suggested by aroben aroben: review+

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.