Page previews are sometimes sized much smaller than it seems they should be
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Dec 2014 00:15:19 +0000 (00:15 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Dec 2014 00:15:19 +0000 (00:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=139754
-and corresponding-
rdar://problem/19286550

Reviewed by Tim Horton.

Increase the minimum size and add in a missing else!!
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _preferredPopoverSizeWithPreviewPadding:]):

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm

index f325f58..e7419d2 100644 (file)
@@ -1,3 +1,16 @@
+2014-12-17  Beth Dakin  <bdakin@apple.com>
+
+        Page previews are sometimes sized much smaller than it seems they should be
+        https://bugs.webkit.org/show_bug.cgi?id=139754
+        -and corresponding-
+        rdar://problem/19286550        
+
+        Reviewed by Tim Horton.
+
+        Increase the minimum size and add in a missing else!!
+        * UIProcess/mac/WKImmediateActionController.mm:
+        (-[WKImmediateActionController _preferredPopoverSizeWithPreviewPadding:]):
+
 2014-12-17  Anders Carlsson  <andersca@apple.com>
 
         Ref-ify WebPageProxy and WebProcessProxy creation functions
index f496772..31d0c06 100644 (file)
@@ -376,7 +376,7 @@ static bool targetSizeFitsInAvailableSpace(NSSize targetSize, NSSize availableSp
 {
     static const CGFloat preferredPopoverToViewScale = 0.75;
     static const NSSize screenPadding = {40, 40};
-    static const NSSize smallestPopoverSize = NSMakeSize(500, 300);
+    static const NSSize smallestPopoverSize = NSMakeSize(500, 500);
 
     const NSSize effectivePadding = NSMakeSize(screenPadding.width + previewPadding.width, screenPadding.height + previewPadding.height);
 
@@ -419,7 +419,8 @@ static bool targetSizeFitsInAvailableSpace(NSSize targetSize, NSSize availableSp
     NSSize computedTargetSize;
     if ((maxVerticalTargetSizePreservingAspectRatio.width * maxVerticalTargetSizePreservingAspectRatio.height) > (maxHortizontalTargetSizePreservingAspectRatio.width * maxHortizontalTargetSizePreservingAspectRatio.height))
         computedTargetSize = maxVerticalTargetSizePreservingAspectRatio;
-    computedTargetSize = maxHortizontalTargetSizePreservingAspectRatio;
+    else
+        computedTargetSize = maxHortizontalTargetSizePreservingAspectRatio;
 
     // Now make sure what we've computed isn't too small.
     if (computedTargetSize.width < smallestPopoverSize.width && computedTargetSize.height < smallestPopoverSize.height) {