Bug 186983 - Fix the composition underline to be transformed by -apple-color-filter
Summary: Fix the composition underline to be transformed by -apple-color-filter
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-24 16:53 PDT by Simon Fraser (smfr)
Modified: 2018-06-24 18:53 PDT (History)
5 users (show)

See Also:


Attachments
Patch (5.49 KB, patch)
2018-06-24 16:55 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.