Preview popover needs minimum and maximum sizes
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Nov 2014 01:52:41 +0000 (01:52 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Nov 2014 01:52:41 +0000 (01:52 +0000)
commit14fd3a473117eb52399604e57e6300a661c5f4d7
tree5332465236cfe0d2e1f789c01ea058ed6de9ca28
parent85cf1b34fec0826c1ea17d21f187412db60a7fd4
Preview popover needs minimum and maximum sizes
https://bugs.webkit.org/show_bug.cgi?id=138943
-and corresponding-
rdar://problem/18904651

Reviewed by Tim Horton.

This patch enforces minimum and maximum popover sizes. If the popover needs to be
sized up to be above the minimum, it will end up covering some of the
_hitTestResult, so we should compute a new origin rect based on the original
event location.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
(-[WKActionMenuController _previewURLFromActionMenu:]):
(-[WKActionMenuController _createPreviewPopover]):
(-[WKActionMenuController largestPopoverSize]):
(-[WKActionMenuController _preferredPopoverSize]):
(-[WKActionMenuController _preferredSizeForPopoverPresentedFromOriginRect:]): Deleted.

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