Changeset 237405 in webkit


Ignore:
Timestamp:
Oct 24, 2018 5:19:22 PM (5 years ago)
Author:
ap@apple.com
Message:

Clean up some obsolete macOS version guards
https://bugs.webkit.org/show_bug.cgi?id=190887

Reviewed by Dan Bernstein.

Source/WebCore:

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
(WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::didPassCORSAccessCheck const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::wouldTaintOrigin const):

Source/WebCore/PAL:

  • pal/spi/mac/TUCallSPI.h:

Source/WebKit:

  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

Source/WebKitLegacy/mac:

  • Misc/WebNSPasteboardExtras.mm:

(+[NSPasteboard _web_dragTypesForURL]):

  • WebCoreSupport/PopupMenuMac.mm:

(PopupMenuMac::show):

  • WebCoreSupport/WebEditorClient.h:
  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::respondToChangedSelection):

  • WebView/WebPDFView.mm:

(-[WebPDFView _clipViewForPDFDocumentView]):

Tools:

  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(simulated_forceClickAssociatedEventsMask):
(-[TestWKWebViewHostWindow _mouseDownAtPoint:simulatePressure:clickCount:]):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::initializeWebViewConfiguration):

  • WebKitTestRunner/mac/EventSenderProxy.mm:

(-[EventSenderSyntheticEvent initPressureEventAtLocation:globalLocation:stage:pressure:stageTransition:phase:time:eventNumber:window:]):

Location:
trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r237403 r237405  
     12018-10-24  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Clean up some obsolete macOS version guards
     4        https://bugs.webkit.org/show_bug.cgi?id=190887
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
     9        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
     10        (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime const):
     11        (WebCore::MediaPlayerPrivateAVFoundationObjC::didPassCORSAccessCheck const):
     12        (WebCore::MediaPlayerPrivateAVFoundationObjC::wouldTaintOrigin const):
     13
    1142018-10-24  Tim Horton  <timothy_horton@apple.com>
    215
  • trunk/Source/WebCore/PAL/ChangeLog

    r237402 r237405  
     12018-10-24  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Clean up some obsolete macOS version guards
     4        https://bugs.webkit.org/show_bug.cgi?id=190887
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * pal/spi/mac/TUCallSPI.h:
     9
    1102018-10-24  Megan Gardner  <megan_gardner@apple.com>
    211
  • trunk/Source/WebCore/PAL/pal/spi/mac/TUCallSPI.h

    r220979 r237405  
    2424 */
    2525
    26 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
     26#if PLATFORM(MAC)
    2727
    2828#import <objc/runtime.h>
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r237378 r237405  
    966966    [resourceLoader setDelegate:m_loaderDelegate.get() queue:globalLoaderDelegateQueue()];
    967967
    968 #if PLATFORM(IOS_FAMILY) || __MAC_OS_X_VERSION_MIN_REQUIRED > 101100
    969968    if (DeprecatedGlobalSettings::isAVFoundationNSURLSessionEnabled()
    970969        && [resourceLoader respondsToSelector:@selector(setURLSession:)]
     
    975974            resourceLoader.URLSession = (NSURLSession *)[[[WebCoreNSURLSession alloc] initWithResourceLoader:*mediaResourceLoader delegate:resourceLoader.URLSessionDataDelegate delegateQueue:resourceLoader.URLSessionDataDelegateQueue] autorelease];
    976975    }
    977 #endif
    978976
    979977#endif
     
    18511849double MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime() const
    18521850{
    1853 #if PLATFORM(IOS_FAMILY) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1010
    18541851    return 0;
    1855 #else
    1856     return 5;
    1857 #endif
    18581852}
    18591853
     
    22042198bool MediaPlayerPrivateAVFoundationObjC::didPassCORSAccessCheck() const
    22052199{
    2206 #if PLATFORM(IOS_FAMILY) || __MAC_OS_X_VERSION_MIN_REQUIRED > 101100
    22072200    AVAssetResourceLoader *resourceLoader = m_avAsset.get().resourceLoader;
    22082201    if (!DeprecatedGlobalSettings::isAVFoundationNSURLSessionEnabled()
     
    22132206    if ([session isKindOfClass:[WebCoreNSURLSession class]])
    22142207        return session.didPassCORSAccessChecks;
    2215 #endif
     2208
    22162209    return false;
    22172210}
     
    22192212std::optional<bool> MediaPlayerPrivateAVFoundationObjC::wouldTaintOrigin(const SecurityOrigin& origin) const
    22202213{
    2221 #if PLATFORM(IOS_FAMILY) || __MAC_OS_X_VERSION_MIN_REQUIRED > 101100
    22222214    AVAssetResourceLoader *resourceLoader = m_avAsset.get().resourceLoader;
    22232215    if (!DeprecatedGlobalSettings::isAVFoundationNSURLSessionEnabled()
     
    22282220    if ([session isKindOfClass:[WebCoreNSURLSession class]])
    22292221        return [session wouldTaintOrigin:origin];
    2230 #endif
     2222
    22312223    return std::nullopt;
    22322224}
  • trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp

    r237266 r237405  
    130130    static std::once_flag onceFlag;
    131131    std::call_once(onceFlag, [] {
    132 #if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 101100)
     132#if PLATFORM(IOS_FAMILY) || PLATFORM(MAC)
    133133        displayP3ColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceDisplayP3);
    134134#else
  • trunk/Source/WebKit/ChangeLog

    r237402 r237405  
     12018-10-24  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Clean up some obsolete macOS version guards
     4        https://bugs.webkit.org/show_bug.cgi?id=190887
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
     9        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
     10        (WebKit::WebProcessPool::platformInitializeWebProcess):
     11
    1122018-10-24  Megan Gardner  <megan_gardner@apple.com>
    213
  • trunk/Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in

    r234054 r237405  
    331331    (home-literal "/Library/Preferences/com.apple.lookup.shared.plist"))
    332332
    333 #if __MAC_OS_X_VERSION_MIN_REQUIRED < 101240
     333#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101300
    334334;; FIXME: This should be removed when <rdar://problem/10479685> is fixed.
    335335;; Restrict AppSandboxed processes from creating /Library/Keychains, but allow access to the contents of /Library/Keychains:
  • trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm

    r237266 r237405  
    206206
    207207    if (m_bundleParameters) {
    208 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
    209         auto data = adoptNS([[NSMutableData alloc] init]);
    210         auto keyedArchiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
    211 
    212         [keyedArchiver setRequiresSecureCoding:YES];
    213 #else
    214208        auto keyedArchiver = secureArchiver();
    215 #endif
    216209
    217210        @try {
     
    222215        }
    223216
    224 #if (!PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
    225217        auto data = keyedArchiver.get().encodedData;
    226 #endif
    227218
    228219        parameters.bundleParameterData = API::Data::createWithoutCopying(WTFMove(data));
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r237402 r237405  
     12018-10-24  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Clean up some obsolete macOS version guards
     4        https://bugs.webkit.org/show_bug.cgi?id=190887
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * Misc/WebNSPasteboardExtras.mm:
     9        (+[NSPasteboard _web_dragTypesForURL]):
     10        * WebCoreSupport/PopupMenuMac.mm:
     11        (PopupMenuMac::show):
     12        * WebCoreSupport/WebEditorClient.h:
     13        * WebCoreSupport/WebEditorClient.mm:
     14        (WebEditorClient::respondToChangedSelection):
     15        * WebView/WebPDFView.mm:
     16        (-[WebPDFView _clipViewForPDFDocumentView]):
     17
    1182018-10-24  Megan Gardner  <megan_gardner@apple.com>
    219
  • trunk/Source/WebKitLegacy/mac/Misc/WebNSPasteboardExtras.mm

    r237393 r237405  
    114114        legacyStringPasteboardType(),
    115115        legacyFilenamesPasteboardType(),
    116 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
    117116        legacyFilesPromisePasteboardType(),
    118 #endif
    119117        nil];
    120118}
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/PopupMenuMac.mm

    r236846 r237405  
    168168        vertOffset += CTFontGetDescent(font) - CTFontGetDescent(defaultFont.get());
    169169        vertOffset = fminf(NSHeight(r), vertOffset);
    170 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
    171170        if (textDirection == TextDirection::LTR)
    172171            location = NSMakePoint(NSMinX(r) + popOverHorizontalAdjust, NSMaxY(r) - vertOffset);
    173172        else
    174173            location = NSMakePoint(NSMaxX(r) - popOverHorizontalAdjust, NSMaxY(r) - vertOffset);
    175 #else
    176         location = NSMakePoint(NSMinX(r) + popOverHorizontalAdjust, NSMaxY(r) - vertOffset);
    177 #endif
    178174    } else {
    179 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
    180175        if (textDirection == TextDirection::LTR)
    181176            location = NSMakePoint(NSMinX(r) + popUnderHorizontalAdjust, NSMaxY(r) + popUnderVerticalAdjust);
    182177        else
    183178            location = NSMakePoint(NSMaxX(r) - popUnderHorizontalAdjust, NSMaxY(r) + popUnderVerticalAdjust);
    184 #else
    185         location = NSMakePoint(NSMinX(r) + popUnderHorizontalAdjust, NSMaxY(r) + popUnderVerticalAdjust);
    186 #endif
    187179    }
    188180    // Save the current event that triggered the popup, so we can clean up our event
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.h

    r237266 r237405  
    166166    void requestCheckingOfString(WebCore::TextCheckingRequest&, const WebCore::VisibleSelection& currentSelection) final;
    167167
    168 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     168#if PLATFORM(MAC)
    169169    void requestCandidatesForSelection(const WebCore::VisibleSelection&) final;
    170170    void handleRequestedCandidates(NSInteger, NSArray<NSTextCheckingResult *> *);
     
    186186    WebCore::VisibleSelection m_lastSelectionForRequestedCandidates;
    187187
    188 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     188#if PLATFORM(MAC)
    189189    RetainPtr<NSString> m_paragraphContextForCandidateRequest;
    190190    NSRange m_rangeForCandidates;
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm

    r237266 r237405  
    380380#endif
    381381
    382 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     382#if PLATFORM(MAC)
    383383    if (frame->editor().canEdit())
    384384        requestCandidatesForSelection(frame->selection().selection());
     
    11951195}
    11961196
    1197 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     1197#if PLATFORM(MAC)
    11981198
    11991199void WebEditorClient::requestCandidatesForSelection(const VisibleSelection& selection)
     
    12931293}
    12941294
    1295 #endif // PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     1295#endif // PLATFORM(MAC)
    12961296
    12971297#if !PLATFORM(IOS_FAMILY)
  • trunk/Source/WebKitLegacy/mac/WebView/WebPDFView.mm

    r236846 r237405  
    10651065- (NSClipView *)_clipViewForPDFDocumentView
    10661066{
    1067 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
    10681067    NSClipView *clipView = (NSClipView *)[[PDFSubview documentScrollView] contentView];
    1069 #else
    1070     NSClipView *clipView = (NSClipView *)[[PDFSubview documentView] _web_superviewOfClass:[NSClipView class]];
    1071 #endif
    10721068    ASSERT(clipView);
    10731069    return clipView;
  • trunk/Tools/ChangeLog

    r237402 r237405  
     12018-10-24  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Clean up some obsolete macOS version guards
     4        https://bugs.webkit.org/show_bug.cgi?id=190887
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * TestWebKitAPI/cocoa/TestWKWebView.mm:
     9        (__simulated_forceClickAssociatedEventsMask):
     10        (-[TestWKWebViewHostWindow _mouseDownAtPoint:simulatePressure:clickCount:]):
     11        * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
     12        (WTR::initializeWebViewConfiguration):
     13        * WebKitTestRunner/mac/EventSenderProxy.mm:
     14        (-[EventSenderSyntheticEvent initPressureEventAtLocation:globalLocation:stage:pressure:stageTransition:phase:time:eventNumber:window:]):
     15
    1162018-10-24  Megan Gardner  <megan_gardner@apple.com>
    217
  • trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm

    r237266 r237405  
    104104static int gEventNumber = 1;
    105105
    106 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101003
    107106NSEventMask __simulated_forceClickAssociatedEventsMask(id self, SEL _cmd)
    108107{
    109108    return NSEventMaskPressure | NSEventMaskLeftMouseDown | NSEventMaskLeftMouseUp | NSEventMaskLeftMouseDragged;
    110109}
    111 #endif
    112110
    113111- (void)_mouseDownAtPoint:(NSPoint)point simulatePressure:(BOOL)simulatePressure clickCount:(NSUInteger)clickCount
     
    116114
    117115    NSEventMask modifierFlags = 0;
    118 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101003
    119116    if (simulatePressure)
    120117        modifierFlags |= NSEventMaskPressure;
    121 #else
    122     simulatePressure = NO;
    123 #endif
    124118
    125119    NSEvent *event = [NSEvent mouseEventWithType:mouseEventType location:point modifierFlags:modifierFlags timestamp:GetCurrentEventTime() windowNumber:self.windowNumber context:[NSGraphicsContext currentContext] eventNumber:++gEventNumber clickCount:clickCount pressure:simulatePressure];
     
    129123    }
    130124
    131 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101003
    132125    IMP simulatedAssociatedEventsMaskImpl = (IMP)__simulated_forceClickAssociatedEventsMask;
    133126    Method associatedEventsMaskMethod = class_getInstanceMethod([NSEvent class], @selector(associatedEventsMask));
     
    140133        method_setImplementation(associatedEventsMaskMethod, originalAssociatedEventsMaskImpl);
    141134    }
    142 #endif
    143135}
    144136
  • trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm

    r237266 r237405  
    6767    globalWebViewConfiguration._applePayEnabled = YES;
    6868
    69 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || PLATFORM(IOS_FAMILY)
    7069    WKCookieManagerSetStorageAccessAPIEnabled(WKContextGetCookieManager(context), true);
    71 #endif
    7270
    7371    WKWebsiteDataStore* poolWebsiteDataStore = (__bridge WKWebsiteDataStore *)WKContextGetWebsiteDataStore((__bridge WKContextRef)globalWebViewConfiguration.processPool);
  • trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm

    r234685 r237405  
    8686    _eventSender_eventNumber = eventNumber;
    8787    _eventSender_window = window;
    88 #if defined(__LP64__) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101003
     88#if defined(__LP64__)
    8989    self->_type = NSEventTypePressure;
    9090    _eventSender_type = NSEventTypePressure;
     
    326326}
    327327
    328 #if defined(__LP64__) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101003
     328#if defined(__LP64__)
    329329void EventSenderProxy::sendMouseDownToStartPressureEvents()
    330330{
     
    574574{
    575575}
    576 #endif // defined(__LP64__) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101003
     576#endif // defined(__LP64__)
    577577
    578578void EventSenderProxy::mouseMoveTo(double x, double y)
Note: See TracChangeset for help on using the changeset viewer.