Title: [174284] trunk/Source/WebKit/ios
Revision
174284
Author
[email protected]
Date
2014-10-03 13:28:04 -0700 (Fri, 03 Oct 2014)

Log Message

REGRESSION (r165896): UIWebView PDFs have a forced black background
https://bugs.webkit.org/show_bug.cgi?id=137387
<rdar://problem/17948411>

Reviewed by David Kilzer.

* WebView/WebPDFViewPlaceholder.h:
* WebView/WebPDFViewPlaceholder.mm:
(-[WebPDFViewPlaceholder layout]):
Remove an ill-advised attempt to force the PDF background color from WebKit.
The idea was that we would maintain Safari's black background except if there
were no pages in the PDF, in which case we would use white instead to avoid
having an all-black view. However, this broke clients who didn't want a black
background, because we were now forcing it to black. Also, we don't need to
maintain the black color in Safari because it doesn't use WebPDFViewPlaceholder anymore.
This wasn't an important part of the patch, in any case.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ios/ChangeLog (174283 => 174284)


--- trunk/Source/WebKit/ios/ChangeLog	2014-10-03 20:27:28 UTC (rev 174283)
+++ trunk/Source/WebKit/ios/ChangeLog	2014-10-03 20:28:04 UTC (rev 174284)
@@ -1,5 +1,24 @@
 2014-10-03  Tim Horton  <[email protected]>
 
+        REGRESSION (r165896): UIWebView PDFs have a forced black background
+        https://bugs.webkit.org/show_bug.cgi?id=137387
+        <rdar://problem/17948411>
+
+        Reviewed by David Kilzer.
+
+        * WebView/WebPDFViewPlaceholder.h:
+        * WebView/WebPDFViewPlaceholder.mm:
+        (-[WebPDFViewPlaceholder layout]):
+        Remove an ill-advised attempt to force the PDF background color from WebKit.
+        The idea was that we would maintain Safari's black background except if there
+        were no pages in the PDF, in which case we would use white instead to avoid
+        having an all-black view. However, this broke clients who didn't want a black
+        background, because we were now forcing it to black. Also, we don't need to
+        maintain the black color in Safari because it doesn't use WebPDFViewPlaceholder anymore.
+        This wasn't an important part of the patch, in any case.
+
+2014-10-03  Tim Horton  <[email protected]>
+
         REGRESSION (r173265): UIWebView PDF loading is completely broken
         https://bugs.webkit.org/show_bug.cgi?id=137386
         <rdar://problem/18524717>

Modified: trunk/Source/WebKit/ios/WebView/WebPDFViewPlaceholder.h (174283 => 174284)


--- trunk/Source/WebKit/ios/WebView/WebPDFViewPlaceholder.h	2014-10-03 20:27:28 UTC (rev 174283)
+++ trunk/Source/WebKit/ios/WebView/WebPDFViewPlaceholder.h	2014-10-03 20:28:04 UTC (rev 174284)
@@ -163,8 +163,6 @@
  */
 - (CGPDFDocumentRef)cgPDFDocument;
 
-- (void)setBackgroundColor:(UIColor *)backgroundColor;
-
 @end
 
 #endif /* TARGET_OS_IPHONE */

Modified: trunk/Source/WebKit/ios/WebView/WebPDFViewPlaceholder.mm (174283 => 174284)


--- trunk/Source/WebKit/ios/WebView/WebPDFViewPlaceholder.mm	2014-10-03 20:27:28 UTC (rev 174283)
+++ trunk/Source/WebKit/ios/WebView/WebPDFViewPlaceholder.mm	2014-10-03 20:28:04 UTC (rev 174284)
@@ -32,7 +32,6 @@
 #import <_javascript_Core/JSContextRef.h>
 #import <_javascript_Core/JSStringRef.h>
 #import <_javascript_Core/JSStringRefCF.h>
-#import <UIKit/UIKit.h>
 #import <WebCore/DataTransfer.h>
 #import <WebCore/EventHandler.h>
 #import <WebCore/EventNames.h>
@@ -53,9 +52,6 @@
 #import <wtf/CurrentTime.h>
 #import <wtf/Vector.h>
 
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIColor)
-
 using namespace WebCore;
 
 @interface WebPDFView (Secrets)
@@ -230,13 +226,6 @@
 
     [self setBoundsSize:boundingSize];
 
-    if ([self.delegate respondsToSelector:@selector(setBackgroundColor:)]) {
-        if (CGSizeEqualToSize(boundingSize, CGSizeZero))
-            [self.delegate setBackgroundColor:[getUIColorClass() whiteColor]];
-        else
-            [self.delegate setBackgroundColor:[getUIColorClass() blackColor]];
-    }
-
     _didCompleteLayout = YES;
     [self _notifyDidCompleteLayout];
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to