WebKit Bugzilla
Attachment 338969 Details for
Bug 185068
: Fix color-filter to apply to text decorations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185068-20180426220830.patch (text/plain), 22.92 KB, created by
Simon Fraser (smfr)
on 2018-04-26 22:08:31 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2018-04-26 22:08:31 PDT
Size:
22.92 KB
patch
obsolete
>Subversion Revision: 231084 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index bc57ac471c61216b8f929037ba0dc5d27e30527c..e102e27c43109e548dfdc96485648d4a63cb7713 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,48 @@ >+2018-04-26 Simon Fraser <simon.fraser@apple.com> >+ >+ Fix color-filter to apply to text decorations >+ https://bugs.webkit.org/show_bug.cgi?id=185068 >+ <rdar://problem/39782136> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-26 Justin Fan <justin_fan@apple.com> > > tex[Sub]Image2D slow when passing in a <canvas>, faster with ImageData. >diff --git a/Source/WebCore/platform/graphics/filters/FilterOperations.cpp b/Source/WebCore/platform/graphics/filters/FilterOperations.cpp >index 6dbeac890e596f51ef966bc78673606e1fb81a88..0273ac2337459090f6e600e2f2c6cd9c8f6324ec 100644 >--- a/Source/WebCore/platform/graphics/filters/FilterOperations.cpp >+++ b/Source/WebCore/platform/graphics/filters/FilterOperations.cpp >@@ -122,7 +122,7 @@ FilterOutsets FilterOperations::outsets() const > > bool FilterOperations::transformColor(Color& color) const > { >- if (isEmpty()) >+ if (isEmpty() || !color.isValid()) > return false; > > FloatComponents components; >diff --git a/Source/WebCore/rendering/InlineTextBox.cpp b/Source/WebCore/rendering/InlineTextBox.cpp >index 0a7397385e15dec5df850479c3dc3695fd80ca93..5a859bbd30779ddf37b8b867675fde57caa8816b 100644 >--- a/Source/WebCore/rendering/InlineTextBox.cpp >+++ b/Source/WebCore/rendering/InlineTextBox.cpp >@@ -1012,8 +1012,9 @@ void InlineTextBox::paintMarkedTextForeground(PaintInfo& paintInfo, const FloatR > 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 @@ void InlineTextBox::paintMarkedTextDecoration(PaintInfo& paintInfo, const FloatR > 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()); > } > > { >diff --git a/Source/WebCore/rendering/TextDecorationPainter.cpp b/Source/WebCore/rendering/TextDecorationPainter.cpp >index f87ce1b5f334bdc147edfe76205c59beaa7808d8..fdb3672c5d8bb02998b98ebc219294854fb621d3 100644 >--- a/Source/WebCore/rendering/TextDecorationPainter.cpp >+++ b/Source/WebCore/rendering/TextDecorationPainter.cpp >@@ -325,7 +325,11 @@ void TextDecorationPainter::paintTextDecoration(const TextRun& textRun, const Fl > } > 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(); > } > >diff --git a/Source/WebCore/rendering/TextDecorationPainter.h b/Source/WebCore/rendering/TextDecorationPainter.h >index ec47498214a347d64610edd16477528f754bb92a..ac749af87499fcbaf50c6100fabf7588e41b57da 100644 >--- a/Source/WebCore/rendering/TextDecorationPainter.h >+++ b/Source/WebCore/rendering/TextDecorationPainter.h >@@ -50,7 +50,8 @@ public: > 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 @@ private: > 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 }; > >diff --git a/Source/WebCore/rendering/TextPainter.cpp b/Source/WebCore/rendering/TextPainter.cpp >index e59dbf6b191446ee6b4fc4584d7d8a6e9b0e7f05..25ff5d102b5ea68b5cc8ed9ed83ce24794513c4c 100644 >--- a/Source/WebCore/rendering/TextPainter.cpp >+++ b/Source/WebCore/rendering/TextPainter.cpp >@@ -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 @@ ShadowApplier::ShadowApplier(GraphicsContext& context, const ShadowData* shadow, > 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 @@ void TextPainter::paintTextOrEmphasisMarks(const FontCascade& font, const TextRu > 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 @@ void TextPainter::paintTextWithShadows(const ShadowData* shadow, const FontCasca > 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::paintTextWithShadows(const ShadowData* shadow, const FontCasca > } > > 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 @@ void TextPainter::paintTextAndEmphasisMarksIfNeeded(const TextRun& textRun, cons > 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 @@ void TextPainter::paintRange(const TextRun& textRun, const FloatRect& boxRect, c > > 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() >diff --git a/Source/WebCore/rendering/TextPainter.h b/Source/WebCore/rendering/TextPainter.h >index 2f1b15961af6ace7a4ce63f8d9f1f61ff2c6f02a..c2bfda121bb96de0651c7bf6e167e8e91f1df201 100644 >--- a/Source/WebCore/rendering/TextPainter.h >+++ b/Source/WebCore/rendering/TextPainter.h >@@ -52,6 +52,7 @@ public: > > 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 @@ public: > 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; >- const ShadowData* m_shadow { nullptr }; > AtomicString m_emphasisMark; >+ const ShadowData* m_shadow { nullptr }; >+ 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 @@ inline void TextPainter::setEmphasisMark(const AtomicString& mark, float offset, > > 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; } >diff --git a/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp b/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp >index 45268e93ccea0e34fabf13faf8debe2e6bca0480..c1fc4a88fcf104de8ae68dc214e2227560655e72 100644 >--- a/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp >+++ b/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp >@@ -562,7 +562,7 @@ void SVGInlineTextBox::paintTextWithShadows(GraphicsContext& context, const Rend > break; > > { >- ShadowApplier shadowApplier(*usedContext, shadow, shadowRect); >+ ShadowApplier shadowApplier(*usedContext, shadow, nullptr, shadowRect); > > if (!shadowApplier.didSaveContext()) > usedContext->save(); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index fb73003471b0b8039570baf3b72bb48a687e9e49..688c40d3f86e79e624d822b191f622b3b98d5d65 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2018-04-26 Simon Fraser <simon.fraser@apple.com> >+ >+ Fix color-filter to apply to text decorations >+ https://bugs.webkit.org/show_bug.cgi?id=185068 >+ <rdar://problem/39782136> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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-26 Simon Fraser <simon.fraser@apple.com> > > Implement rendering support for the color-filter CSS property >diff --git a/LayoutTests/css3/color-filters/color-filter-text-decoration-shadow-expected.html b/LayoutTests/css3/color-filters/color-filter-text-decoration-shadow-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..5727a381d5849b1addd09689520d953131b0727e >--- /dev/null >+++ b/LayoutTests/css3/color-filters/color-filter-text-decoration-shadow-expected.html >@@ -0,0 +1,31 @@ >+<!DOCTYPE html> >+<html> >+ <head> >+ <title>CSS Test: color-filter reference</title> >+ <link rel="author" title="Apple" href="http://www.apple.com/"> >+ >+ <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> >diff --git a/LayoutTests/css3/color-filters/color-filter-text-decoration-shadow.html b/LayoutTests/css3/color-filters/color-filter-text-decoration-shadow.html >new file mode 100644 >index 0000000000000000000000000000000000000000..144f093957f94b74165983f93b2fe5ac93c91ee7 >--- /dev/null >+++ b/LayoutTests/css3/color-filters/color-filter-text-decoration-shadow.html >@@ -0,0 +1,34 @@ >+<!DOCTYPE html> >+<html> >+ <head> >+ <title>CSS Test: color-filter affects text decoration shadows</title> >+ <link rel="author" title="Apple" href="http://www.apple.com/"> >+ <link rel="match" href="color-filter-text-decoration-shadow-expected.html"> >+ >+ <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> >diff --git a/LayoutTests/css3/color-filters/color-filter-text-shadow-expected.html b/LayoutTests/css3/color-filters/color-filter-text-shadow-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..5275d86eed47fe07ad45f790f62769a7749e379a >--- /dev/null >+++ b/LayoutTests/css3/color-filters/color-filter-text-shadow-expected.html >@@ -0,0 +1,32 @@ >+<!DOCTYPE html> >+<html> >+ <head> >+ <title>CSS Test: color-filter reference</title> >+ <link rel="author" title="Apple" href="http://www.apple.com/"> >+ >+ <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> >diff --git a/LayoutTests/css3/color-filters/color-filter-text-shadow.html b/LayoutTests/css3/color-filters/color-filter-text-shadow.html >new file mode 100644 >index 0000000000000000000000000000000000000000..af0202c3b15a3b675c1383ef49d37e9f2deae743 >--- /dev/null >+++ b/LayoutTests/css3/color-filters/color-filter-text-shadow.html >@@ -0,0 +1,39 @@ >+<!DOCTYPE html> >+<html> >+ <head> >+ <title>CSS Test: color-filter affects the text shadow</title> >+ <link rel="author" title="Apple" href="http://www.apple.com/"> >+ <link rel="match" href="color-filter-text-shadow-expected.html"> >+ >+ <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>
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
Flags:
zalan
:
review+
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185068
: 338969 |
338978
|
338980