Bug 155996 - Add a style for Data Detectors links
Summary: Add a style for Data Detectors links
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-29 16:49 PDT by Enrica Casucci
Modified: 2016-03-30 16:09 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.14 KB, patch)
2016-03-30 14:57 PDT, Enrica Casucci
sam: 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-03-29 16:49:42 PDT
Based on indication from the data detection engine, we should style some of the links differently.

rdar://problem/25343514
Comment 1 Enrica Casucci 2016-03-30 14:57:42 PDT
Created attachment 275226 [details]
Patch
Comment 2 Sam Weinig 2016-03-30 15:10:52 PDT
Comment on attachment 275226 [details]
Patch

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

> Source/WebCore/editing/cocoa/DataDetection.mm:55
> +const char *dataDetectorsLinkStyle = "-webkit-text-decoration-color:rgb(199, 199, 204); color:initial;";

* on the wrong side.

> Source/WebCore/editing/cocoa/DataDetection.mm:332
> +    isSubResult = length > 1;

Is it really necessary for this calculation to happen in this function? Seems like it would be cleaner to do it at the call site.
Comment 3 Enrica Casucci 2016-03-30 15:14:56 PDT
> > Source/WebCore/editing/cocoa/DataDetection.mm:332
> > +    isSubResult = length > 1;
> 
> Is it really necessary for this calculation to happen in this function?
> Seems like it would be cleaner to do it at the call site.
I believe it makes more sense to do it inside the function where we decide what is a sub result.
Comment 4 Enrica Casucci 2016-03-30 15:16:48 PDT
(In reply to comment #3)
> > > Source/WebCore/editing/cocoa/DataDetection.mm:332
> > > +    isSubResult = length > 1;
> > 
> > Is it really necessary for this calculation to happen in this function?
> > Seems like it would be cleaner to do it at the call site.
> I believe it makes more sense to do it inside the function where we decide
> what is a sub result.

Actually, I think you're correct. I'll change it.
Comment 5 Enrica Casucci 2016-03-30 16:09:56 PDT
Committed revision 198864.