REGRESSION (r192184): CleanMyDrive 2's tutorial window is blank
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Mar 2016 20:17:00 +0000 (20:17 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Mar 2016 20:17:00 +0000 (20:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=155550
<rdar://problem/24250689>

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setDrawsTransparentBackground:]):
The app is using this SPI via key-value coding, so just keeping the implementation
is sufficient to make AppKit stop throwing an undefined key exception.
Log once that this is deprecated (... it's also SPI) and then forward to setDrawsBackground.

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

index 6ad3842..09f79be 100644 (file)
@@ -1,3 +1,17 @@
+2016-03-16  Tim Horton  <timothy_horton@apple.com>
+
+        REGRESSION (r192184): CleanMyDrive 2's tutorial window is blank
+        https://bugs.webkit.org/show_bug.cgi?id=155550
+        <rdar://problem/24250689>
+
+        Reviewed by Dan Bernstein.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _setDrawsTransparentBackground:]):
+        The app is using this SPI via key-value coding, so just keeping the implementation
+        is sufficient to make AppKit stop throwing an undefined key exception.
+        Log once that this is deprecated (... it's also SPI) and then forward to setDrawsBackground.
+
 2016-03-16  Daniel Bates  <dabates@apple.com>
 
         <video> and <audio> elements do not obey Content Security Policy on redirect
index f4fc0d2..53e0f30 100644 (file)
@@ -4183,6 +4183,17 @@ static inline WebKit::FindOptions toFindOptions(_WKFindOptions wkFindOptions)
     _impl->setDrawsBackground(drawsBackground);
 }
 
+- (void)_setDrawsTransparentBackground:(BOOL)drawsTransparentBackground
+{
+    static BOOL hasLoggedDeprecationWarning;
+    if (!hasLoggedDeprecationWarning) {
+        // See bug 155550 for details.
+        NSLog(@"-[WKWebView _setDrawsTransparentBackground:] is deprecated and should not be used.");
+        hasLoggedDeprecationWarning = YES;
+    }
+    [self _setDrawsBackground:!drawsTransparentBackground];
+}
+
 #if WK_API_ENABLED
 - (NSView *)_inspectorAttachmentView
 {