Bug 153600 - Should avoid navigation for some data detector urls
Summary: Should avoid navigation for some data detector urls
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-28 10:50 PST by Enrica Casucci
Modified: 2016-01-28 11:40 PST (History)
2 users (show)

See Also:


Attachments
Patch (9.74 KB, patch)
2016-01-28 10:58 PST, Enrica Casucci
thorton: 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 2016-01-28 10:50:17 PST
Click on some type of data detector links should not trigger a navigation request.
Comment 1 Enrica Casucci 2016-01-28 10:58:20 PST
Created attachment 270129 [details]
Patch
Comment 2 Tim Horton 2016-01-28 11:03:46 PST
Comment on attachment 270129 [details]
Patch

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

> Source/WebCore/editing/cocoa/DataDetection.mm:66
> +#if PLATFORM(MAC)

None of this code seems iOS specific?

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:682
> +            requestPositionInformation(IntPoint((CGPoint)m_potentialTapLocation));

Why are you going FloatPoint->CGPoint->IntPoint? You should probably use one of the FloatPoint->IntPoint conversion functions (roundedIntPoint?)
Comment 3 Enrica Casucci 2016-01-28 11:35:48 PST
(In reply to comment #2)
> Comment on attachment 270129 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=270129&action=review
> 
> > Source/WebCore/editing/cocoa/DataDetection.mm:66
> > +#if PLATFORM(MAC)
> 
> None of this code seems iOS specific?
It is not, but this behavior is iOS specific. Al least for now.
> 
> > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:682
> > +            requestPositionInformation(IntPoint((CGPoint)m_potentialTapLocation));
> 
> Why are you going FloatPoint->CGPoint->IntPoint? You should probably use one
> of the FloatPoint->IntPoint conversion functions (roundedIntPoint?)
Right! I forgot about that. Will fix it.
Comment 4 Enrica Casucci 2016-01-28 11:40:55 PST
Committed revision 195769.