Attempt to fix the internal build.
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Mar 2016 02:07:20 +0000 (02:07 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Mar 2016 02:07:20 +0000 (02:07 +0000)
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197431 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm

index 0b1e550..da92dfa 100644 (file)
@@ -1,3 +1,10 @@
+2016-03-01  Ada Chan  <adachan@apple.com>
+
+        Attempt to fix the internal build.
+
+        * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
+        (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):
+
 2016-02-29  Ada Chan  <adachan@apple.com>
 
         Adopt the new version of AVOutputDeviceMenuController's showMenuForRect method.
index ab7ff4b..becab31 100644 (file)
@@ -117,11 +117,16 @@ void MediaPlaybackTargetPickerMac::showPlaybackTargetPicker(const FloatRect& loc
     LOG(Media, "MediaPlaybackTargetPickerMac::showPlaybackTargetPicker - checkActiveRoute = %i", (int)checkActiveRoute);
 
     AVOutputDeviceMenuControllerType *picker = devicePicker();
-    if (![picker respondsToSelector:@selector(showMenuForRect:appearanceName:allowReselectionOfSelectedOutputDevice:customMenuItemTitle:customMenuItemEnabled:)] && ![picker respondsToSelector:@selector(showMenuForRect:appearanceName:allowReselectionOfSelectedOutputDevice:)])
+    if (![picker respondsToSelector:@selector(showMenuForRect:appearanceName:allowReselectionOfSelectedOutputDevice:)]
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
+        && ![picker respondsToSelector:@selector(showMenuForRect:appearanceName:allowReselectionOfSelectedOutputDevice:customMenuItemTitle:customMenuItemEnabled:)]
+#endif
+        )
         return;
 
     m_showingMenu = true;
 
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     if ([picker respondsToSelector:@selector(showMenuForRect:appearanceName:allowReselectionOfSelectedOutputDevice:customMenuItemTitle:customMenuItemEnabled:)]) {
         NSString *customMenuItemTitleNSString = customMenuItemTitle.isEmpty() ? nil : (NSString *)customMenuItemTitle;
         switch ([picker showMenuForRect:location appearanceName:NSAppearanceNameVibrantLight allowReselectionOfSelectedOutputDevice:!checkActiveRoute customMenuItemTitle:customMenuItemTitleNSString customMenuItemEnabled:YES]) {
@@ -135,7 +140,9 @@ void MediaPlaybackTargetPickerMac::showPlaybackTargetPicker(const FloatRect& loc
         case AVOutputDeviceMenuControllerSelectionNone:
             break;
         }
-    } else if ([picker showMenuForRect:location appearanceName:NSAppearanceNameVibrantLight allowReselectionOfSelectedOutputDevice:!checkActiveRoute]) {
+    } else
+#endif
+    if ([picker showMenuForRect:location appearanceName:NSAppearanceNameVibrantLight allowReselectionOfSelectedOutputDevice:!checkActiveRoute]) {
         if (!checkActiveRoute)
             currentDeviceDidChange();
     }