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

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 15:32:40 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit d46a47ab12c5f2f4ec55e9ebe08cffc297a81621
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Nov 7 23:38:22 2010 +0000

    2010-11-07  John Reck  <jreck at google.com>
    
            Reviewed by Steve Block.
    
            Implements navigator.language for Android
            https://bugs.webkit.org/show_bug.cgi?id=49099
    
            Android was previously hardcoding the value for WebCore::platformDefaultLanguage().
            This patch removes the hardcoding and calls into the PlatformBridge to get the
            correct language based off of the user's settings.
    
            No new tests needed, this is already covered
    
            * Android.mk:
            * platform/android/LanguageAndroid.cpp: Added.
            (WebCore::platformDefaultLanguage):
            * platform/android/PlatformBridge.h:
            * platform/android/TemporaryLinkStubs.cpp:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71484 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index 367cdf3..d724c66 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -483,6 +483,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
 	platform/android/GeolocationServiceAndroid.cpp \
 	platform/android/GeolocationServiceBridge.cpp \
 	platform/android/KeyEventAndroid.cpp \
+	platform/android/LanguageAndroid.cpp \
 	platform/android/LocalizedStringsAndroid.cpp \
 	platform/android/PlatformTouchEventAndroid.cpp \
 	platform/android/PlatformTouchPointAndroid.cpp \
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4891390..d242f30 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-11-07  John Reck  <jreck at google.com>
+
+        Reviewed by Steve Block.
+
+        Implements navigator.language for Android
+        https://bugs.webkit.org/show_bug.cgi?id=49099
+        
+        Android was previously hardcoding the value for WebCore::platformDefaultLanguage().
+        This patch removes the hardcoding and calls into the PlatformBridge to get the
+        correct language based off of the user's settings.
+
+        No new tests needed, this is already covered
+
+        * Android.mk:
+        * platform/android/LanguageAndroid.cpp: Added.
+        (WebCore::platformDefaultLanguage):
+        * platform/android/PlatformBridge.h:
+        * platform/android/TemporaryLinkStubs.cpp:
+
 2010-11-07  Robert Hogan  <robert at webkit.org>
 
         Reviewed by Andreas Kling.
diff --git a/WebCore/platform/android/LanguageAndroid.cpp b/WebCore/platform/android/LanguageAndroid.cpp
new file mode 100644
index 0000000..52e614d
--- /dev/null
+++ b/WebCore/platform/android/LanguageAndroid.cpp
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2010, The Android Open Source Project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * 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.
+ */
+
+#include "config.h"
+#include "Language.h"
+
+#include "PlatformBridge.h"
+#include "PlatformString.h"
+
+namespace WebCore {
+
+// This function is used by Javascript to find out what the default language
+// the user has selected. It is used by the JS object Navigator.language
+// I guess this information should be mapped with the Accept-Language: HTTP header.
+String platformDefaultLanguage()
+{
+    return PlatformBridge::computeDefaultLanguage();
+}
+
+} // namespace WebCore
diff --git a/WebCore/platform/android/PlatformBridge.h b/WebCore/platform/android/PlatformBridge.h
index 3f9105a..d961a89 100644
--- a/WebCore/platform/android/PlatformBridge.h
+++ b/WebCore/platform/android/PlatformBridge.h
@@ -104,6 +104,8 @@ public:
     static bool cookiesEnabled();
     // Plugin
     static NPObject* pluginScriptableObject(Widget*);
+    // Language
+    static String computeDefaultLanguage();
 };
 
 }
diff --git a/WebCore/platform/android/TemporaryLinkStubs.cpp b/WebCore/platform/android/TemporaryLinkStubs.cpp
index 28611e3..5ae1b52 100644
--- a/WebCore/platform/android/TemporaryLinkStubs.cpp
+++ b/WebCore/platform/android/TemporaryLinkStubs.cpp
@@ -93,15 +93,6 @@ using namespace WebCore;
 /* Completely empty stubs (mostly to allow DRT to run): */
 /********************************************************/
 
-// This function is used by Javascript to find out what the default language
-// the user has selected. It is used by the JS object Navigator.language
-// I guess this information should be mapped with the Accept-Language: HTTP header.
-String WebCore::defaultLanguage()
-{
-    verifiedOk();
-    return "en";
-}
-
 namespace WebCore {
 
 // This function tells the bridge that a resource was loaded from the cache and thus

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list