Changeset 25088 in webkit


Ignore:
Timestamp:
Aug 14, 2007 7:04:53 PM (17 years ago)
Author:
sfalken
Message:

<rdar://problem/5411482> Windows user agent language always returns "en"

Reviewed by Oliver.

Location:
trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r25087 r25088  
     12007-08-14  Steve Falkenburg  <sfalken@apple.com>
     2
     3        <rdar://problem/5411482> Windows user agent language always returns "en"
     4       
     5        Implement defaultLanguage().
     6
     7        Reviewed by Oliver.
     8
     9        * WebCore.vcproj/WebCore.vcproj: Added Language.cpp.
     10        * platform/win/Language.cpp: Added.
     11        (WebCore::localeInfo): Added.
     12        (WebCore::defaultLanguage): Added.
     13        * platform/win/TemporaryLinkStubs.cpp: Remove defaultLanguage stub.
     14
    1152007-08-14  Sam Weinig  <sam@webkit.org>
    216
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r24995 r25088  
    35293529                                        >
    35303530                                </File>
    3531                                 <File
     3531        <File
     3532                                        RelativePath="..\platform\win\Language.cpp"
     3533                                        >
     3534        </File>
     3535        <File
    35323536                                        RelativePath="..\platform\win\MIMETypeRegistryWin.cpp"
    35333537                                        >
  • trunk/WebCore/platform/win/TemporaryLinkStubs.cpp

    r25081 r25088  
    8484bool AXObjectCache::gAccessibilityEnabled = false;
    8585
    86 String WebCore::defaultLanguage() { return "en"; }
    87 
    8886namespace WebCore {
    8987
  • trunk/WebKit/win/ChangeLog

    r25085 r25088  
     12007-08-14  Steve Falkenburg  <sfalken@apple.com>
     2
     3        <rdar://problem/5411482> Windows user agent language always returns "en"
     4       
     5        Call WebCore::defaultLanguage() to pick up UA language.
     6       
     7        Reviewed by Oliver.
     8
     9        * WebView.cpp:
     10        (WebView::userAgentForKURL):
     11
    1122007-08-15  Peter Kasting  <zerodpx@gmail.org>
    213
  • trunk/WebKit/win/WebView.cpp

    r25085 r25088  
    7171#include <WebCore/IntRect.h>
    7272#include <WebCore/KeyboardEvent.h>
     73#include <WebCore/Language.h>
    7374#include <WebCore/MIMETypeRegistry.h>
    7475#include <WebCore/NotImplemented.h>
     
    15541555}
    15551556
    1556 static String language()
    1557 {
    1558     TCHAR languageName[256];
    1559     if (!GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SISO639LANGNAME, languageName, ARRAYSIZE(languageName)))
    1560         return "en";
    1561     else
    1562         return String(languageName, (unsigned int)_tcslen(languageName));
    1563 }
    1564 
    15651557static String webKitVersion()
    15661558{
     
    16351627
    16361628    if (!m_userAgentStandard.length())
    1637         m_userAgentStandard = String::format("Mozilla/5.0 (Windows; U; %s; %s) AppleWebKit/%s (KHTML, like Gecko)%s%s", osVersion().latin1().data(), language().latin1().data(), webKitVersion().latin1().data(), (m_applicationName.length() ? " " : ""), m_applicationName.latin1().data());
     1629        m_userAgentStandard = String::format("Mozilla/5.0 (Windows; U; %s; %s) AppleWebKit/%s (KHTML, like Gecko)%s%s", osVersion().latin1().data(), defaultLanguage().latin1().data(), webKitVersion().latin1().data(), (m_applicationName.length() ? " " : ""), m_applicationName.latin1().data());
    16381630    return m_userAgentStandard;
    16391631}
Note: See TracChangeset for help on using the changeset viewer.