Bug 128277 - WK2: Tap highlight is positioned incorrectly in iframes
Summary: WK2: Tap highlight is positioned incorrectly in iframes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-02-05 15:51 PST by Enrica Casucci
Modified: 2014-02-05 17:15 PST (History)
0 users

See Also:


Attachments
Test case (2.44 KB, application/zip)
2014-02-05 15:51 PST, Enrica Casucci
no flags Details
Patch (1.90 KB, patch)
2014-02-05 15:53 PST, Enrica Casucci
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrica Casucci 2014-02-05 15:51:01 PST
Created attachment 223275 [details]
Test case

Open the attached testcase (iframe-page.html) and tap on the link in the iframe. Note that the tap hightlight is offset.

<rdar://problem/15975993>
Comment 1 Enrica Casucci 2014-02-05 15:53:40 PST
Created attachment 223277 [details]
Patch
Comment 2 Benjamin Poulain 2014-02-05 17:00:07 PST
Comment on attachment 223277 [details]
Patch

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

Thanks!

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:328
> +                currentQuad.setP1(view->contentsToRootView(IntPoint(currentQuad.p1())));
> +                currentQuad.setP2(view->contentsToRootView(IntPoint(currentQuad.p2())));
> +                currentQuad.setP3(view->contentsToRootView(IntPoint(currentQuad.p3())));
> +                currentQuad.setP4(view->contentsToRootView(IntPoint(currentQuad.p4())));

Can you please file a bug to me to convert this to floating point?
Comment 3 Simon Fraser (smfr) 2014-02-05 17:12:08 PST
Comment on attachment 223277 [details]
Patch

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

>> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:328
>> +                currentQuad.setP1(view->contentsToRootView(IntPoint(currentQuad.p1())));
>> +                currentQuad.setP2(view->contentsToRootView(IntPoint(currentQuad.p2())));
>> +                currentQuad.setP3(view->contentsToRootView(IntPoint(currentQuad.p3())));
>> +                currentQuad.setP4(view->contentsToRootView(IntPoint(currentQuad.p4())));
> 
> Can you please file a bug to me to convert this to floating point?

It sucks that we all the mapping 4 times (it can be expensive). We should have a way to convert a set of points all at the same time too.
Comment 4 Enrica Casucci 2014-02-05 17:15:44 PST
(In reply to comment #3)
> (From update of attachment 223277 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=223277&action=review
> 
> >> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:328
> >> +                currentQuad.setP1(view->contentsToRootView(IntPoint(currentQuad.p1())));
> >> +                currentQuad.setP2(view->contentsToRootView(IntPoint(currentQuad.p2())));
> >> +                currentQuad.setP3(view->contentsToRootView(IntPoint(currentQuad.p3())));
> >> +                currentQuad.setP4(view->contentsToRootView(IntPoint(currentQuad.p4())));
> > 
> > Can you please file a bug to me to convert this to floating point?
> 
> It sucks that we all the mapping 4 times (it can be expensive). We should have a way to convert a set of points all at the same time too.

The upside is that we do this conversion only for tap highlight and only if it is not the main frame.
Comment 5 Enrica Casucci 2014-02-05 17:15:53 PST
Committed revision 163499.