[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.20-204-g221d8e8

eric at webkit.org eric at webkit.org
Wed Feb 10 22:16:49 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 75ef662d440954214f3b790f13847fa5dabf89c8
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Feb 5 19:08:07 2010 +0000

    2010-02-05  Maxime Simone  <simon.maxime at gmail.com>
    
            Reviewed by David Levin.
    
            More robust conversion from BString to String for Haiku port.
            https://bugs.webkit.org/show_bug.cgi?id=34527
    
            Covered by existing tests.
    
            * platform/text/haiku/StringHaiku.cpp: Fixed include order, Improved coversion from BString.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54434 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 37d5c7f..baa5c71 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-02-05  Maxime Simone  <simon.maxime at gmail.com>
+
+        Reviewed by David Levin.
+
+        More robust conversion from BString to String for Haiku port.
+        https://bugs.webkit.org/show_bug.cgi?id=34527
+
+        Covered by existing tests.
+
+        * platform/text/haiku/StringHaiku.cpp: Fixed include order, Improved coversion from BString.
+
 2010-02-05  Steve Falkenburg  <sfalken at apple.com>
 
         Reviewed by Adam Roben.
diff --git a/WebCore/platform/text/haiku/StringHaiku.cpp b/WebCore/platform/text/haiku/StringHaiku.cpp
index 9e0fd3f..fe32215 100644
--- a/WebCore/platform/text/haiku/StringHaiku.cpp
+++ b/WebCore/platform/text/haiku/StringHaiku.cpp
@@ -24,19 +24,26 @@
  */
 
 #include "config.h"
-#include "CString.h"
-
 #include "PlatformString.h"
 
+#include "CString.h"
 #include <String.h>
 
-
 namespace WebCore {
 
 // String conversions
-String::String(const BString& str)
+String::String(const BString& bstring)
 {
-    m_impl = String::fromUTF8(str.String(), str.Length()).impl();
+    const UChar* str = reinterpret_cast<const UChar*>(bstring.String());
+    const size_t size = bstring.Length();
+
+    if (!str)
+        return;
+
+    if (!size)
+        m_impl = StringImpl::empty();
+    else
+        m_impl = StringImpl::create(str, size);
 }
 
 String::operator BString() const

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list