Title: [231176] tags/Safari-606.1.15.0.1
Revision
231176
Author
jmarc...@apple.com
Date
2018-04-30 15:35:20 -0700 (Mon, 30 Apr 2018)

Log Message

Cherry-pick r231124. rdar://problem/39809478

    Implement color-filter for text stroke
    https://bugs.webkit.org/show_bug.cgi?id=185098

    Reviewed by Alan Bujtas.
    Source/WebCore:

    Transform the text stroke color through color-filter.

    Test: css3/color-filters/color-filter-text-stroke.html

    * rendering/TextPaintStyle.cpp:
    (WebCore::computeTextPaintStyle):

    LayoutTests:

    * css3/color-filters/color-filter-text-stroke-expected.html: Added.
    * css3/color-filters/color-filter-text-stroke.html: Added.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231124 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Added Paths

Diff

Modified: tags/Safari-606.1.15.0.1/LayoutTests/ChangeLog (231175 => 231176)


--- tags/Safari-606.1.15.0.1/LayoutTests/ChangeLog	2018-04-30 22:29:21 UTC (rev 231175)
+++ tags/Safari-606.1.15.0.1/LayoutTests/ChangeLog	2018-04-30 22:35:20 UTC (rev 231176)
@@ -1,3 +1,37 @@
+2018-04-30  Jason Marcell  <jmarc...@apple.com>
+
+        Cherry-pick r231124. rdar://problem/39809478
+
+    Implement color-filter for text stroke
+    https://bugs.webkit.org/show_bug.cgi?id=185098
+    
+    Reviewed by Alan Bujtas.
+    Source/WebCore:
+    
+    Transform the text stroke color through color-filter.
+    
+    Test: css3/color-filters/color-filter-text-stroke.html
+    
+    * rendering/TextPaintStyle.cpp:
+    (WebCore::computeTextPaintStyle):
+    
+    LayoutTests:
+    
+    * css3/color-filters/color-filter-text-stroke-expected.html: Added.
+    * css3/color-filters/color-filter-text-stroke.html: Added.
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2018-04-27  Simon Fraser  <simon.fra...@apple.com>
+
+            Implement color-filter for text stroke
+            https://bugs.webkit.org/show_bug.cgi?id=185098
+
+            Reviewed by Alan Bujtas.
+
+            * css3/color-filters/color-filter-text-stroke-expected.html: Added.
+            * css3/color-filters/color-filter-text-stroke.html: Added.
+
 2018-04-24  Kocsen Chung  <kocsen_ch...@apple.com>
 
         Revert r230808. rdar://problem/39671220

Added: tags/Safari-606.1.15.0.1/LayoutTests/css3/color-filters/color-filter-text-stroke-expected.html (0 => 231176)


--- tags/Safari-606.1.15.0.1/LayoutTests/css3/color-filters/color-filter-text-stroke-expected.html	                        (rev 0)
+++ tags/Safari-606.1.15.0.1/LayoutTests/css3/color-filters/color-filter-text-stroke-expected.html	2018-04-30 22:35:20 UTC (rev 231176)
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>CSS Test: color-filter reference</title>
+        <link rel="author" title="Apple" href=""
+        <style type="text/css">
+            .test
+            {
+                margin: 50px 20px;
+                font: 120px Ahem;
+                color: green;
+            }
+        </style>
+    </head>
+    <body>
+        <div class="test" style="stroke-color: blue; stroke-width: 20px;">O</div>
+        <div class="test" style="-webkit-text-stroke: 20px blue;">O</div>
+    </body>
+</html>

Added: tags/Safari-606.1.15.0.1/LayoutTests/css3/color-filters/color-filter-text-stroke.html (0 => 231176)


--- tags/Safari-606.1.15.0.1/LayoutTests/css3/color-filters/color-filter-text-stroke.html	                        (rev 0)
+++ tags/Safari-606.1.15.0.1/LayoutTests/css3/color-filters/color-filter-text-stroke.html	2018-04-30 22:35:20 UTC (rev 231176)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>CSS Test: color-filter affects text stroke</title>
+        <link rel="author" title="Apple" href=""
+        <link rel="match" href=""
+
+        <meta name="assert" content="color-filter affects text stroke">
+        <style type="text/css">
+            .test
+            {
+                margin: 50px 20px;
+                font: 120px Ahem;
+                color: rgb(255, 128, 255);
+                color-filter: invert();
+            }
+        </style>
+        <script>
+            if (window.internals)
+                internals.settings.setColorFilterEnabled(true);
+        </script>
+    </head>
+    <body>
+        <div class="test" style="stroke-color: yellow; stroke-width: 20px;">O</div>
+        <div class="test" style="-webkit-text-stroke: 20px yellow;">O</div>
+    </body>
+</html>

Modified: tags/Safari-606.1.15.0.1/Source/WebCore/ChangeLog (231175 => 231176)


--- tags/Safari-606.1.15.0.1/Source/WebCore/ChangeLog	2018-04-30 22:29:21 UTC (rev 231175)
+++ tags/Safari-606.1.15.0.1/Source/WebCore/ChangeLog	2018-04-30 22:35:20 UTC (rev 231176)
@@ -1,3 +1,41 @@
+2018-04-30  Jason Marcell  <jmarc...@apple.com>
+
+        Cherry-pick r231124. rdar://problem/39809478
+
+    Implement color-filter for text stroke
+    https://bugs.webkit.org/show_bug.cgi?id=185098
+    
+    Reviewed by Alan Bujtas.
+    Source/WebCore:
+    
+    Transform the text stroke color through color-filter.
+    
+    Test: css3/color-filters/color-filter-text-stroke.html
+    
+    * rendering/TextPaintStyle.cpp:
+    (WebCore::computeTextPaintStyle):
+    
+    LayoutTests:
+    
+    * css3/color-filters/color-filter-text-stroke-expected.html: Added.
+    * css3/color-filters/color-filter-text-stroke.html: Added.
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2018-04-27  Simon Fraser  <simon.fra...@apple.com>
+
+            Implement color-filter for text stroke
+            https://bugs.webkit.org/show_bug.cgi?id=185098
+
+            Reviewed by Alan Bujtas.
+
+            Transform the text stroke color through color-filter.
+
+            Test: css3/color-filters/color-filter-text-stroke.html
+
+            * rendering/TextPaintStyle.cpp:
+            (WebCore::computeTextPaintStyle):
+
 2018-04-24  Kocsen Chung  <kocsen_ch...@apple.com>
 
         Revert r230808. rdar://problem/39671220

Modified: tags/Safari-606.1.15.0.1/Source/WebCore/rendering/TextPaintStyle.cpp (231175 => 231176)


--- tags/Safari-606.1.15.0.1/Source/WebCore/rendering/TextPaintStyle.cpp	2018-04-30 22:29:21 UTC (rev 231175)
+++ tags/Safari-606.1.15.0.1/Source/WebCore/rendering/TextPaintStyle.cpp	2018-04-30 22:35:20 UTC (rev 231176)
@@ -120,7 +120,7 @@
     if (forceBackgroundToWhite)
         paintStyle.fillColor = adjustColorForVisibilityOnBackground(paintStyle.fillColor, Color::white);
 
-    paintStyle.strokeColor = lineStyle.computedStrokeColor();
+    paintStyle.strokeColor = lineStyle.colorByApplyingColorFilter(lineStyle.computedStrokeColor());
 
     // Make the text stroke color legible against a white background
     if (forceBackgroundToWhite)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to