Services overlay dropdown is often in the wrong place with zoomed pages or horizontal...
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Aug 2014 16:19:37 +0000 (16:19 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Aug 2014 16:19:37 +0000 (16:19 +0000)
commit6d528c56e090cc6728b0016c0a6091d2c66e751e
tree16b6ffe38b28df20d01a8ddba4848b202f00fa6a
parent82907ed06aa19ed3f8f7ba56ac7c074de8441e41
Services overlay dropdown is often in the wrong place with zoomed pages or horizontal scrolling
https://bugs.webkit.org/show_bug.cgi?id=135755
<rdar://problem/17907752>

Reviewed by Brady Eidson.

* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight):
(WebKit::ServicesOverlayController::maybeCreateSelectionHighlight):
DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection adjusts the
location of the button based on the visible rect, trying to keep the button visible.

We're handing it the wrong visible rect, though, not taking scrolling into account.

This leads to pages that scroll horizontally showing the button on the left
even if there's space for it on the right, or sometimes not showing it at all.

Instead, provide the actual main FrameView visible rect; the same coordinate
space that the highlight rects are provided in.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm