Changeset 71484 in webkit


Ignore:
Timestamp:
Nov 7, 2010 3:38:22 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-11-07 John Reck <jreck@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:
Location:
trunk/WebCore
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/Android.mk

    r71373 r71484  
    484484        platform/android/GeolocationServiceBridge.cpp \
    485485        platform/android/KeyEventAndroid.cpp \
     486        platform/android/LanguageAndroid.cpp \
    486487        platform/android/LocalizedStringsAndroid.cpp \
    487488        platform/android/PlatformTouchEventAndroid.cpp \
  • trunk/WebCore/ChangeLog

    r71483 r71484  
     12010-11-07  John Reck  <jreck@google.com>
     2
     3        Reviewed by Steve Block.
     4
     5        Implements navigator.language for Android
     6        https://bugs.webkit.org/show_bug.cgi?id=49099
     7       
     8        Android was previously hardcoding the value for WebCore::platformDefaultLanguage().
     9        This patch removes the hardcoding and calls into the PlatformBridge to get the
     10        correct language based off of the user's settings.
     11
     12        No new tests needed, this is already covered
     13
     14        * Android.mk:
     15        * platform/android/LanguageAndroid.cpp: Added.
     16        (WebCore::platformDefaultLanguage):
     17        * platform/android/PlatformBridge.h:
     18        * platform/android/TemporaryLinkStubs.cpp:
     19
    1202010-11-07  Robert Hogan  <robert@webkit.org>
    221
  • trunk/WebCore/platform/android/PlatformBridge.h

    r53673 r71484  
    105105    // Plugin
    106106    static NPObject* pluginScriptableObject(Widget*);
     107    // Language
     108    static String computeDefaultLanguage();
    107109};
    108110
  • trunk/WebCore/platform/android/TemporaryLinkStubs.cpp

    r71346 r71484  
    9494/********************************************************/
    9595
    96 // This function is used by Javascript to find out what the default language
    97 // the user has selected. It is used by the JS object Navigator.language
    98 // I guess this information should be mapped with the Accept-Language: HTTP header.
    99 String WebCore::defaultLanguage()
    100 {
    101     verifiedOk();
    102     return "en";
    103 }
    104 
    10596namespace WebCore {
    10697
Note: See TracChangeset for help on using the changeset viewer.