Log Message
Fix color-filter to apply to text decorations https://bugs.webkit.org/show_bug.cgi?id=185068 <rdar://problem/39782136>
Reviewed by Alan Bujtas.
Source/WebCore:
Transform the colors of text shadows, and the shadows of text-decorations through
the color-filter.
Rather than clone the ShadowData stored on TextPainter and TextDecorationPainter
(which would have awkward ownership implications) we pass the color filters through
and just map the color through it before painting.
Re-order the members of TextPainter a little to optimize padding.
Also fix a bug where FilterOperations::transformColor() could transform an invalid
color to a valid one; we never want this.
Tests: css3/color-filters/color-filter-text-decoration-shadow.html
css3/color-filters/color-filter-text-shadow.html
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::transformColor const):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintMarkedTextForeground):
(WebCore::InlineTextBox::paintMarkedTextDecoration):
* rendering/TextDecorationPainter.cpp:
(WebCore::TextDecorationPainter::paintTextDecoration):
* rendering/TextDecorationPainter.h:
(WebCore::TextDecorationPainter::setTextShadow):
(WebCore::TextDecorationPainter::setShadowColorFilter):
(WebCore::TextDecorationPainter::addTextShadow): Deleted.
* rendering/TextPainter.cpp:
(WebCore::ShadowApplier::ShadowApplier):
(WebCore::TextPainter::paintTextWithShadows):
(WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded): Simplify the logic that only paints the shadow
on the first iteration.
(WebCore::TextPainter::paintRange):
* rendering/TextPainter.h:
(WebCore::TextPainter::setShadowColorFilter):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintTextWithShadows):
LayoutTests:
* css3/color-filters/color-filter-text-decoration-shadow-expected.html: Added.
* css3/color-filters/color-filter-text-decoration-shadow.html: Added.
* css3/color-filters/color-filter-text-shadow-expected.html: Added.
* css3/color-filters/color-filter-text-shadow.html: Added.
Modified Paths
- trunk/LayoutTests/ChangeLog
- trunk/Source/WebCore/ChangeLog
- trunk/Source/WebCore/platform/graphics/filters/FilterOperations.cpp
- trunk/Source/WebCore/rendering/InlineTextBox.cpp
- trunk/Source/WebCore/rendering/TextDecorationPainter.cpp
- trunk/Source/WebCore/rendering/TextDecorationPainter.h
- trunk/Source/WebCore/rendering/TextPainter.cpp
- trunk/Source/WebCore/rendering/TextPainter.h
- trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
Added Paths
- trunk/LayoutTests/css3/color-filters/color-filter-text-decoration-shadow-expected.html
- trunk/LayoutTests/css3/color-filters/color-filter-text-decoration-shadow.html
- trunk/LayoutTests/css3/color-filters/color-filter-text-shadow-expected.html
- trunk/LayoutTests/css3/color-filters/color-filter-text-shadow.html
Diff
Modified: trunk/LayoutTests/ChangeLog (231099 => 231100)
--- trunk/LayoutTests/ChangeLog 2018-04-27 16:09:49 UTC (rev 231099)
+++ trunk/LayoutTests/ChangeLog 2018-04-27 16:11:12 UTC (rev 231100)
@@ -1,3 +1,16 @@
+2018-04-26 Simon Fraser <[email protected]>
+
+ Fix color-filter to apply to text decorations
+ https://bugs.webkit.org/show_bug.cgi?id=185068
+ <rdar://problem/39782136>
+
+ Reviewed by Alan Bujtas.
+
+ * css3/color-filters/color-filter-text-decoration-shadow-expected.html: Added.
+ * css3/color-filters/color-filter-text-decoration-shadow.html: Added.
+ * css3/color-filters/color-filter-text-shadow-expected.html: Added.
+ * css3/color-filters/color-filter-text-shadow.html: Added.
+
2018-04-27 Per Arne Vollan <[email protected]>
Mark CSS color filters tests as failing on Windows.
Added: trunk/LayoutTests/css3/color-filters/color-filter-text-decoration-shadow-expected.html (0 => 231100)
--- trunk/LayoutTests/css3/color-filters/color-filter-text-decoration-shadow-expected.html (rev 0)
+++ trunk/LayoutTests/css3/color-filters/color-filter-text-decoration-shadow-expected.html 2018-04-27 16:11:12 UTC (rev 231100)
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS Test: color-filter reference</title>
+ <link rel="author" title="Apple" href=""
+
+ <style type="text/css">
+ .test
+ {
+ font: 120px sans-serif;
+ color: green;
+ margin: 100px 20px;
+ text-decoration: underline overline line-through;
+ }
+
+ .single
+ {
+ text-shadow: 150px 0 0 yellow;
+ }
+
+ .multiple
+ {
+ text-shadow: 150px 0 0 yellow, 300px 0 0 cyan;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="test single">O</div>
+ <div class="test multiple">O</div>
+ </body>
+</html>
Added: trunk/LayoutTests/css3/color-filters/color-filter-text-decoration-shadow.html (0 => 231100)
--- trunk/LayoutTests/css3/color-filters/color-filter-text-decoration-shadow.html (rev 0)
+++ trunk/LayoutTests/css3/color-filters/color-filter-text-decoration-shadow.html 2018-04-27 16:11:12 UTC (rev 231100)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS Test: color-filter affects text decoration shadows</title>
+ <link rel="author" title="Apple" href=""
+ <link rel="match" href=""
+
+ <meta name="assert" content="color-filter affects text decoration shadows">
+ <style type="text/css">
+ .test
+ {
+ font: 120px sans-serif;
+ color: rgb(255, 128, 255);
+ color-filter: invert();
+ margin: 100px 20px;
+ text-decoration: underline overline line-through;
+ }
+
+ .single
+ {
+ text-shadow: 150px 0 0 blue;
+ }
+
+ .multiple
+ {
+ text-shadow: 150px 0 0 blue, 300px 0 0 red;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="test single">O</div>
+ <div class="test multiple">O</div>
+ </body>
+</html>
Added: trunk/LayoutTests/css3/color-filters/color-filter-text-shadow-expected.html (0 => 231100)
--- trunk/LayoutTests/css3/color-filters/color-filter-text-shadow-expected.html (rev 0)
+++ trunk/LayoutTests/css3/color-filters/color-filter-text-shadow-expected.html 2018-04-27 16:11:12 UTC (rev 231100)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS Test: color-filter reference</title>
+ <link rel="author" title="Apple" href=""
+
+ <style type="text/css">
+ .test
+ {
+ font: 120px Ahem;
+ color: green;
+ margin: 100px 20px;
+ }
+
+ .single
+ {
+ text-shadow: 50px 50px 0 yellow;
+ }
+
+ .multiple
+ {
+ text-shadow: 50px 50px 0 yellow, 100px 100px 0 cyan;
+ }
+ </style>
+ </head>
+ <body>
+ <p>At the top you should see a green square with a yellow shadow.</p>
+ <p>Below is a green square with a yellow shadow and a cyan shadow.</p>
+ <div class="test single">A</div>
+ <div class="test multiple">A</div>
+ </body>
+</html>
Added: trunk/LayoutTests/css3/color-filters/color-filter-text-shadow.html (0 => 231100)
--- trunk/LayoutTests/css3/color-filters/color-filter-text-shadow.html (rev 0)
+++ trunk/LayoutTests/css3/color-filters/color-filter-text-shadow.html 2018-04-27 16:11:12 UTC (rev 231100)
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>CSS Test: color-filter affects the text shadow</title>
+ <link rel="author" title="Apple" href=""
+ <link rel="match" href=""
+
+ <meta name="assert" content="color-filter affects the color of text-shadow">
+ <style type="text/css">
+ .test
+ {
+ font: 120px Ahem;
+ color: rgb(255, 128, 255);
+ color-filter: invert();
+ margin: 100px 20px;
+ }
+
+ .single
+ {
+ text-shadow: 50px 50px 0 blue;
+ }
+
+ .multiple
+ {
+ text-shadow: 50px 50px 0 blue, 100px 100px 0 red;
+ }
+ </style>
+ <script>
+ if (window.internals)
+ internals.settings.setColorFilterEnabled(true);
+ </script>
+ </head>
+ <body>
+ <p>At the top you should see a green square with a yellow shadow.</p>
+ <p>Below is a green square with a yellow shadow and a cyan shadow.</p>
+ <div class="test single">A</div>
+ <div class="test multiple">A</div>
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (231099 => 231100)
--- trunk/Source/WebCore/ChangeLog 2018-04-27 16:09:49 UTC (rev 231099)
+++ trunk/Source/WebCore/ChangeLog 2018-04-27 16:11:12 UTC (rev 231100)
@@ -1,3 +1,48 @@
+2018-04-26 Simon Fraser <[email protected]>
+
+ Fix color-filter to apply to text decorations
+ https://bugs.webkit.org/show_bug.cgi?id=185068
+ <rdar://problem/39782136>
+
+ Reviewed by Alan Bujtas.
+
+ Transform the colors of text shadows, and the shadows of text-decorations through
+ the color-filter.
+
+ Rather than clone the ShadowData stored on TextPainter and TextDecorationPainter
+ (which would have awkward ownership implications) we pass the color filters through
+ and just map the color through it before painting.
+
+ Re-order the members of TextPainter a little to optimize padding.
+
+ Also fix a bug where FilterOperations::transformColor() could transform an invalid
+ color to a valid one; we never want this.
+
+ Tests: css3/color-filters/color-filter-text-decoration-shadow.html
+ css3/color-filters/color-filter-text-shadow.html
+
+ * platform/graphics/filters/FilterOperations.cpp:
+ (WebCore::FilterOperations::transformColor const):
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::paintMarkedTextForeground):
+ (WebCore::InlineTextBox::paintMarkedTextDecoration):
+ * rendering/TextDecorationPainter.cpp:
+ (WebCore::TextDecorationPainter::paintTextDecoration):
+ * rendering/TextDecorationPainter.h:
+ (WebCore::TextDecorationPainter::setTextShadow):
+ (WebCore::TextDecorationPainter::setShadowColorFilter):
+ (WebCore::TextDecorationPainter::addTextShadow): Deleted.
+ * rendering/TextPainter.cpp:
+ (WebCore::ShadowApplier::ShadowApplier):
+ (WebCore::TextPainter::paintTextWithShadows):
+ (WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded): Simplify the logic that only paints the shadow
+ on the first iteration.
+ (WebCore::TextPainter::paintRange):
+ * rendering/TextPainter.h:
+ (WebCore::TextPainter::setShadowColorFilter):
+ * rendering/svg/SVGInlineTextBox.cpp:
+ (WebCore::SVGInlineTextBox::paintTextWithShadows):
+
2018-04-27 Wenson Hsieh <[email protected]>
Rename minimumLayoutSize to viewLayoutSize
Modified: trunk/Source/WebCore/platform/graphics/filters/FilterOperations.cpp (231099 => 231100)
--- trunk/Source/WebCore/platform/graphics/filters/FilterOperations.cpp 2018-04-27 16:09:49 UTC (rev 231099)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterOperations.cpp 2018-04-27 16:11:12 UTC (rev 231100)
@@ -122,7 +122,7 @@
bool FilterOperations::transformColor(Color& color) const
{
- if (isEmpty())
+ if (isEmpty() || !color.isValid())
return false;
FloatComponents components;
Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (231099 => 231100)
--- trunk/Source/WebCore/rendering/InlineTextBox.cpp 2018-04-27 16:09:49 UTC (rev 231099)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp 2018-04-27 16:11:12 UTC (rev 231100)
@@ -1012,8 +1012,9 @@
textPainter.setStyle(markedText.style.textStyles);
textPainter.setIsHorizontal(isHorizontal());
if (markedText.style.textShadow) {
- // FIXME: need to transform shadow color here.
textPainter.setShadow(&markedText.style.textShadow.value());
+ if (lineStyle.hasColorFilter())
+ textPainter.setShadowColorFilter(&lineStyle.colorFilter());
}
textPainter.setEmphasisMark(emphasisMark, emphasisMarkOffset, combinedText());
@@ -1067,8 +1068,9 @@
decorationPainter.setBaseline(lineStyle().fontMetrics().ascent());
decorationPainter.setIsHorizontal(isHorizontal());
if (markedText.style.textShadow) {
- // FIXME: transform shadow color.
- decorationPainter.addTextShadow(&markedText.style.textShadow.value());
+ decorationPainter.setTextShadow(&markedText.style.textShadow.value());
+ if (lineStyle().hasColorFilter())
+ decorationPainter.setShadowColorFilter(&lineStyle().colorFilter());
}
{
Modified: trunk/Source/WebCore/rendering/TextDecorationPainter.cpp (231099 => 231100)
--- trunk/Source/WebCore/rendering/TextDecorationPainter.cpp 2018-04-27 16:09:49 UTC (rev 231099)
+++ trunk/Source/WebCore/rendering/TextDecorationPainter.cpp 2018-04-27 16:11:12 UTC (rev 231100)
@@ -325,7 +325,11 @@
}
int shadowX = m_isHorizontal ? shadow->x() : shadow->y();
int shadowY = m_isHorizontal ? shadow->y() : -shadow->x();
- m_context.setShadow(FloatSize(shadowX, shadowY - extraOffset), shadow->radius(), shadow->color());
+
+ Color shadowColor = shadow->color();
+ if (m_shadowColorFilter)
+ m_shadowColorFilter->transformColor(shadowColor);
+ m_context.setShadow(FloatSize(shadowX, shadowY - extraOffset), shadow->radius(), shadowColor);
shadow = shadow->next();
}
Modified: trunk/Source/WebCore/rendering/TextDecorationPainter.h (231099 => 231100)
--- trunk/Source/WebCore/rendering/TextDecorationPainter.h 2018-04-27 16:09:49 UTC (rev 231099)
+++ trunk/Source/WebCore/rendering/TextDecorationPainter.h 2018-04-27 16:11:12 UTC (rev 231100)
@@ -50,7 +50,8 @@
void setIsHorizontal(bool isHorizontal) { m_isHorizontal = isHorizontal; }
void setWidth(float width) { m_width = width; }
void setBaseline(float baseline) { m_baseline = baseline; }
- void addTextShadow(const ShadowData* textShadow) { m_shadow = textShadow; }
+ void setTextShadow(const ShadowData* textShadow) { m_shadow = textShadow; }
+ void setShadowColorFilter(const FilterOperations* colorFilter) { m_shadowColorFilter = colorFilter; }
void paintTextDecoration(const TextRun&, const FloatPoint& textOrigin, const FloatPoint& boxOrigin);
@@ -78,6 +79,7 @@
bool m_isPrinting;
bool m_isHorizontal { true };
const ShadowData* m_shadow { nullptr };
+ const FilterOperations* m_shadowColorFilter { nullptr };
const InlineTextBox* m_inlineTextBox { nullptr };
const FontCascade* m_font { nullptr };
Modified: trunk/Source/WebCore/rendering/TextPainter.cpp (231099 => 231100)
--- trunk/Source/WebCore/rendering/TextPainter.cpp 2018-04-27 16:09:49 UTC (rev 231099)
+++ trunk/Source/WebCore/rendering/TextPainter.cpp 2018-04-27 16:11:12 UTC (rev 231100)
@@ -33,7 +33,7 @@
namespace WebCore {
-ShadowApplier::ShadowApplier(GraphicsContext& context, const ShadowData* shadow, const FloatRect& textRect, bool lastShadowIterationShouldDrawText, bool opaque, FontOrientation orientation)
+ShadowApplier::ShadowApplier(GraphicsContext& context, const ShadowData* shadow, const FilterOperations* colorFilter, const FloatRect& textRect, bool lastShadowIterationShouldDrawText, bool opaque, FontOrientation orientation)
: m_context { context }
, m_shadow { shadow }
, m_onlyDrawsShadow { !isLastShadowIteration() || !lastShadowIterationShouldDrawText }
@@ -50,7 +50,9 @@
int shadowY = orientation == Horizontal ? shadow->y() : -shadow->x();
FloatSize shadowOffset(shadowX, shadowY);
int shadowRadius = shadow->radius();
- const Color& shadowColor = shadow->color();
+ Color shadowColor = shadow->color();
+ if (colorFilter)
+ colorFilter->transformColor(shadowColor);
// When drawing shadows, we usually clip the context to the area the shadow will reside, and then
// draw the text itself outside the clipped area (so only the shadow shows up). However, we can
@@ -114,7 +116,7 @@
m_glyphDisplayList = nullptr;
}
-void TextPainter::paintTextWithShadows(const ShadowData* shadow, const FontCascade& font, const TextRun& textRun, const FloatRect& boxRect, const FloatPoint& textOrigin,
+void TextPainter::paintTextWithShadows(const ShadowData* shadow, const FilterOperations* colorFilter, const FontCascade& font, const TextRun& textRun, const FloatRect& boxRect, const FloatPoint& textOrigin,
unsigned startOffset, unsigned endOffset, const AtomicString& emphasisMark, float emphasisMarkOffset, bool stroked)
{
if (!shadow) {
@@ -128,7 +130,7 @@
if (!opaque)
m_context.setFillColor(Color::black);
while (shadow) {
- ShadowApplier shadowApplier(m_context, shadow, boxRect, lastShadowIterationShouldDrawText, opaque, m_textBoxIsHorizontal ? Horizontal : Vertical);
+ ShadowApplier shadowApplier(m_context, shadow, colorFilter, boxRect, lastShadowIterationShouldDrawText, opaque, m_textBoxIsHorizontal ? Horizontal : Vertical);
if (!shadowApplier.nothingToDraw())
paintTextOrEmphasisMarks(font, textRun, emphasisMark, emphasisMarkOffset, textOrigin + shadowApplier.extraOffset(), startOffset, endOffset);
shadow = shadow->next();
@@ -142,27 +144,28 @@
}
void TextPainter::paintTextAndEmphasisMarksIfNeeded(const TextRun& textRun, const FloatRect& boxRect, const FloatPoint& textOrigin, unsigned startOffset, unsigned endOffset,
- const TextPaintStyle& paintStyle, const ShadowData* shadow)
+ const TextPaintStyle& paintStyle, const ShadowData* shadow, const FilterOperations* shadowColorFilter)
{
if (paintStyle.paintOrder == PaintOrder::Normal) {
// FIXME: Truncate right-to-left text correctly.
- paintTextWithShadows(shadow, *m_font, textRun, boxRect, textOrigin, startOffset, endOffset, nullAtom(), 0, paintStyle.strokeWidth > 0);
+ paintTextWithShadows(shadow, shadowColorFilter, *m_font, textRun, boxRect, textOrigin, startOffset, endOffset, nullAtom(), 0, paintStyle.strokeWidth > 0);
} else {
- bool paintShadow = true;
auto textDrawingMode = m_context.textDrawingMode();
auto paintOrder = RenderStyle::paintTypesForPaintOrder(paintStyle.paintOrder);
+ auto shadowToUse = shadow;
+
for (auto order : paintOrder) {
switch (order) {
case PaintType::Fill:
m_context.setTextDrawingMode(textDrawingMode & ~TextModeStroke);
- paintTextWithShadows(paintShadow ? shadow : nullptr, *m_font, textRun, boxRect, textOrigin, startOffset, endOffset, nullAtom(), 0, false);
- paintShadow = false;
+ paintTextWithShadows(shadowToUse, shadowColorFilter, *m_font, textRun, boxRect, textOrigin, startOffset, endOffset, nullAtom(), 0, false);
+ shadowToUse = nullptr;
m_context.setTextDrawingMode(textDrawingMode);
break;
case PaintType::Stroke:
m_context.setTextDrawingMode(textDrawingMode & ~TextModeFill);
- paintTextWithShadows(paintShadow ? shadow : nullptr, *m_font, textRun, boxRect, textOrigin, startOffset, endOffset, nullAtom(), 0, paintStyle.strokeWidth > 0);
- paintShadow = false;
+ paintTextWithShadows(shadowToUse, shadowColorFilter, *m_font, textRun, boxRect, textOrigin, startOffset, endOffset, nullAtom(), 0, paintStyle.strokeWidth > 0);
+ shadowToUse = nullptr;
m_context.setTextDrawingMode(textDrawingMode);
break;
case PaintType::Markers:
@@ -183,7 +186,7 @@
m_context.concatCTM(rotation(boxRect, Clockwise));
// FIXME: Truncate right-to-left text correctly.
- paintTextWithShadows(shadow, m_combinedText ? m_combinedText->originalFont() : *m_font, emphasisMarkTextRun, boxRect, emphasisMarkTextOrigin, startOffset, endOffset,
+ paintTextWithShadows(shadow, shadowColorFilter, m_combinedText ? m_combinedText->originalFont() : *m_font, emphasisMarkTextRun, boxRect, emphasisMarkTextOrigin, startOffset, endOffset,
m_emphasisMark, m_emphasisMarkOffset, paintStyle.strokeWidth > 0);
if (m_combinedText)
@@ -202,7 +205,7 @@
GraphicsContextStateSaver stateSaver(m_context, m_style.strokeWidth > 0);
updateGraphicsContext(m_context, m_style);
- paintTextAndEmphasisMarksIfNeeded(textRun, boxRect, textOrigin, start, end, m_style, m_shadow);
+ paintTextAndEmphasisMarksIfNeeded(textRun, boxRect, textOrigin, start, end, m_style, m_shadow, m_shadowColorFilter);
}
void TextPainter::clearGlyphDisplayLists()
Modified: trunk/Source/WebCore/rendering/TextPainter.h (231099 => 231100)
--- trunk/Source/WebCore/rendering/TextPainter.h 2018-04-27 16:09:49 UTC (rev 231099)
+++ trunk/Source/WebCore/rendering/TextPainter.h 2018-04-27 16:11:12 UTC (rev 231100)
@@ -52,6 +52,7 @@
void setStyle(const TextPaintStyle& textPaintStyle) { m_style = textPaintStyle; }
void setShadow(const ShadowData* shadow) { m_shadow = shadow; }
+ void setShadowColorFilter(const FilterOperations* colorFilter) { m_shadowColorFilter = colorFilter; }
void setFont(const FontCascade& font) { m_font = &font; }
void setIsHorizontal(bool isHorizontal) { m_textBoxIsHorizontal = isHorizontal; }
void setEmphasisMark(const AtomicString& mark, float offset, const RenderCombineText*);
@@ -77,20 +78,21 @@
private:
void paintTextOrEmphasisMarks(const FontCascade&, const TextRun&, const AtomicString& emphasisMark, float emphasisMarkOffset,
const FloatPoint& textOrigin, unsigned startOffset, unsigned endOffset);
- void paintTextWithShadows(const ShadowData*, const FontCascade&, const TextRun&, const FloatRect& boxRect, const FloatPoint& textOrigin,
+ void paintTextWithShadows(const ShadowData*, const FilterOperations*, const FontCascade&, const TextRun&, const FloatRect& boxRect, const FloatPoint& textOrigin,
unsigned startOffset, unsigned endOffset, const AtomicString& emphasisMark, float emphasisMarkOffset, bool stroked);
void paintTextAndEmphasisMarksIfNeeded(const TextRun&, const FloatRect& boxRect, const FloatPoint& textOrigin, unsigned startOffset, unsigned endOffset,
- const TextPaintStyle&, const ShadowData*);
+ const TextPaintStyle&, const ShadowData*, const FilterOperations*);
GraphicsContext& m_context;
const FontCascade* m_font { nullptr };
TextPaintStyle m_style;
+ AtomicString m_emphasisMark;
const ShadowData* m_shadow { nullptr };
- AtomicString m_emphasisMark;
+ const FilterOperations* m_shadowColorFilter { nullptr };
const RenderCombineText* m_combinedText { nullptr };
+ DisplayList::DisplayList* m_glyphDisplayList { nullptr };
float m_emphasisMarkOffset { 0 };
bool m_textBoxIsHorizontal { true };
- DisplayList::DisplayList* m_glyphDisplayList { nullptr };
};
inline void TextPainter::setEmphasisMark(const AtomicString& mark, float offset, const RenderCombineText* combinedText)
@@ -102,7 +104,7 @@
class ShadowApplier {
public:
- ShadowApplier(GraphicsContext&, const ShadowData*, const FloatRect& textRect, bool lastShadowIterationShouldDrawText = true, bool opaque = false, FontOrientation = Horizontal);
+ ShadowApplier(GraphicsContext&, const ShadowData*, const FilterOperations* colorFilter, const FloatRect& textRect, bool lastShadowIterationShouldDrawText = true, bool opaque = false, FontOrientation = Horizontal);
FloatSize extraOffset() const { return m_extraOffset; }
bool nothingToDraw() const { return m_nothingToDraw; }
bool didSaveContext() const { return m_didSaveContext; }
Modified: trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp (231099 => 231100)
--- trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp 2018-04-27 16:09:49 UTC (rev 231099)
+++ trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp 2018-04-27 16:11:12 UTC (rev 231100)
@@ -562,7 +562,7 @@
break;
{
- ShadowApplier shadowApplier(*usedContext, shadow, shadowRect);
+ ShadowApplier shadowApplier(*usedContext, shadow, nullptr, shadowRect);
if (!shadowApplier.didSaveContext())
usedContext->save();
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
