[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

bweinstein at apple.com bweinstein at apple.com
Wed Dec 22 14:41:31 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 4a61b72e59367b82b1837ddef496f8a20f70fafb
Author: bweinstein at apple.com <bweinstein at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Oct 16 00:50:13 2010 +0000

    REGRESSION(r69850) Loading apple.com/startpage in WebKit on Windows gets a bad request.
    https://bugs.webkit.org/show_bug.cgi?id=47753
    <rdar://problem/8558242>
    
    Reviewed by Sam Weinig.
    
    WebCore:
    
    r69850 switched over to a different way of concatenating WebCore strings, but ran into an issue
    where some Windows calls were returning null terminated strings, and this breaks the new
    method of concatenation.
    
    GetLocaleInfo returns a null-terminated string, but WebCore strings are non-null terminated,
    so once we create our WebCore string, we want to trim off the null terminating character before
    we return the localeInfo.
    
    Test: fast/dom/navigator-userAgent.html
    
    * platform/win/Language.cpp:
    (WebCore::localeInfo):
    
    WebKit/win:
    
    VerQueryValue returns a null terminated string, but we need to strip off the null terminating character
    when we turn it into a WebCore string, or else concatenation using this string will break.
    
    * WebView.cpp:
    
    LayoutTests:
    
    Add a test to make sure that the user agent has some important parts, and is fully formed.
    This test tests that the user agent has Mozilla, AppleWebKit, and KHML, like Gecko. If the
    user agent has all of these components, the string concatenation worked correctly, and this
    bug is fixed.
    
    * fast/dom/navigator-userAgent-expected.txt: Added.
    * fast/dom/navigator-userAgent.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69900 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index df55e78..fe18637 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-15  Brian Weinstein  <bweinstein at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        REGRESSION(r69850) Loading apple.com/startpage in WebKit on Windows gets a bad request.
+        https://bugs.webkit.org/show_bug.cgi?id=47753
+        <rdar://problem/8558242>
+        
+        Add a test to make sure that the user agent has some important parts, and is fully formed.
+        This test tests that the user agent has Mozilla, AppleWebKit, and KHML, like Gecko. If the
+        user agent has all of these components, the string concatenation worked correctly, and this
+        bug is fixed.
+
+        * fast/dom/navigator-userAgent-expected.txt: Added.
+        * fast/dom/navigator-userAgent.html: Added.
+
 2010-10-15  Mike Lawther  <mikelawther at chromium.org>
 
         Reviewed by James Robinson.
diff --git a/LayoutTests/fast/dom/navigator-userAgent-expected.txt b/LayoutTests/fast/dom/navigator-userAgent-expected.txt
new file mode 100644
index 0000000..78572f2
--- /dev/null
+++ b/LayoutTests/fast/dom/navigator-userAgent-expected.txt
@@ -0,0 +1,5 @@
+Tests for bug 47753: REGRESSION(r69850) Loading apple.com/startpage in WebKit on Windows gets a bad request.
+
+User Agent should contain Mozilla: true
+User Agent should contain AppleWebKit: true
+User Agent should contain KHTML, like Gecko: true
diff --git a/LayoutTests/fast/dom/navigator-userAgent.html b/LayoutTests/fast/dom/navigator-userAgent.html
new file mode 100644
index 0000000..c89a305
--- /dev/null
+++ b/LayoutTests/fast/dom/navigator-userAgent.html
@@ -0,0 +1,16 @@
+<html>
+<body>
+<p>Tests for <a href="https://bugs.webkit.org/show_bug.cgi?id=47753">bug 47753</a>: 
+REGRESSION(r69850) Loading apple.com/startpage in WebKit on Windows gets a bad request.</p>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+
+    var userAgent = navigator.userAgent;
+
+    document.write("User Agent should contain Mozilla: " + (userAgent.indexOf("Mozilla") >= 0) + "<br>");
+    document.write("User Agent should contain AppleWebKit: " + (userAgent.indexOf("AppleWebKit") >= 0) + "<br>");
+    document.write("User Agent should contain KHTML, like Gecko: " + (userAgent.indexOf("KHTML, like Gecko") >= 0));
+</script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 259c17f..89a0fd4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2010-10-15  Brian Weinstein  <bweinstein at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        REGRESSION(r69850) Loading apple.com/startpage in WebKit on Windows gets a bad request.
+        https://bugs.webkit.org/show_bug.cgi?id=47753
+        <rdar://problem/8558242>
+        
+        r69850 switched over to a different way of concatenating WebCore strings, but ran into an issue
+        where some Windows calls were returning null terminated strings, and this breaks the new
+        method of concatenation.
+        
+        GetLocaleInfo returns a null-terminated string, but WebCore strings are non-null terminated,
+        so once we create our WebCore string, we want to trim off the null terminating character before
+        we return the localeInfo.
+
+        Test: fast/dom/navigator-userAgent.html
+
+        * platform/win/Language.cpp:
+        (WebCore::localeInfo):
+
 2010-10-15  Alexey Proskuryakov  <ap at apple.com>
 
         Trying to fix crashes on Leopard buildbot.
diff --git a/WebCore/platform/win/Language.cpp b/WebCore/platform/win/Language.cpp
index 1915549..e0fd206 100644
--- a/WebCore/platform/win/Language.cpp
+++ b/WebCore/platform/win/Language.cpp
@@ -44,6 +44,7 @@ static String localeInfo(LCTYPE localeType, const String& fallback)
     if (localeName.isEmpty())
         return fallback;
 
+    localeName.truncate(localeName.length() - 1);
     return localeName;
 }
 
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index cfc05d3..44b0222 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-15  Brian Weinstein  <bweinstein at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        REGRESSION(r69850) Loading apple.com/startpage in WebKit on Windows gets a bad request.
+        https://bugs.webkit.org/show_bug.cgi?id=47753
+        <rdar://problem/8558242>
+        
+        VerQueryValue returns a null terminated string, but we need to strip off the null terminating character
+        when we turn it into a WebCore string, or else concatenation using this string will break.
+
+        * WebView.cpp:
+
 2010-10-15  Jessie Berlin  <jberlin at apple.com>
 
         Windows build fix. Unreviewed.
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index fe062f3..b57e06a 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -2350,7 +2350,7 @@ static String webKitVersion()
     UINT productVersionLength;
     if (!VerQueryValue(data, (LPTSTR)(LPCTSTR)key, (void**)&productVersion, &productVersionLength))
         goto exit;
-    versionStr = String(productVersion, productVersionLength);
+    versionStr = String(productVersion, productVersionLength - 1);
 
 exit:
     if (data)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list