Changeset 164295 in webkit


Ignore:
Timestamp:
Feb 18, 2014, 9:36:07 AM (11 years ago)
Author:
mitz@apple.com
Message:

Stop using PLATFORM(MAC) except where it means “OS X but not iOS”
https://bugs.webkit.org/show_bug.cgi?id=128952

Reviewed by Anders Carlsson.

  • TestWebKitAPI/JavaScriptTest.h: Changed PLATFORM(MAC) to PLATFORM(COCOA) and changed to

use OBJC_CLASS.

  • TestWebKitAPI/PlatformUtilities.h: Changed PLATFORM(MAC) to USE(FOUNDATION) and changed

to use OBJC_CLASS.

  • TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp: Changed PLATFORM(MAC) to

PLATFORM(COCOA).
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:

(TestWebKitAPI::TEST): Added expected default font-family values for iOS.

  • TestWebKitAPI/config.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
  • WebKitTestRunner/EventSenderProxy.h: Ditto.
  • WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: Ditto.
  • WebKitTestRunner/InjectedBundle/AccessibilityController.h: Ditto.
  • WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp: Ditto.

(WTR::AccessibilityTextMarker::platformTextMarker):

  • WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.h: Ditto.
  • WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp: Ditto.

(WTR::AccessibilityTextMarkerRange::platformTextMarkerRange):

  • WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.h: Ditto.
  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: Ditto.
  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: Ditto.
  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: Ditto.
  • WebKitTestRunner/InjectedBundle/TestRunner.h: Ditto.
  • WebKitTestRunner/PlatformWebView.h: Ditto.
  • WebKitTestRunner/TestController.cpp: Ditto.

(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::processDidCrash):

  • WebKitTestRunner/TestInvocation.cpp: Ditto.

(WTR::updateThreadedScrollingForCurrentTest):
(WTR::TestInvocation::dumpWebProcessUnresponsiveness):

  • WebKitTestRunner/cg/TestInvocationCG.cpp: Ditto.

(WTR::computeMD5HashStringForContext):

Location:
trunk/Tools
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r164270 r164295  
     12014-02-18  Dan Bernstein  <mitz@apple.com>
     2
     3        Stop using PLATFORM(MAC) except where it means “OS X but not iOS”
     4        https://bugs.webkit.org/show_bug.cgi?id=128952
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * TestWebKitAPI/JavaScriptTest.h: Changed PLATFORM(MAC) to PLATFORM(COCOA) and changed to
     9        use OBJC_CLASS.
     10        * TestWebKitAPI/PlatformUtilities.h: Changed PLATFORM(MAC) to USE(FOUNDATION) and changed
     11        to use OBJC_CLASS.
     12        * TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp: Changed PLATFORM(MAC) to
     13        PLATFORM(COCOA).
     14        (TestWebKitAPI::TEST):
     15        * TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:
     16        (TestWebKitAPI::TEST): Added expected default font-family values for iOS.
     17        * TestWebKitAPI/config.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
     18        * WebKitTestRunner/EventSenderProxy.h: Ditto.
     19        * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: Ditto.
     20        * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Ditto.
     21        * WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp: Ditto.
     22        (WTR::AccessibilityTextMarker::platformTextMarker):
     23        * WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.h: Ditto.
     24        * WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp: Ditto.
     25        (WTR::AccessibilityTextMarkerRange::platformTextMarkerRange):
     26        * WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.h: Ditto.
     27        * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: Ditto.
     28        * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: Ditto.
     29        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: Ditto.
     30        * WebKitTestRunner/InjectedBundle/TestRunner.h: Ditto.
     31        * WebKitTestRunner/PlatformWebView.h: Ditto.
     32        * WebKitTestRunner/TestController.cpp: Ditto.
     33        (WTR::TestController::resetStateToConsistentValues):
     34        (WTR::TestController::processDidCrash):
     35        * WebKitTestRunner/TestInvocation.cpp: Ditto.
     36        (WTR::updateThreadedScrollingForCurrentTest):
     37        (WTR::TestInvocation::dumpWebProcessUnresponsiveness):
     38        * WebKitTestRunner/cg/TestInvocationCG.cpp: Ditto.
     39        (WTR::computeMD5HashStringForContext):
     40
    1412014-02-17  Dan Bernstein  <mitz@apple.com>
    242
  • trunk/Tools/TestWebKitAPI/JavaScriptTest.h

    r93404 r164295  
    2424 */
    2525
    26 #if PLATFORM(MAC)
    27 #ifdef __OBJC__
    28 @class WKView;
    29 @class WebView;
    30 #else
    31 class WKView;
    32 class WebView;
    33 #endif
     26#if PLATFORM(COCOA)
     27OBJC_CLASS WKView;
     28OBJC_CLASS WebView;
    3429#endif
    3530
     
    4540::testing::AssertionResult compareJSResult(const char* script, const char* actualResult, const char* expectedResult);
    4641
    47 #if PLATFORM(MAC)
     42#if PLATFORM(COCOA)
    4843::testing::AssertionResult runJSTest(const char* webViewExpr, const char* scriptExpr, const char* expectedResultExpr, WebView *, const char* script, const char* expectedResult);
    4944::testing::AssertionResult runJSTest(const char* viewExpr, const char* scriptExpr, const char* expectedResultExpr, WKView *, const char* script, const char* expectedResult);
  • trunk/Tools/TestWebKitAPI/PlatformUtilities.h

    r121979 r164295  
    3030#include <string>
    3131
    32 #if PLATFORM(MAC)
    33 #if __OBJC__
    34 @class NSString;
    35 #else
    36 class NSString;
    37 #endif
     32#if USE(FOUNDATION)
     33OBJC_CLASS NSString;
    3834#endif
    3935
     
    6460std::string toSTD(WKRetainPtr<WKStringRef>);
    6561std::string toSTD(const char*);
    66 #if PLATFORM(MAC)
     62#if USE(FOUNDATION)
    6763std::string toSTD(NSString *);
    6864#endif
  • trunk/Tools/TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp

    r160104 r164295  
    9090    // down event only represents a raw key down. We expect the key press to be handled (because it
    9191    // inserts text into the text field). But the raw key down should not be handled.
    92 #if PLATFORM(MAC)
     92#if PLATFORM(COCOA)
    9393    EXPECT_FALSE(didNotHandleKeyDownEvent);
    9494#elif PLATFORM(WIN)
     
    108108    EXPECT_JS_TRUE(webView.page(), "textFieldContainsSpace()");
    109109
    110 #if PLATFORM(MAC)
     110#if PLATFORM(COCOA)
    111111    EXPECT_FALSE(didNotHandleKeyDownEvent);
    112112#elif PLATFORM(WIN)
  • trunk/Tools/TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp

    r135702 r164295  
    5858    static const char* expectedFantasyFontFamily = "Papyrus";
    5959    static const char* expectedPictographFontFamily = "Apple Color Emoji";
     60#elif PLATFORM(IOS)
     61    static const char* expectedStandardFontFamily = "Times";
     62    static const char* expectedFixedFontFamily = "Courier";
     63    static const char* expectedSerifFontFamily = "Times";
     64    static const char* expectedSansSerifFontFamily = "Helvetica";
     65    static const char* expectedCursiveFontFamily = "Snell Roundhand";
     66    static const char* expectedFantasyFontFamily = "Papyrus";
     67    static const char* expectedPictographFontFamily = "AppleColorEmoji";
    6068#elif PLATFORM(GTK) || PLATFORM(EFL)
    6169    static const char* expectedStandardFontFamily = "Times";
  • trunk/Tools/TestWebKitAPI/config.h

    r149446 r164295  
    8888#endif
    8989
    90 #if PLATFORM(MAC) && defined(__OBJC__)
     90#if PLATFORM(COCOA) && defined(__OBJC__)
    9191#import <WebKit/WebKit.h>
    9292#endif
  • trunk/Tools/WebKitTestRunner/EventSenderProxy.h

    r164105 r164295  
    113113    WKPoint m_clickPosition;
    114114    WKEventMouseButton m_clickButton;
    115 #if PLATFORM(MAC)
     115#if PLATFORM(COCOA)
    116116    int eventNumber;
    117117#elif PLATFORM(GTK)
  • trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp

    r162538 r164295  
    8888// Unsupported methods on various platforms.
    8989// As they're implemented on other platforms this list should be modified.
    90 #if (!PLATFORM(GTK) && !PLATFORM(MAC) && !PLATFORM(EFL)) || !HAVE(ACCESSIBILITY)
     90#if (!PLATFORM(GTK) && !PLATFORM(COCOA) && !PLATFORM(EFL)) || !HAVE(ACCESSIBILITY)
    9191bool AccessibilityController::addNotificationListener(JSValueRef) { return false; }
    9292bool AccessibilityController::removeNotificationListener() { return false; }
  • trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.h

    r161666 r164295  
    6767    AccessibilityController();
    6868
    69 #if PLATFORM(MAC)
     69#if PLATFORM(COCOA)
    7070    RetainPtr<NotificationHandler> m_globalNotificationHandler;
    7171#endif
  • trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp

    r101700 r164295  
    6161PlatformTextMarker AccessibilityTextMarker::platformTextMarker() const
    6262{
    63 #if PLATFORM(MAC)
     63#if PLATFORM(COCOA)
    6464    return m_textMarker.get();
    6565#else
  • trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.h

    r100488 r164295  
    3232#include <wtf/Platform.h>
    3333
    34 #if PLATFORM(MAC)
     34#if PLATFORM(COCOA)
    3535#include <wtf/RetainPtr.h>
    3636typedef CFTypeRef PlatformTextMarker;
     
    6060    AccessibilityTextMarker(const AccessibilityTextMarker&);
    6161
    62 #if PLATFORM(MAC)
     62#if PLATFORM(COCOA)
    6363    RetainPtr<PlatformTextMarker> m_textMarker;
    6464#else
     
    6767};
    6868
    69 #if !PLATFORM(MAC)
     69#if !PLATFORM(COCOA)
    7070inline bool AccessibilityTextMarker::isEqual(AccessibilityTextMarker*) { return false; }
    7171#endif
  • trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp

    r101700 r164295  
    6161PlatformTextMarkerRange AccessibilityTextMarkerRange::platformTextMarkerRange() const
    6262{
    63 #if PLATFORM(MAC)
     63#if PLATFORM(COCOA)
    6464    return m_textMarkerRange.get();
    6565#else
  • trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.h

    r100488 r164295  
    3232#include <wtf/Platform.h>
    3333
    34 #if PLATFORM(MAC)
     34#if PLATFORM(COCOA)
    3535#include <wtf/RetainPtr.h>
    3636typedef CFTypeRef PlatformTextMarkerRange;
     
    5858    AccessibilityTextMarkerRange(const AccessibilityTextMarkerRange&);
    5959   
    60 #if PLATFORM(MAC)
     60#if PLATFORM(COCOA)
    6161    RetainPtr<PlatformTextMarkerRange> m_textMarkerRange;
    6262#else
     
    6565};
    6666   
    67 #if !PLATFORM(MAC)
     67#if !PLATFORM(COCOA)
    6868inline bool AccessibilityTextMarkerRange::isEqual(AccessibilityTextMarkerRange*) { return false; }
    6969#endif
  • trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp

    r164189 r164295  
    6262#endif
    6363
    64 #if (!PLATFORM(MAC) && !PLATFORM(GTK) && !PLATFORM(EFL)) || !HAVE(ACCESSIBILITY)
     64#if (!PLATFORM(COCOA) && !PLATFORM(GTK) && !PLATFORM(EFL)) || !HAVE(ACCESSIBILITY)
    6565AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement) { }
    6666AccessibilityUIElement::AccessibilityUIElement(const AccessibilityUIElement&) { }
  • trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h

    r164165 r164295  
    3636#include <wtf/Vector.h>
    3737
    38 #if PLATFORM(MAC)
     38#if PLATFORM(COCOA)
    3939#ifdef __OBJC__
    4040typedef id PlatformUIElement;
     
    5151#endif
    5252
    53 #if PLATFORM(MAC)
     53#if PLATFORM(COCOA)
    5454#ifdef __OBJC__
    5555typedef id NotificationHandler;
     
    265265    // A retained, platform specific object used to help manage notifications for this object.
    266266#if HAVE(ACCESSIBILITY)
    267 #if PLATFORM(MAC)
     267#if PLATFORM(COCOA)
    268268    NotificationHandler m_notificationHandler;
    269269
     
    274274#endif
    275275
    276 #if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL)
     276#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(EFL)
    277277    void getChildren(Vector<RefPtr<AccessibilityUIElement> >&);
    278278    void getChildrenWithRange(Vector<RefPtr<AccessibilityUIElement> >&, unsigned location, unsigned length);
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp

    r160104 r164295  
    18631863}
    18641864
    1865 #if !PLATFORM(MAC)
     1865#if !PLATFORM(COCOA)
    18661866void InjectedBundlePage::platformDidStartProvisionalLoadForFrame(WKBundleFrameRef)
    18671867{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

    r161666 r164295  
    3434#include <wtf/PassRefPtr.h>
    3535
    36 #if PLATFORM(MAC)
     36#if PLATFORM(COCOA)
    3737#include <wtf/RetainPtr.h>
    3838#include <CoreFoundation/CFRunLoop.h>
  • trunk/Tools/WebKitTestRunner/PlatformWebView.h

    r158266 r164295  
    8181    bool windowIsKey() const { return m_windowIsKey; }
    8282
    83 #if PLATFORM(MAC) || PLATFORM(EFL)
     83#if PLATFORM(COCOA) || PLATFORM(EFL)
    8484    bool viewSupportsOptions(WKDictionaryRef) const;
    8585#else
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r164105 r164295  
    5353#include <wtf/text/CString.h>
    5454
    55 #if PLATFORM(MAC)
     55#if PLATFORM(COCOA)
    5656#include <WebKit2/WKPagePrivateMac.h>
    5757#endif
    5858
    59 #if !PLATFORM(MAC)
     59#if !PLATFORM(COCOA)
    6060#include <WebKit2/WKTextChecker.h>
    6161#endif
     
    588588    resetPreferencesToConsistentValues();
    589589
    590 #if !PLATFORM(MAC)
     590#if !PLATFORM(COCOA)
    591591    WKTextCheckerContinuousSpellCheckingEnabledStateChanged(true);
    592592#endif
     
    11721172    // ensure we only print the crashed message once.
    11731173    if (!m_didPrintWebProcessCrashedMessage) {
    1174 #if PLATFORM(MAC)
     1174#if PLATFORM(COCOA)
    11751175        pid_t pid = WKPageGetProcessIdentifier(m_mainWebView->page());
    11761176        fprintf(stderr, "#CRASHED - WebProcess (pid %ld)\n", static_cast<long>(pid));
  • trunk/Tools/WebKitTestRunner/TestInvocation.cpp

    r163821 r164295  
    4242#include <wtf/text/CString.h>
    4343
    44 #if PLATFORM(MAC)
    45 #if !PLATFORM(IOS)
     44#if PLATFORM(MAC) && !PLATFORM(IOS)
    4645#include <Carbon/Carbon.h>
    4746#endif
     47
     48#if PLATFORM(COCOA)
    4849#include <WebKit2/WKPagePrivateMac.h>
    4950#endif
     
    139140#endif
    140141
    141 #if PLATFORM(MAC)
     142#if PLATFORM(COCOA)
    142143static bool shouldUseThreadedScrolling(const char* pathOrURL)
    143144{
     
    148149static void updateThreadedScrollingForCurrentTest(const char* pathOrURL)
    149150{
    150 #if PLATFORM(MAC)
     151#if PLATFORM(COCOA)
    151152    WKRetainPtr<WKMutableDictionaryRef> viewOptions = adoptWK(WKMutableDictionaryCreate());
    152153    WKRetainPtr<WKStringRef> useThreadedScrollingKey = adoptWK(WKStringCreateWithUTF8CString("ThreadedScrolling"));
     
    275276{
    276277    const char* errorMessageToStderr = 0;
    277 #if PLATFORM(MAC)
     278#if PLATFORM(COCOA)
    278279    char buffer[64];
    279280    pid_t pid = WKPageGetProcessIdentifier(TestController::shared().mainWebView()->page());
  • trunk/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp

    r162729 r164295  
    8787    MD5 md5;
    8888    unsigned char* bitmapData = static_cast<unsigned char*>(CGBitmapContextGetData(bitmapContext));
    89 #if PLATFORM(MAC)
     89#if PLATFORM(COCOA)
    9090    if ((CGBitmapContextGetBitmapInfo(bitmapContext) & kCGBitmapByteOrderMask) == kCGBitmapByteOrder32Big) {
    9191        for (unsigned row = 0; row < pixelsHigh; row++) {
Note: See TracChangeset for help on using the changeset viewer.