Bug 152189 - _touchEventRegions should return regions in the view's coordinates
Summary: _touchEventRegions should return regions in the view's coordinates
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Beth Dakin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-11 14:33 PST by Beth Dakin
Modified: 2015-12-11 17:23 PST (History)
3 users (show)

See Also:


Attachments
Patch (6.44 KB, patch)
2015-12-11 14:43 PST, Beth Dakin
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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