Bug 186983

Summary: Fix the composition underline to be transformed by -apple-color-filter
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: New BugsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, mmaxfield, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Simon Fraser (smfr) 2018-06-24 16:53:40 PDT
Fix the composition underline to be transformed by -apple-color-filter
Comment 1 Simon Fraser (smfr) 2018-06-24 16:55:16 PDT
Created attachment 343471 [details]
Patch
Comment 2 Simon Fraser (smfr) 2018-06-24 16:55:30 PDT
rdar://problem/40515558
Comment 3 zalan 2018-06-24 17:25:14 PDT
Comment on attachment 343471 [details]
Patch

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

> Source/WebCore/rendering/InlineTextBox.cpp:1172
> +    Color underlineColor = underline.compositionUnderlineColor == CompositionUnderlineColor::TextColor ? renderer().style().visitedDependentColorWithColorFilter(CSSPropertyWebkitTextFillColor) : renderer().style().colorByApplyingColorFilter(underline.color);
> +    context.setStrokeColor(underlineColor);

How do you know when to use the transformed color?
Comment 4 Simon Fraser (smfr) 2018-06-24 18:18:57 PDT
(In reply to zalan from comment #3)
> Comment on attachment 343471 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=343471&action=review
> 
> > Source/WebCore/rendering/InlineTextBox.cpp:1172
> > +    Color underlineColor = underline.compositionUnderlineColor == CompositionUnderlineColor::TextColor ? renderer().style().visitedDependentColorWithColorFilter(CSSPropertyWebkitTextFillColor) : renderer().style().colorByApplyingColorFilter(underline.color);
> > +    context.setStrokeColor(underlineColor);
> 
> How do you know when to use the transformed color?

All the colors we paint with should use the transformed color (except for semantic colors).
Comment 5 WebKit Commit Bot 2018-06-24 18:53:06 PDT
Comment on attachment 343471 [details]
Patch

Clearing flags on attachment: 343471

Committed r233135: <https://trac.webkit.org/changeset/233135>
Comment 6 WebKit Commit Bot 2018-06-24 18:53:07 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 zalan 2018-06-24 18:53:41 PDT
(In reply to Simon Fraser (smfr) from comment #4)
> (In reply to zalan from comment #3)
> > Comment on attachment 343471 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=343471&action=review
> > 
> > > Source/WebCore/rendering/InlineTextBox.cpp:1172
> > > +    Color underlineColor = underline.compositionUnderlineColor == CompositionUnderlineColor::TextColor ? renderer().style().visitedDependentColorWithColorFilter(CSSPropertyWebkitTextFillColor) : renderer().style().colorByApplyingColorFilter(underline.color);
> > > +    context.setStrokeColor(underlineColor);
> > 
> > How do you know when to use the transformed color?
> 
> All the colors we paint with should use the transformed color (except for
> semantic colors).
RenderStyle API does not really give me any guidance in that direction.