Preview popovers don't show an arrow for large links
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Dec 2014 00:13:14 +0000 (00:13 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 20 Dec 2014 00:13:14 +0000 (00:13 +0000)
commitdfa687f86c7d8b540fa4bae2875801c6c60ed377
tree67dae0cfd1705cfdd780db5f158fbf4e207b0509
parent1c81bf45f1063c04202fb0bff7643f1c53918c24
Preview popovers don't show an arrow for large links
https://bugs.webkit.org/show_bug.cgi?id=139842
-and corresponding-
<rdar://problem/19301470>

Reviewed by Tim Horton.

This patch addresses the case where the link is so large that there is no
available space on any side once you factor in screen padding. In that case, we
should give up early on not obscuring the link.
* UIProcess/mac/WKPreviewPopoverAnimationController.mm:
(-[WKPreviewPopoverAnimationController _targetSizeForPagePreview]):
(-[WKPreviewPopoverAnimationController _effectivePaddingWithPreviewPadding:]):
(-[WKPreviewPopoverAnimationController _maxSpaceAvailableOnYEdgeForOriginRect:withScreenRect:previewPadding:]):
(-[WKPreviewPopoverAnimationController _maxSpaceAvailableOnXEdgeForOriginRect:withScreenRect:previewPadding:]):
(-[WKPreviewPopoverAnimationController _preferredPopoverSizeWithPreviewPadding:forTargetSize:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177601 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/mac/WKPreviewPopoverAnimationController.mm