[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 01:57:03 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 8f13b28597819cdf488ac8406556f0fe8197718f
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 23 16:32:06 2010 +0000

    2010-02-23  Michael Lotz <mmlr at mlotz.ch>
    
            Reviewed by David Levin.
    
            [Haiku] Fix conversion from BString to String
            https://bugs.webkit.org/show_bug.cgi?id=35082
    
            The previous patch to this file was broken (sorry). First of all,
            the conversion from UTF8 was accidentally removed. Second, for
            empty strings, we need to point the implementation at StringImpl::empty().
    
            Covered by existing tests.
    
            * platform/text/haiku/StringHaiku.cpp:
            (WebCore::String::String):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55154 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 08e4b1b..4a40248 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-02-23  Michael Lotz <mmlr at mlotz.ch>
+
+        Reviewed by David Levin.
+
+        [Haiku] Fix conversion from BString to String
+        https://bugs.webkit.org/show_bug.cgi?id=35082
+
+        The previous patch to this file was broken (sorry). First of all,
+        the conversion from UTF8 was accidentally removed. Second, for
+        empty strings, we need to point the implementation at StringImpl::empty().
+
+        Covered by existing tests.
+
+        * platform/text/haiku/StringHaiku.cpp:
+        (WebCore::String::String):
+
 2010-02-23  Tor Arne Vestbø  <tor.arne.vestbo at nokia.com>
 
         Reviewed by Eric Carlson.
diff --git a/WebCore/platform/text/haiku/StringHaiku.cpp b/WebCore/platform/text/haiku/StringHaiku.cpp
index fe32215..3c3a389 100644
--- a/WebCore/platform/text/haiku/StringHaiku.cpp
+++ b/WebCore/platform/text/haiku/StringHaiku.cpp
@@ -20,7 +20,7 @@
  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #include "config.h"
@@ -32,18 +32,12 @@
 namespace WebCore {
 
 // String conversions
-String::String(const BString& bstring)
+String::String(const BString& string)
 {
-    const UChar* str = reinterpret_cast<const UChar*>(bstring.String());
-    const size_t size = bstring.Length();
-
-    if (!str)
-        return;
-
-    if (!size)
-        m_impl = StringImpl::empty();
+    if (string.Length())
+        m_impl = String::fromUTF8(string.String(), string.Length()).impl();
     else
-        m_impl = StringImpl::create(str, size);
+        m_impl = StringImpl::empty();
 }
 
 String::operator BString() const

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list