iOS WebKit2: selection handles become too large when zooming a page.
authorenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jun 2014 22:42:06 +0000 (22:42 +0000)
committerenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jun 2014 22:42:06 +0000 (22:42 +0000)
commitbc2055da912bd43dffda53862d76f605d2646141
treea06258ac31dbf1afe4c375f89cecfebe9ced5d5d
parent3354ea8eaa246ef426d78ded08a9fd44daf19f31
iOS WebKit2: selection handles become too large when zooming a page.
https://bugs.webkit.org/show_bug.cgi?id=134084
<rdar://problem/16799164>

Reviewed by Benjamin Poulain.

Since the document view is zoomed, we add a subview that has the inverse transform
of the document view. This new view becomes the root for the selection hierarchy.
The new view has zero size, not to interfere with the existing gestures on the WKContenView
therefore we implement hitTest to detect interaction with the selection elements.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView unscaledView]):
(-[WKContentView inverseScale]):
(-[WKContentView _updateUnscaledView]):
(-[WKContentView hitTest:withEvent:::]):
(-[WKContentView selectedTextRange]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/ios/WKContentView.mm
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm