Title: [186019] trunk/Source/WebKit2
Revision
186019
Author
bda...@apple.com
Date
2015-06-26 16:50:25 -0700 (Fri, 26 Jun 2015)

Log Message

Rubber-stamped by Tim Horton.

As Dan pointed out in https://bugs.webkit.org/show_bug.cgi?id=146350 , this way of  
getting the screen size was problematic on multiple counts. Fixed here by using 
UIScreen. 
* UIProcess/WKImagePreviewViewController.mm:
(-[WKImagePreviewViewController initWithCGImage:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (186018 => 186019)


--- trunk/Source/WebKit2/ChangeLog	2015-06-26 23:48:17 UTC (rev 186018)
+++ trunk/Source/WebKit2/ChangeLog	2015-06-26 23:50:25 UTC (rev 186019)
@@ -1,5 +1,15 @@
 2015-06-26  Beth Dakin  <bda...@apple.com>
 
+        Rubber-stamped by Tim Horton.
+
+        As Dan pointed out in https://bugs.webkit.org/show_bug.cgi?id=146350 , this way of  
+        getting the screen size was problematic on multiple counts. Fixed here by using 
+        UIScreen. 
+        * UIProcess/WKImagePreviewViewController.mm:
+        (-[WKImagePreviewViewController initWithCGImage:]):
+
+2015-06-26  Beth Dakin  <bda...@apple.com>
+
         WebPage::getPositionInformation() should not copy an image that is larger than the  
         screen
         https://bugs.webkit.org/show_bug.cgi?id=146367

Modified: trunk/Source/WebKit2/UIProcess/WKImagePreviewViewController.mm (186018 => 186019)


--- trunk/Source/WebKit2/UIProcess/WKImagePreviewViewController.mm	2015-06-26 23:48:17 UTC (rev 186018)
+++ trunk/Source/WebKit2/UIProcess/WKImagePreviewViewController.mm	2015-06-26 23:50:25 UTC (rev 186019)
@@ -54,7 +54,7 @@
     RetainPtr<UIImage> uiImage = adoptNS([[UIImage alloc] initWithCGImage:_image.get()]);
     [_imageView setImage:uiImage.get()];
 
-    CGSize screenSize = UIApplication.sharedApplication.delegate.window.bounds.size;
+    CGSize screenSize = [UIScreen mainScreen].bounds.size;
     CGSize imageSize = _scaleSizeWithinSize(CGSizeMake(CGImageGetWidth(_image.get()), CGImageGetHeight(_image.get())), screenSize);
     [_imageView setFrame:CGRectMake([_imageView frame].origin.x, [_imageView frame].origin.y, imageSize.width, imageSize.height)];
     [self setPreferredContentSize:imageSize];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to