RESOLVED FIXED 24779
Conditionalize CFNetwork-Specific Code in WebView
https://bugs.webkit.org/show_bug.cgi?id=24779
Summary Conditionalize CFNetwork-Specific Code in WebView
Brent Fulgham
Reported 2009-03-24 11:22:15 PDT
WebView.cpp makes calls to various CFNetwork-specific routines that are not present in Windows builds based on other network backends. As a first step, add #if/def blocks around the two blocks of code that make CFNetwork calls. Later, cURL or Google network API calls can be added here.
Attachments
Exclude CFNetwork-specific calls in non-Apple builds. (2.43 KB, patch)
2009-03-24 11:32 PDT, Brent Fulgham
aroben: review+
Brent Fulgham
Comment 1 2009-03-24 11:32:28 PDT
Created attachment 28893 [details] Exclude CFNetwork-specific calls in non-Apple builds.
Adam Roben (:aroben)
Comment 2 2009-03-24 11:35:50 PDT
Comment on attachment 28893 [details] Exclude CFNetwork-specific calls in non-Apple builds. > +++ WebKit/win/WebView.cpp (working copy) > @@ -50,7 +50,9 @@ > #include "WebNotificationCenter.h" > #include "WebPreferences.h" > #pragma warning( push, 0 ) > +#if PLATFORM(CG) > #include <CoreGraphics/CGContext.h> > +#endif It would be better to move the conditionally-included headers down below the unconditionally-included headers. Each #if/#endif pair can form its own paragraph. > +#include <CoreFoundation/CoreFoundation.h> Should this be inside #if PLATFORM(CF)/#endif? r=me
Brent Fulgham
Comment 3 2009-03-24 11:40:52 PDT
(In reply to comment #2) > (From update of attachment 28893 [details] [review]) > > +++ WebKit/win/WebView.cpp (working copy) > > @@ -50,7 +50,9 @@ > > #include "WebNotificationCenter.h" > > #include "WebPreferences.h" > > #pragma warning( push, 0 ) > > +#if PLATFORM(CG) > > #include <CoreGraphics/CGContext.h> > > +#endif > > It would be better to move the conditionally-included headers down below the > unconditionally-included headers. Each #if/#endif pair can form its own > paragraph. Will do. > > +#include <CoreFoundation/CoreFoundation.h> > > Should this be inside #if PLATFORM(CF)/#endif? Currently, all Windows builds use CoreFoundation, so if this was not included I'm not sure if anything would build. But it certainly won't hurt to add the check, and might help some future porter so I'll change it when I commit. > r=me >
Brent Fulgham
Comment 4 2009-03-24 13:57:24 PDT
Committed in @r41949.
Note You need to log in before you can comment on or make changes to this bug.