Changeset 71977 in webkit


Ignore:
Timestamp:
Nov 13, 2010 8:35:54 PM (13 years ago)
Author:
mitz@apple.com
Message:

fast/text/hyphen* tests have different results on Leopard
https://bugs.webkit.org/show_bug.cgi?id=43296

Reviewed by Dave Hyatt.

  • platform/text/mac/TextBreakIteratorInternalICUMac.mm:

(WebCore::topLanguagePreference): Changed to look up the value of the AppleLanguages default
through the normal NSUserDefaults search order rather than skipping the application domain.
This makes this function respect DumpRenderTree’s setting of the default in the application
domain.

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r71975 r71977  
     12010-11-13  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Dave Hyatt.
     4
     5        fast/text/hyphen* tests have different results on Leopard
     6        https://bugs.webkit.org/show_bug.cgi?id=43296
     7
     8        * platform/text/mac/TextBreakIteratorInternalICUMac.mm:
     9        (WebCore::topLanguagePreference): Changed to look up the value of the AppleLanguages default
     10        through the normal NSUserDefaults search order rather than skipping the application domain.
     11        This makes this function respect DumpRenderTree’s setting of the default in the application
     12        domain.
     13
    1142010-11-13  David Hyatt  <hyatt@apple.com>
    215
  • trunk/WebCore/platform/text/mac/TextBreakIteratorInternalICUMac.mm

    r45762 r71977  
    3939static RetainPtr<CFStringRef> topLanguagePreference()
    4040{
    41     RetainPtr<CFPropertyListRef> languages(AdoptCF, CFPreferencesCopyValue(CFSTR("AppleLanguages"),
    42         kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost));
    43     if (!languages || CFGetTypeID(languages.get()) != CFArrayGetTypeID())
     41    NSArray *languagesArray = [[NSUserDefaults standardUserDefaults] arrayForKey:@"AppleLanguages"];
     42    if (!languagesArray)
    4443        return 0;
    45     CFArrayRef languagesArray = static_cast<CFArrayRef>(languages.get());
    46     if (CFArrayGetCount(languagesArray) < 1)
     44    if ([languagesArray count] < 1)
    4745        return 0;
    48     const void* value = CFArrayGetValueAtIndex(languagesArray, 0);
    49     if (!value || CFGetTypeID(value) != CFStringGetTypeID())
     46    NSString *value = [languagesArray objectAtIndex:0];
     47    if (![value isKindOfClass:[NSString class]])
    5048        return 0;
    51     return static_cast<CFStringRef>(value);
     49    return reinterpret_cast<CFStringRef>(value);
    5250}
    5351
Note: See TracChangeset for help on using the changeset viewer.