WebKit Bugzilla
Attachment 343471 Details for
Bug 186983
: Fix the composition underline to be transformed by -apple-color-filter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186983-20180624165515.patch (text/plain), 5.49 KB, created by
Simon Fraser (smfr)
on 2018-06-24 16:55:16 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2018-06-24 16:55:16 PDT
Size:
5.49 KB
patch
obsolete
>Subversion Revision: 233132 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8ffb021ad5f848e06fb7849c0c980d8f46447b21..41d06ca513ba28a98d77669ad90a550d56b4057f 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-06-24 Simon Fraser <simon.fraser@apple.com> >+ >+ Fix the composition underline to be transformed by -apple-color-filter >+ https://bugs.webkit.org/show_bug.cgi?id=186983 >+ rdar://problem/40515558 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Transform the composition underline color with the color filter. >+ >+ Test: css3/color-filters/color-filter-composition-underline-color.html >+ >+ * rendering/InlineTextBox.cpp: >+ (WebCore::InlineTextBox::paintCompositionUnderline const): >+ > 2018-06-23 Zalan Bujtas <zalan@apple.com> > > [Mail] Use the Mail Viewer width as the base for resolving horizontal viewport units >diff --git a/Source/WebCore/rendering/InlineTextBox.cpp b/Source/WebCore/rendering/InlineTextBox.cpp >index 3e7e161cbd903bc53c66e7b0c3257eb8bdddeb4f..cea1cd00edb004e37edac5cd4f3060bacf226e6a 100644 >--- a/Source/WebCore/rendering/InlineTextBox.cpp >+++ b/Source/WebCore/rendering/InlineTextBox.cpp >@@ -1168,7 +1168,8 @@ void InlineTextBox::paintCompositionUnderline(PaintInfo& paintInfo, const FloatP > width -= 2; > > GraphicsContext& context = paintInfo.context(); >- context.setStrokeColor(underline.compositionUnderlineColor == CompositionUnderlineColor::TextColor ? renderer().style().visitedDependentColorWithColorFilter(CSSPropertyWebkitTextFillColor) : underline.color); >+ Color underlineColor = underline.compositionUnderlineColor == CompositionUnderlineColor::TextColor ? renderer().style().visitedDependentColorWithColorFilter(CSSPropertyWebkitTextFillColor) : renderer().style().colorByApplyingColorFilter(underline.color); >+ context.setStrokeColor(underlineColor); > context.setStrokeThickness(lineThickness); > context.drawLineForText(FloatPoint(boxOrigin.x() + start, boxOrigin.y() + logicalHeight() - lineThickness), width, renderer().document().printing()); > } >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 497e27a30592338a0d8cff79529b6994dd69f134..6960fc2166fc7152d844db7aa9730e56a4783f1e 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2018-06-24 Simon Fraser <simon.fraser@apple.com> >+ >+ Fix the composition underline to be transformed by -apple-color-filter >+ https://bugs.webkit.org/show_bug.cgi?id=186983 >+ rdar://problem/40515558 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * css3/color-filters/color-filter-composition-underline-color-expected.html: Added. >+ * css3/color-filters/color-filter-composition-underline-color.html: Added. >+ > 2018-06-23 Zalan Bujtas <zalan@apple.com> > > [Mail] Use the Mail Viewer width as the base for resolving horizontal viewport units >diff --git a/LayoutTests/css3/color-filters/color-filter-composition-underline-color-expected.html b/LayoutTests/css3/color-filters/color-filter-composition-underline-color-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..3f162e16ca7898536c8671da08102d4e9bda407d >--- /dev/null >+++ b/LayoutTests/css3/color-filters/color-filter-composition-underline-color-expected.html >@@ -0,0 +1,33 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ enableColorFilter=true ] --> >+<style> >+ div { >+ position: absolute; >+ top: 0; >+ left: 0; >+ } >+ #test { >+ color: green; >+ font: 20px/1 Monospace; >+ outline: none; >+ } >+ #overlapping-top { >+ background: white; >+ width: 100px; >+ height: 15px; >+ } >+ #overlapping-right { >+ background: white; >+ width: 50px; >+ height: 50px; >+ left: 50px; >+ } >+</style> >+<div contenteditable id="test"></div> >+<!-- The overlapping DIVs are hiding the "^^^^^" characters and the caret to show only the composition underline. --> >+<div id="overlapping-top"></div> >+<div id="overlapping-right"></div> >+<script> >+ document.getElementById("test").focus(); >+ if (window.textInputController) >+ textInputController.setMarkedText("^^^^^", 5, 0); >+</script> >diff --git a/LayoutTests/css3/color-filters/color-filter-composition-underline-color.html b/LayoutTests/css3/color-filters/color-filter-composition-underline-color.html >new file mode 100644 >index 0000000000000000000000000000000000000000..75626e2dafccec7ab59d9ca293f291c37ffd21b5 >--- /dev/null >+++ b/LayoutTests/css3/color-filters/color-filter-composition-underline-color.html >@@ -0,0 +1,34 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ enableColorFilter=true ] --> >+<style> >+ div { >+ position: absolute; >+ top: 0; >+ left: 0; >+ } >+ #test { >+ color: rgb(255, 128, 255); >+ font: 20px/1 Monospace; >+ outline: none; >+ -apple-color-filter: invert(1); >+ } >+ #overlapping-top { >+ background: white; >+ width: 100px; >+ height: 15px; >+ } >+ #overlapping-right { >+ background: white; >+ width: 50px; >+ height: 50px; >+ left: 50px; >+ } >+</style> >+<div contenteditable id="test"></div> >+<!-- The overlapping DIVs are hiding the "^^^^^" characters and the caret to show only the composition underline. --> >+<div id="overlapping-top"></div> >+<div id="overlapping-right"></div> >+<script> >+ document.getElementById("test").focus(); >+ if (window.textInputController) >+ textInputController.setMarkedText("^^^^^", 5, 0); >+</script>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186983
: 343471