Fix the composition underline to be transformed by -apple-color-filter
Created attachment 343471 [details] Patch
rdar://problem/40515558
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?
(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 on attachment 343471 [details] Patch Clearing flags on attachment: 343471 Committed r233135: <https://trac.webkit.org/changeset/233135>
All reviewed patches have been landed. Closing bug.
(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.