Bug 138472

Summary: Preview views often misplaced inside popover
Product: WebKit Reporter: Beth Dakin <bdakin>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, bdakin, conrad_shultz, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch thorton: review+

Description Beth Dakin 2014-11-06 12:50:45 PST
Preview views often misplaced inside popover
Comment 1 Beth Dakin 2014-11-06 12:54:03 PST
Created attachment 241126 [details]
Patch
Comment 2 Beth Dakin 2014-11-06 12:57:09 PST
rdar://problem/18898712
Comment 3 Tim Horton 2014-11-06 12:57:55 PST
Comment on attachment 241126 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=241126&action=review

> Source/WebKit2/UIProcess/mac/WKActionMenuController.mm:366
> +    return maxHortizontalTargetSizePreservingAspectRatio;

horizontal is spelled wrong here.
Comment 4 Anders Carlsson 2014-11-06 12:59:06 PST
> Source/WebKit2/UIProcess/mac/WKActionMenuController.mm:328
> +- (BOOL)_targetSize:(NSSize)targetSize fitsInAvailableSpace:(NSSize)availableSpace
> +{
> +    return targetSize.width <= availableSpace.width && targetSize.height <= availableSpace.height;
> +}

I think this should just be a static C function

bool targetSizeFitsInAvailableSpace(NSSize targetSize, NSSize availableSpace) 
{
}

> Source/WebKit2/UIProcess/mac/WKActionMenuController.mm:359
> +    FloatRect maxHortizontalTargetSizePreservingAspectRatioRect = largestRectWithAspectRatioInsideRect(aspectRatio, FloatRect(0, 0, maxSpaceAvailableOnXEdge.width, maxSpaceAvailableOnXEdge.height));

Hortizontal! (Tim Hortizontal)
Comment 5 Beth Dakin 2014-11-06 13:03:55 PST
http://trac.webkit.org/changeset/175710