[wx] Build fixes for Windows.
authorkevino@webkit.org <kevino@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Mar 2011 22:51:22 +0000 (22:51 +0000)
committerkevino@webkit.org <kevino@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Mar 2011 22:51:22 +0000 (22:51 +0000)
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80287 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wscript
Source/JavaScriptCore/wtf/wx/StringWx.cpp
Source/WebCore/ChangeLog
Source/WebCore/platform/wx/DragDataWx.cpp
Source/WebCore/platform/wx/wxcode/win/non-kerned-drawing.cpp
wscript

index 36cd3e76f1f7205ceaec9ee551549f50259936a2..b67a0575b487edbc652c2999354c47a6ab7c1291 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-03-03  Kevin Ollivier  <kevino@theolliviers.com>
+
+        [wx] Build fix. Ensure the ICU include dir comes before JavaScriptCore/wtf on Win
+        to make sure the proper unicode/utf8.h header is included.
+
+        * wscript:
+
 2011-03-02  Kevin Ollivier  <kevino@theolliviers.com>
 
         [wx] Build fix, don't use LocalizedNumberICU.cpp yet, headers that it needs are not
index 7f0371f21b7bd2919aef564ce57cc97bd454c567..d018e37248f050d9febdc04f93e6ead50057f5f5 100644 (file)
@@ -1,3 +1,11 @@
+2011-03-03  Kevin Ollivier  <kevino@theolliviers.com>
+
+        [wx] Build fix. Alter order of headers included to make sure windows.h
+        is configured by wx, and skip Posix implementation file we don't use on Win.
+
+        * wscript:
+        * wtf/wx/StringWx.cpp:
+
 2011-03-03  Oliver Hunt  <oliver@apple.com>
 
         Reviewed by Geoffrey Garen.
index 8e273043fc8566546c8b3f090823e683a5ced738..214ef91616b1c0e98809f2fe5664673876c2d7bd 100644 (file)
@@ -38,7 +38,7 @@ jscore_excludes.extend(get_excludes(jscore_dir, ['*None.cpp']))
 
 if build_port == "wx":
     if building_on_win32:
-        jscore_excludes += ['MarkStackPosix.cpp', 'ThreadingPthreads.cpp']
+        jscore_excludes += ['MarkStackPosix.cpp', 'OSAllocatorPosix.cpp', 'ThreadingPthreads.cpp']
         sources += ['runtime/MarkStackWin.cpp']
     else:
         jscore_excludes.append('JSStringRefBSTR.cpp')
index 06c7b6117dbbe77290a5640015e6ad682041d347..d5f6c578aa7e9f1a8c7204fa65df7685d14607c6 100644 (file)
 
 #include "config.h"
 
-#include <wtf/text/CString.h>
-#include <wtf/text/WTFString.h>
-
+// The wx headers must come first in this case, because the wtf/text headers
+// import windows.h, and we need to allow the wx headers to set its configuration
+// first.
 #include <wx/defs.h>
 #include <wx/string.h>
 
+#include <wtf/text/CString.h>
+#include <wtf/text/WTFString.h>
+
 namespace WTF {
 
 String::String(const wxString& wxstr)
index 0d0e9c10f74735ac084fb3229985a42b87468d07..cff82cd4ead6aa3cb7b57017addd66e51989e2a4 100644 (file)
@@ -1,3 +1,11 @@
+2011-03-03  Kevin Ollivier  <kevino@theolliviers.com>
+
+        [wx] Build fixes. Use Font::textMetrics to get ascent value, and add missing include.
+
+        * platform/wx/DragDataWx.cpp:
+        * platform/wx/wxcode/win/non-kerned-drawing.cpp:
+        (WebCore::drawTextWithSpacing):
+
 2011-03-03  Oliver Hunt  <oliver@apple.com>
 
         Reviewed by Geoffrey Garen.
index 53b4219ffd0ccd1ba3cd05059a53006b14fbea3f..be24042d4786d58d44defc3188ed9956d6cb3049 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "Document.h"
 #include "DocumentFragment.h"
+#include "Range.h"
 
 namespace WebCore {
 
index 2fcd7612acbcb789e8eba7aeaa1fb4e3b8b07902..c1320c324351b23b5456df8bb8c8a0a99a44ae00 100644 (file)
@@ -79,7 +79,7 @@ void drawTextWithSpacing(GraphicsContext* graphicsContext, const SimpleFontData*
 
     // get the native HDC handle to draw using native APIs
     HDC hdc = 0;
-    float y = point.y() - font->ascent();
+    float y = point.y() - font->fontMetrics().ascent();
     float x = point.x();
 
 #if USE(WXGC)
diff --git a/wscript b/wscript
index aa266af186c75380b79fa78c12451724058bff14..199ab1b00cd8058b122e2482f1d3517884864854 100644 (file)
--- a/wscript
+++ b/wscript
@@ -237,6 +237,12 @@ def build(bld):
     cxxflags = []
     if building_on_win32:
         cxxflags.append('/FIWebCorePrefix.h')
+        # FIXME: We do this because in waf, local include dirs take precedence
+        # over global ones. This makes sense, but because unicode/utf8.h is both
+        # an ICU header name and a WebKit header name (in Source/JavaScriptCore/wtf)
+        # we have to make sure <unicode/utf8.h> picks up the ICU one first.
+        global msvclibs_dir
+        wk_includes.append(os.path.join(msvclibs_dir, 'include'))
     else:
         cxxflags.extend(['-include', 'WebCorePrefix.h'])