Make QTKit an optional framework
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 May 2019 23:11:25 +0000 (23:11 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 May 2019 23:11:25 +0000 (23:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197075

Reviewed by Eric Carlson.

* WebView/WebVideoFullscreenHUDWindowController.mm:
(-[WebVideoFullscreenHUDWindowController windowDidLoad]):

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

Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebVideoFullscreenHUDWindowController.mm

index 7b82cc8..d5b68e7 100644 (file)
@@ -1,3 +1,13 @@
+2019-05-13  Jer Noble  <jer.noble@apple.com>
+
+        Make QTKit an optional framework
+        https://bugs.webkit.org/show_bug.cgi?id=197075
+
+        Reviewed by Eric Carlson.
+
+        * WebView/WebVideoFullscreenHUDWindowController.mm:
+        (-[WebVideoFullscreenHUDWindowController windowDidLoad]):
+
 2019-05-08  Alex Christensen  <achristensen@webkit.org>
 
         Don't crash when DOMNode.addEventListener:listener:useCapture: is called with a nil listener
index 7c3f506..ae7e4a2 100644 (file)
 #import <pal/spi/mac/QTKitSPI.h>
 #import <wtf/SoftLinking.h>
 
-SOFT_LINK_FRAMEWORK(QTKit)
+SOFT_LINK_FRAMEWORK_OPTIONAL(QTKit)
 
-SOFT_LINK_CLASS(QTKit, QTHUDBackgroundView)
-SOFT_LINK_CLASS(QTKit, QTHUDButton)
-SOFT_LINK_CLASS(QTKit, QTHUDSlider)
-SOFT_LINK_CLASS(QTKit, QTHUDTimeline)
+SOFT_LINK_CLASS_OPTIONAL(QTKit, QTHUDBackgroundView)
+SOFT_LINK_CLASS_OPTIONAL(QTKit, QTHUDButton)
+SOFT_LINK_CLASS_OPTIONAL(QTKit, QTHUDSlider)
+SOFT_LINK_CLASS_OPTIONAL(QTKit, QTHUDTimeline)
 
 #define QTHUDBackgroundView getQTHUDBackgroundViewClass()
 #define QTHUDButton getQTHUDButtonClass()
@@ -402,6 +402,13 @@ static NSView *createMediaUIBackgroundView()
     static const CGFloat timeTextFieldHeight = 13;
     static const CGFloat timeTextFieldHorizontalMargin = 7;
 
+    if (!QTKitLibrary()
+        || !getQTHUDBackgroundViewClass()
+        || !getQTHUDButtonClass()
+        || !getQTHUDSliderClass()
+        || !getQTHUDTimelineClass())
+        return;
+
     NSWindow *window = [self window];
     ASSERT(window);