Bug 152189

Summary: _touchEventRegions should return regions in the view's coordinates
Product: WebKit Reporter: Beth Dakin <bdakin>
Component: WebKit APIAssignee: Beth Dakin <bdakin>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, mitz, simon.fraser
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mitz: review+

Description Beth Dakin 2015-12-11 14:33:55 PST
_touchEventRegions should return regions in the view's coordinates

rdar://problem/23188605
Comment 1 Beth Dakin 2015-12-11 14:43:51 PST
Created attachment 267191 [details]
Patch
Comment 2 mitz 2015-12-11 14:57:42 PST
Comment on attachment 267191 [details]
Patch

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

> Source/WebKit/mac/WebView/WebView.mm:3745
> +        IntRect viewRect = IntRect([[[[self _selectedOrMainFrame] frameView] documentView] convertRect:rect toView:self]);

I think this should always be the main frame.
Comment 3 Simon Fraser (smfr) 2015-12-11 15:28:23 PST
Comment on attachment 267191 [details]
Patch

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

> Source/WebKit/mac/WebView/WebView.mm:3745
> +        IntRect viewRect = IntRect([[[[self _selectedOrMainFrame] frameView] documentView] convertRect:rect toView:self]);

You should fetch [[[[self _selectedOrMainFrame] frameView] documentView] outside the loop, rather than calling it once per rect (possibly thousands of them).
Comment 4 Beth Dakin 2015-12-11 17:23:03 PST
Thank you! http://trac.webkit.org/changeset/193997