Changeset 102535 in webkit


Ignore:
Timestamp:
Dec 10, 2011 10:20:32 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

#ifdef the parts of the Mac platform which should not be used on iOS
https://bugs.webkit.org/show_bug.cgi?id=74246

Patch by Benjamin Poulain <bpoulain@apple.com> on 2011-12-10
Reviewed by David Kilzer.

  • Configurations/WebCore.xcconfig:
  • platform/FileSystem.cpp:
  • platform/mac/FileSystemMac.mm:
  • platform/mac/Language.mm:

(+[WebLanguageChangeObserver _webkit_languagePreferencesDidChange]):
(WebCore::createHTTPStyleLanguageCode):
(WebCore::platformDefaultLanguage):

  • platform/mac/LocalizedStringsMac.mm:

(WebCore::localizedString):
(+[WebCoreSharedBufferData initialize]):

  • platform/mac/WebCoreNSStringExtras.h:
  • platform/mac/WebCoreNSStringExtras.mm:
  • platform/mac/WebFontCache.mm:
  • platform/mac/WebNSAttributedStringExtras.mm: The value NSAttachmentCharacter is

not defined in the iOS SDK so we add it here.

Location:
trunk/Source/WebCore
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r102532 r102535  
     12011-12-10  Benjamin Poulain  <bpoulain@apple.com>
     2
     3        #ifdef the parts of the Mac platform which should not be used on iOS
     4        https://bugs.webkit.org/show_bug.cgi?id=74246
     5
     6        Reviewed by David Kilzer.
     7
     8        * Configurations/WebCore.xcconfig:
     9        * platform/FileSystem.cpp:
     10        * platform/mac/FileSystemMac.mm:
     11        * platform/mac/Language.mm:
     12        (+[WebLanguageChangeObserver _webkit_languagePreferencesDidChange]):
     13        (WebCore::createHTTPStyleLanguageCode):
     14        (WebCore::platformDefaultLanguage):
     15        * platform/mac/LocalizedStringsMac.mm:
     16        (WebCore::localizedString):
     17        (+[WebCoreSharedBufferData initialize]):
     18        * platform/mac/WebCoreNSStringExtras.h:
     19        * platform/mac/WebCoreNSStringExtras.mm:
     20        * platform/mac/WebFontCache.mm:
     21        * platform/mac/WebNSAttributedStringExtras.mm: The value NSAttachmentCharacter is
     22        not defined in the iOS SDK so we add it here.
     23
    1242011-12-10  Ryosuke Niwa  <rniwa@webkit.org>
    225
  • trunk/Source/WebCore/Configurations/WebCore.xcconfig

    r102097 r102535  
    8282
    8383EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(REAL_PLATFORM_NAME)) $(EXCLUDED_SOURCE_FILE_NAMES_SVG_DOM_OBJC_BINDINGS);
    84 EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *.tiff *Cursor.png Cursor.cpp CursorMac.mm localizedStrings.js;
     84EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *.tiff *Cursor.png Cursor.cpp CursorMac.mm HTMLConverter.mm MemoryPressureHandlerMac.mm SSLKeyGeneratorMac.cpp SearchPopupMenuMac.mm WebVideoFullscreenController.mm WebVideoFullscreenHUDWindowController.mm WebWindowAnimation.mm localizedStrings.js;
    8585EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos);
    8686EXCLUDED_SOURCE_FILE_NAMES_macosx = *IOS.h *IOS.cpp *IOS.mm
  • trunk/Source/WebCore/platform/FileSystem.cpp

    r95901 r102535  
    101101}
    102102
    103 #if !PLATFORM(MAC)
     103#if !PLATFORM(MAC) || PLATFORM(IOS)
    104104
    105105bool canExcludeFromBackup()
  • trunk/Source/WebCore/platform/mac/FileSystemMac.mm

    r85036 r102535  
    3333#import <wtf/RetainPtr.h>
    3434#import <wtf/text/CString.h>
    35 #import <wtf/UnusedParam.h>
    3635
    3736namespace WebCore {
     
    6766}
    6867
     68#if !PLATFORM(IOS)
    6969bool canExcludeFromBackup()
    7070{
     
    7878    return true;
    7979}
     80#endif
    8081
    8182} // namespace WebCore
  • trunk/Source/WebCore/platform/mac/Language.mm

    r95448 r102535  
    11/*
    2  * Copyright (C) 2003, 2005, 2006, 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2003, 2005, 2006, 2010, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    103103    NSString *code = [[preferredLanguageCode retain] autorelease];
    104104
     105#if !PLATFORM(IOS)
    105106    static bool languageChangeObserverAdded;
    106107    if (!languageChangeObserverAdded) {
     
    111112        languageChangeObserverAdded = true;
    112113    }
     114#endif // !PLATFORM(IOS)
    113115
    114116    return code;
  • trunk/Source/WebCore/platform/mac/LocalizedStringsMac.mm

    r95901 r102535  
    3838    static NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebCore"];
    3939
     40#if !PLATFORM(IOS)
     41    // Can be called on a dispatch queue when initializing strings on iOS.
     42    // See LoadWebLocalizedStrings and <rdar://problem/7902473>.
    4043    ASSERT(isMainThread());
     44#endif
    4145   
    4246    RetainPtr<CFStringRef> keyString(AdoptCF, CFStringCreateWithCStringNoCopy(NULL, key, kCFStringEncodingUTF8, kCFAllocatorNull));
  • trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.h

    r85501 r102535  
    4444BOOL hasCaseInsensitiveSubstring(NSString *string, NSString *substring);
    4545NSString *filenameByFixingIllegalCharacters(NSString *string);
     46#if !PLATFORM(IOS)
    4647CFStringEncoding stringEncodingForResource(Handle resource);
     48#endif
    4749
    4850#ifdef __cplusplus
  • trunk/Source/WebCore/platform/mac/WebCoreNSStringExtras.mm

    r100872 r102535  
    6969}
    7070
     71#if !PLATFORM(IOS)
     72
    7173#if COMPILER(CLANG)
    7274#pragma clang diagnostic push
     
    119121#pragma clang diagnostic pop
    120122#endif
     123
     124#endif // !PLATFORM(IOS)
  • trunk/Source/WebCore/platform/mac/WebFontCache.mm

    r85036 r102535  
    302302}
    303303
     304#if !PLATFORM(IOS)
    304305+ (NSFont *)fontWithFamily:(NSString *)desiredFamily traits:(NSFontTraitMask)desiredTraits size:(float)size
    305306{
     
    307308    return [self fontWithFamily:desiredFamily traits:desiredTraits weight:desiredWeight size:size];
    308309}
     310#endif
    309311
    310312@end
  • trunk/Source/WebCore/platform/mac/WebNSAttributedStringExtras.mm

    r83000 r102535  
    2424 */
    2525
     26#import "config.h"
    2627#import "WebNSAttributedStringExtras.h"
     28
     29#if PLATFORM(IOS)
     30enum {
     31    NSAttachmentCharacter = 0xfffc    /* To denote attachments. */
     32};
     33#endif
    2734
    2835namespace WebCore {
Note: See TracChangeset for help on using the changeset viewer.