Bug 21724 - Correct Build Regressions (Win32-Cairo)
Summary: Correct Build Regressions (Win32-Cairo)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-17 22:12 PDT by Brent Fulgham
Modified: 2008-10-23 13:33 PDT (History)
3 users (show)

See Also:


Attachments
Patch to correct build regressions in Cairo (Windows) build. (51.65 KB, patch)
2008-10-17 22:27 PDT, Brent Fulgham
aroben: review+
Details | Formatted Diff | Diff
Patch to correct build regressions in Cairo (Windows) build. (49.10 KB, patch)
2008-10-22 12:48 PDT, Brent Fulgham
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2008-10-17 22:12:38 PDT
The last few months of development have left the Windows Cairo port in bad shape.

The attached patch corrects the build issues.
Comment 1 Brent Fulgham 2008-10-17 22:27:15 PDT
Created attachment 24478 [details]
Patch to correct build regressions in Cairo (Windows) build.

This patch corrects a few build problems due to bit-rot caused by the ongoing development.
Comment 2 Oliver Hunt 2008-10-18 01:54:55 PDT
Comment on attachment 24478 [details]
Patch to correct build regressions in Cairo (Windows) build.

I'm concerned that the project file changes will break the cf build as you replace cf paths with the curl paths instead.  You may want to talk to sfalken about those as he has a much greater understanding of vcproj-fu than i do.  I'd also like you to discuss the changes to WebCore/platform/win/ScrollbarThemeWin.cpp and WebKit/win/WebView.cpp with dhyatt as i suspect they will break the "standard" windows build
Comment 3 Brent Fulgham 2008-10-18 11:00:37 PDT
(In reply to comment #2)
> (From update of attachment 24478 [details] [edit])
> I'm concerned that the project file changes will break the cf build as you
> replace cf paths with the curl paths instead.  You may want to talk to sfalken
> about those as he has a much greater understanding of vcproj-fu than i do.

I am pretty sure these changes are safe.  Visual Studio stores these include paths on a per-configuration basis.  So my modifications for "Debug_Cairo" and "Release_Cairo" should not harm the "Debug" and "Release" targets.  The Cairo variants already have some differences from the 'main' Windows build.

> I'd also like you to discuss the changes to
> WebCore/platform/win/ScrollbarThemeWin.cpp and WebKit/win/WebView.cpp with
> dhyatt as i suspect they will break the "standard" windows build

Sounds good.  I'll see if I can catch sfalken or dhyatt next time they are on line.

Thanks for looking it over! 

Comment 4 Brent Fulgham 2008-10-18 17:27:26 PDT
[11:01am] bfulgham_: dhyatt:  Could you please take a look at https://bugs.webkit.org/attachment.cgi?id=24478, specifically the two small modifications to WebCore/platform/win/ScrollbarThemeWin.cpp and WebKit/win/WebView.cpp?
[11:01am] bfulgham_: dhyatt:  They are needed to address some build problems under Win/Cairo; I *think* they are safe (and correct) for the Apple Windows build, but wanted a second opinion.
[11:03am] dhyatt: bfulgham_: i don't get the change to webview.cpp
[11:29am] bfulgham_: dhyatt:  WebView.cpp is needed because the setShouldPaintNativeControls is #if/def'd in WebCore\page\Settings.h conditionally on SAFARI_THEME.  This just makes WebView match Settings.h; perhaps it should not be conditional in Settings.h?
[11:29am] dhyatt: oh ok
[11:29am] dhyatt: sounds ok
Comment 5 Adam Roben (:aroben) 2008-10-22 10:11:28 PDT
Comment on attachment 24478 [details]
Patch to correct build regressions in Cairo (Windows) build.

 8         * WebCore.vcproj/WebCore.vcproj:  Correct paths for Cairo port.

I think it's helpful to say something along the lines of "Fixed include paths and post-build event for the Debug_Cairo and Release_Cairo configurations and added new Curl files."

 2  * Copyright (C) 2008 Collin Jackson  <collinj@webkit.org>

I don't think this copyright is needed (in DNSCurl.cpp).

 32 struct _CFURLRequest
 33 {
 34    int ignoreMe;
 35 };
 36 
 37 typedef const struct _CFURLRequest* CFURLRequestRef;

I think you can probably just do:

typedef const void* CFURLRequestRef;

Is there a reason why that won't work?

@@ HRESULT WebView::notifyPreferencesChange
41474147     hr = prefsPrivate->shouldPaintNativeControls(&enabled);
41484148     if (FAILED(hr))
41494149         return hr;
 4150 #if USE(SAFARI_THEME)
41504151     settings->setShouldPaintNativeControls(!!enabled);
 4152 #endif

Should we skip the prefsPrivate call when SAFARI_THEME is disabled, too?

r=me, even if you don't address the above.
Comment 6 Brent Fulgham 2008-10-22 12:48:44 PDT
Created attachment 24563 [details]
Patch to correct build regressions in Cairo (Windows) build.

Revised patch based on aroben's comments.
Comment 7 Adam Roben (:aroben) 2008-10-22 13:25:48 PDT
Comment on attachment 24563 [details]
Patch to correct build regressions in Cairo (Windows) build.

 59         CFURLRequestRef cfURLRequest() const   // For compatibility
 60         {
 61            return 0;
 62         }

Normally we put such small inline functions like this on a single line.

r=me
Comment 8 Adam Roben (:aroben) 2008-10-22 16:34:36 PDT
Landed in r37797
Comment 9 Mihnea Ovidenie 2008-10-23 01:33:46 PDT
(In reply to comment #6)
> Created an attachment (id=24563) [edit]
> Patch to correct build regressions in Cairo (Windows) build.
> 
> Revised patch based on aroben's comments.
> 
Hello Brent,
I was trying to build WebKit on windows without Cairo without much success. Should i assume from your patch that you were able to do that? Aside from mentioning --cairo-win32 on the build command, i was modifying WebCore/config.h to define WTF_PLATFORM_CAIRO 1 and undefine WTF_PLATFORM_CG. However, these changes triggered some compile errors in WebCore files. Can you give some insight about your building process?
Regards,
Mihnea
Comment 10 Brent Fulgham 2008-10-23 13:33:56 PDT
(In reply to comment #9)
> I was trying to build WebKit on windows without Cairo without much success.
> Should i assume from your patch that you were able to do that? Aside from
> mentioning --cairo-win32 on the build command, i was modifying WebCore/config.h
> to define WTF_PLATFORM_CAIRO 1 and undefine WTF_PLATFORM_CG. However, these
> changes triggered some compile errors in WebCore files. Can you give some
> insight about your building process?

I have forwarded you a copy of my entire diff against the current source tree.  The things you are probably missing are:

1.  You need the various patches in https://bugs.webkit.org/show_bug.cgi?id=17484.
2.  I have a modified WebCore/config.h:

Index: WebCore/config.h
===================================================================
--- WebCore/config.h	(revision 37798)
+++ WebCore/config.h	(working copy)
@@ -96,9 +96,16 @@
 #endif
 
 #if PLATFORM(WIN)
+#if 0
 #define WTF_PLATFORM_CG 1
 #undef WTF_PLATFORM_CAIRO
 #define WTF_USE_CFNETWORK 1
+#else
+#undef WTF_PLATFORM_CG
+#define WTF_PLATFORM_CAIRO 1
+#undef WTF_USE_CFNETWORK
+#define WTF_USE_CURL 1
+#endif
 #undef WTF_USE_WININET
 #define WTF_PLATFORM_CF 1
 #define WTF_USE_PTHREADS 0

-----------------------------------------------