Bug 155996

Summary: Add a style for Data Detectors links
Product: WebKit Reporter: Enrica Casucci <enrica>
Component: WebCore Misc.Assignee: Enrica Casucci <enrica>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, sam, thorton
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch sam: review+

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.