[wx] Build fixes after recent changes.
authorkevino@webkit.org <kevino@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Feb 2011 20:24:52 +0000 (20:24 +0000)
committerkevino@webkit.org <kevino@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Feb 2011 20:24:52 +0000 (20:24 +0000)
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78852 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
ChangeLog
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wtf/wx/StringWx.cpp
Source/WebCore/ChangeLog
Source/WebCore/dom/ScriptedAnimationController.h
Source/WebCore/platform/graphics/wx/FontWx.cpp
Source/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
Source/WebCore/platform/wx/WidgetWx.cpp
Source/WebKit/wx/ChangeLog
Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
Tools/ChangeLog
Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
Tools/wx/build/settings.py
wscript

index dcfb8dd..314454b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-02-17  Kevin Ollivier  <kevino@theolliviers.com>
+
+        [wx] Build fix after introduction of JavaScriptCore/collector.
+        
+        * wscript:
+
 2011-02-17  Kristian Amlie  <kristian.amlie@nokia.com>
 
         Reviewed by Laszlo Gombos.
index 44bdb9b..428e32a 100644 (file)
@@ -1,3 +1,10 @@
+2011-02-17  Kevin Ollivier  <kevino@theolliviers.com>
+
+        [wx] Revert incorrect blind fix and restore previous working code.
+
+        * wtf/wx/StringWx.cpp:
+        (WTF::String::String):
+
 2011-02-16  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Maciej Stachowiak.
index fe0fd89..06c7b61 100644 (file)
@@ -39,9 +39,10 @@ String::String(const wxString& wxstr)
     #error "This code only works in Unicode build of wxWidgets"
 #endif
 
-#if SIZEOF_WCHAR_T == U_SIZEOF_UCHAR
+#if SIZEOF_WCHAR_T == 2
 
-    m_impl = StringImpl::create(wxstr.wc_str(), wxstr.length());
+    const UChar* str = wxstr.wc_str(); 
+    const size_t len = wxstr.length(); 
 
 #else // SIZEOF_WCHAR_T == 4
 
@@ -58,13 +59,18 @@ String::String(const wxString& wxstr)
 #endif
     size_t wideLength = wxstr.length();
 
-    UChar* data;
     wxMBConvUTF16 conv;
-    unsigned utf16Length = conv.FromWChar(0, 0, wideString, wideLength);
-    m_impl = StringImpl::createUninitialized(utf16Length, data);
-    conv.FromWChar((char*)data, utf16Length, wideString, wideLength);
 
-#endif // SIZEOF_WCHAR_T == 4
+    const size_t utf16bufLen = conv.FromWChar(0, 0, wideString, wideLength); 
+    wxCharBuffer utf16buf(utf16bufLen); 
+
+    const UChar* str = (const UChar*)utf16buf.data(); 
+    size_t len = conv.FromWChar(utf16buf.data(), utf16bufLen, wideString, wideLength) / 2; 
+
+#endif // SIZEOF_WCHAR_T == 2
+
+    m_impl = StringImpl::create(str, len);
+
 }
 
 String::operator wxString() const
index 52061be..9be21bd 100644 (file)
@@ -1,3 +1,16 @@
+2011-02-17  Kevin Ollivier  <kevino@theolliviers.com>
+
+        [wx] Build fixes after recent changes.
+
+        * dom/ScriptedAnimationController.h:
+        * platform/graphics/wx/FontWx.cpp:
+        (WebCore::Font::drawComplexText):
+        * platform/graphics/wx/GraphicsContextWx.cpp:
+        (WebCore::GraphicsContext::drawLineForText):
+        (WebCore::GraphicsContext::drawLineForTextChecking):
+        * platform/wx/WidgetWx.cpp:
+        (WebCore::Widget::setFrameRect):
+
 2011-02-16  Brian Weinstein  <bweinstein@apple.com>
 
         Reviewed by Brady Eidson.
index e8d8d03..7141968 100644 (file)
@@ -26,6 +26,7 @@
 #ifndef ScriptedAnimationController_h
 #define ScriptedAnimationController_h
 
+#if ENABLE(REQUEST_ANIMATION_FRAME)
 #include "DOMTimeStamp.h"
 #include <wtf/Noncopyable.h>
 #include <wtf/PassOwnPtr.h>
@@ -67,5 +68,7 @@ private:
 
 }
 
+#endif // ENABLE(REQUEST_ANIMATION_FRAME)
+
 #endif // ScriptedAnimationController_h
 
index c48f3c7..782d328 100644 (file)
@@ -139,7 +139,7 @@ void Font::drawComplexText(GraphicsContext* context, const TextRun& run, const F
         controller.advance(run.length());
         startX += controller.runWidthSoFar() - afterWidth;
 #else
-        startX += controller.totalWidth() + controller.finalRoundingWidth() - afterWidth;
+        startX += controller.totalWidth() - afterWidth;
         for (int i = 0, end = glyphBuffer.size() - 1; i < glyphBuffer.size() / 2; ++i, --end)
             glyphBuffer.swap(i, end);
 #endif
index c322712..47f3211 100644 (file)
@@ -336,17 +336,17 @@ void GraphicsContext::clipPath(const Path&, WindRule)
     notImplemented();
 }
 
-void GraphicsContext::drawLineForText(const IntPoint& origin, int width, bool printing)
+void GraphicsContext::drawLineForText(const FloatPoint& origin, float width, bool printing)
 {
     if (paintingDisabled())
         return;
 
-    IntPoint endPoint = origin + IntSize(width, 0);
+    FloatPoint endPoint = origin + FloatSize(width, 0);
     m_data->context->SetPen(wxPen(strokeColor(), strokeThickness(), wxSOLID));
     m_data->context->DrawLine(origin.x(), origin.y(), endPoint.x(), endPoint.y());
 }
 
-void GraphicsContext::drawLineForTextChecking(const IntPoint& origin, int width, TextCheckingLineStyle style)
+void GraphicsContext::drawLineForTextChecking(const FloatPoint& origin, float width, TextCheckingLineStyle style)
 {
     switch (style) {
     case TextCheckingSpellingLineStyle:
index 7591a5b..9de4c3d 100644 (file)
@@ -80,10 +80,6 @@ IntRect Widget::frameRect() const
 
 void Widget::setFrameRect(const IntRect& rect)
 {
-    // Take a reference to this Widget, because calling functions of the PlatformWidget can invoke arbitrary
-    // code, which can deref it.
-    RefPtr<Widget> protectedThis(this);
-
     if (PlatformWidget widget = platformWidget())
         widget->SetSize(rect);
     
index ed417db..e809f76 100644 (file)
@@ -1,3 +1,11 @@
+2011-02-17  Kevin Ollivier  <kevino@theolliviers.com>
+
+        [wx] Build fix after move of DocumentWriter to DocumentLoader.
+
+        * WebKitSupport/FrameLoaderClientWx.cpp:
+        (WebCore::FrameLoaderClientWx::setMainDocumentError):
+        (WebCore::FrameLoaderClientWx::dispatchDidFailLoading):
+
 2011-01-26  MORITA Hajime  <morrita@google.com>
 
         Reviewed by Ryosuke Niwa.
index a10df7d..0feeb2c 100644 (file)
@@ -612,7 +612,7 @@ bool FrameLoaderClientWx::canCachePage() const
 void FrameLoaderClientWx::setMainDocumentError(WebCore::DocumentLoader* loader, const WebCore::ResourceError&)
 {
     if (m_firstData) {
-        loader->frameLoader()->writer()->setEncoding(m_response.textEncodingName(), false);
+        loader->writer()->setEncoding(m_response.textEncodingName(), false);
         m_firstData = false;
     }
 }
@@ -737,8 +737,7 @@ void FrameLoaderClientWx::dispatchDidFinishLoading(DocumentLoader*, unsigned lon
 void FrameLoaderClientWx::dispatchDidFailLoading(DocumentLoader* loader, unsigned long, const ResourceError&)
 {
     if (m_firstData) {
-        FrameLoader* fl = loader->frameLoader();
-        fl->writer()->setEncoding(m_response.textEncodingName(), false);
+        loader->writer()->setEncoding(m_response.textEncodingName(), false);
         m_firstData = false;
     }
     if (m_webView) {
index 7d39130..5483047 100644 (file)
@@ -1,3 +1,11 @@
+2011-02-17  Kevin Ollivier  <kevino@theolliviers.com>
+
+        [wx] Build fixes after recent changes.
+
+        * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+        (LayoutTestController::setMinimumTimerInterval):
+        * wx/build/settings.py:
+
 2011-02-17  Csaba Osztrogon√°c  <ossy@webkit.org>
 
         Reviewed by Andreas Kling.
index 1befb77..1ba3e63 100644 (file)
@@ -549,3 +549,8 @@ void LayoutTestController::setSerializeHTTPLoads(bool)
 {
     // FIXME: Implement.
 }
+
+void LayoutTestController::setMinimumTimerInterval(double interval) {
+
+}
+    
index 2b757c4..605596a 100644 (file)
@@ -81,6 +81,8 @@ jscore_dirs = [
     'API',
     'bytecode',
     'bytecompiler',
+    'collector',
+    'collector/handles',
     'debugger',
     'DerivedSources',
     'interpreter',
diff --git a/wscript b/wscript
index efd1e64..72b9121 100644 (file)
--- a/wscript
+++ b/wscript
@@ -227,6 +227,7 @@ def build(bld):
             wk_includes.append(fullpath)
 
     wk_includes.append('Source')
+    wk_includes.append(os.path.join(jscore_dir, 'collector', 'handles'))
     wk_includes.append(os.path.join(jscore_dir, 'wtf', 'unicode'))
     wk_includes.append(os.path.join(jscore_dir, 'wtf', 'unicode', 'icu'))
     wk_includes += common_includes + full_dirs