Bug 132988

Summary: Link search area for touch events is too large in some cases
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: enrica, simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
none
patch2
none
patch3 simon.fraser: review+

Description Antti Koivisto 2014-05-16 04:56:32 PDT
We select nearby links too eagerly with some devices and zoom levels.
Comment 1 Antti Koivisto 2014-05-16 04:56:59 PDT
<rdar://problem/16917843>
Comment 2 Antti Koivisto 2014-05-16 05:06:20 PDT
Created attachment 231568 [details]
patch
Comment 3 Antti Koivisto 2014-05-16 06:45:44 PDT
Created attachment 231570 [details]
patch2
Comment 4 Simon Fraser (smfr) 2014-05-16 09:13:13 PDT
Comment on attachment 231570 [details]
patch2

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

> Source/WebCore/platform/PlatformScreen.h:69
> +    float mainScreenRelativePPI();

Relative to what?
Comment 5 Antti Koivisto 2014-05-16 12:41:06 PDT
Created attachment 231585 [details]
patch3

now with missing PlatformScreen implementation
Comment 6 Antti Koivisto 2014-05-16 12:42:50 PDT
(In reply to comment #4)
> Relative to what?

Relative to the regular iPhone PPI 163.
Comment 7 Simon Fraser (smfr) 2014-05-16 13:14:01 PDT
Comment on attachment 231585 [details]
patch3

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

> Source/WebCore/page/ios/FrameIOS.mm:435
> +    float scale = page() ? page()->pageScaleFactor() : 1;

I don't know how we'd ever get here with a null page.

> Source/WebCore/page/ios/FrameIOS.mm:-469
> -        // We don't approximate the node if we are dragging, we instead force the user to be precise.

Did the code related to this comment disappear some time in the past?

> Source/WebCore/platform/ios/PlatformScreenIOS.mm:102
> +float mainScreenRelativePPI()

This name still confuses me. It sounds more like a screenPPIFactor(), and a comment in the header should say what it's relative to.
Comment 8 Antti Koivisto 2014-05-16 13:22:57 PDT
(In reply to comment #7)
> I don't know how we'd ever get here with a null page.

Probably can't.

> Did the code related to this comment disappear some time in the past?

I think so. It didn't make sense where it was.

> > Source/WebCore/platform/ios/PlatformScreenIOS.mm:102
> > +float mainScreenRelativePPI()
> 
> This name still confuses me. It sounds more like a screenPPIFactor(), and a comment in the header should say what it's relative to.

Will rename, thanks.
Comment 9 Antti Koivisto 2014-05-16 13:54:53 PDT
http://trac.webkit.org/changeset/168977