Title: [101452] trunk
Revision
101452
Author
[email protected]
Date
2011-11-29 23:56:23 -0800 (Tue, 29 Nov 2011)

Log Message

Fix for fill color not being applied inside visited links
https://bugs.webkit.org/show_bug.cgi?id=70434

Patch by Philip Rogers <[email protected]> on 2011-11-29
Reviewed by Antti Koivisto.

Source/WebCore:

Test: svg/custom/visited-link-color.svg

* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::setFillPaint):
(WebCore::SVGRenderStyle::setStrokePaint):

LayoutTests:

* svg/custom/visited-link-color-expected.png: Added.
* svg/custom/visited-link-color-expected.txt: Added.
* svg/custom/visited-link-color.svg: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (101451 => 101452)


--- trunk/LayoutTests/ChangeLog	2011-11-30 07:53:47 UTC (rev 101451)
+++ trunk/LayoutTests/ChangeLog	2011-11-30 07:56:23 UTC (rev 101452)
@@ -1,3 +1,14 @@
+2011-11-29  Philip Rogers  <[email protected]>
+
+        Fix for fill color not being applied inside visited links
+        https://bugs.webkit.org/show_bug.cgi?id=70434
+
+        Reviewed by Antti Koivisto.
+
+        * svg/custom/visited-link-color-expected.png: Added.
+        * svg/custom/visited-link-color-expected.txt: Added.
+        * svg/custom/visited-link-color.svg: Added.
+
 2011-11-29  Hayato Ito  <[email protected]>
 
         Webkit gardening: chromium rebaseline for svg tests.

Added: trunk/LayoutTests/svg/custom/visited-link-color-expected.png (0 => 101452)


--- trunk/LayoutTests/svg/custom/visited-link-color-expected.png	                        (rev 0)
+++ trunk/LayoutTests/svg/custom/visited-link-color-expected.png	2011-11-30 07:56:23 UTC (rev 101452)
@@ -0,0 +1,7 @@
+\x89PNG
+
+
+IHDR X')tEXtchecksum815216b00eca718237fe0f889da74585\xBC!\xF0\x85
+\xCFIDATx\x9C\xED\xD9\xC1	\xC30A9\xB8/\x93\xC6T\xB9\xD3B\x8A\xCDL\xF7\\xB8m|?:\x8Fs\xBE\xE7\xEA\xC0\xBF\xDB\xC7c[\xBD\xE0A^\xAB<\x8D\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88\xED\xE7q\xAE\xDEp\xF3=WOn`\xBB\xAEk\xF5\x80Gq\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L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xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@\xECO
+,
+\x8A\xE6\xF6IEND\xAEB`\x82
\ No newline at end of file

Added: trunk/LayoutTests/svg/custom/visited-link-color-expected.txt (0 => 101452)


--- trunk/LayoutTests/svg/custom/visited-link-color-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/svg/custom/visited-link-color-expected.txt	2011-11-30 07:56:23 UTC (rev 101452)
@@ -0,0 +1,6 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (0,0) size 101x101
+    RenderSVGContainer {a} at (0,0) size 101x101
+      RenderSVGPath {rect} at (0,0) size 101x101 [stroke={[type=SOLID] [color=#008000]}] [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]

Added: trunk/LayoutTests/svg/custom/visited-link-color.svg (0 => 101452)


--- trunk/LayoutTests/svg/custom/visited-link-color.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/custom/visited-link-color.svg	2011-11-30 07:56:23 UTC (rev 101452)
@@ -0,0 +1,11 @@
+<!--
+Test that the fill and stroke of a visited link are rendered correctly.
+
+If this test passes, one should see a 100x100 green square with a 1px green border.
+-->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
+  <!-- note: an xlink:href of "" is treated as visited -->
+  <a xlink:href=""
+    <rect fill="green" stroke="green" width="100" height="100" />
+  </a>
+</svg>

Modified: trunk/Source/WebCore/ChangeLog (101451 => 101452)


--- trunk/Source/WebCore/ChangeLog	2011-11-30 07:53:47 UTC (rev 101451)
+++ trunk/Source/WebCore/ChangeLog	2011-11-30 07:56:23 UTC (rev 101452)
@@ -1,3 +1,16 @@
+2011-11-29  Philip Rogers  <[email protected]>
+
+        Fix for fill color not being applied inside visited links
+        https://bugs.webkit.org/show_bug.cgi?id=70434
+
+        Reviewed by Antti Koivisto.
+
+        Test: svg/custom/visited-link-color.svg
+
+        * rendering/style/SVGRenderStyle.h:
+        (WebCore::SVGRenderStyle::setFillPaint):
+        (WebCore::SVGRenderStyle::setStrokePaint):
+
 2011-11-29  David Levin  <[email protected]>
 
         Add a way to revert a variable to its previous value after leaving a scope.

Modified: trunk/Source/WebCore/rendering/style/SVGRenderStyle.h (101451 => 101452)


--- trunk/Source/WebCore/rendering/style/SVGRenderStyle.h	2011-11-30 07:53:47 UTC (rev 101451)
+++ trunk/Source/WebCore/rendering/style/SVGRenderStyle.h	2011-11-30 07:56:23 UTC (rev 101452)
@@ -164,11 +164,11 @@
                 fill.access()->paintUri = uri;
         }
         if (applyToVisitedLinkStyle) {
-            if (!(fill->paintType == type))
+            if (!(fill->visitedLinkPaintType == type))
                 fill.access()->visitedLinkPaintType = type;
-            if (!(fill->paintColor == color))
+            if (!(fill->visitedLinkPaintColor == color))
                 fill.access()->visitedLinkPaintColor = color;
-            if (!(fill->paintUri == uri))
+            if (!(fill->visitedLinkPaintUri == uri))
                 fill.access()->visitedLinkPaintUri = uri;
         }
     }
@@ -190,11 +190,11 @@
                 stroke.access()->paintUri = uri;
         }
         if (applyToVisitedLinkStyle) {
-            if (!(stroke->paintType == type))
+            if (!(stroke->visitedLinkPaintType == type))
                 stroke.access()->visitedLinkPaintType = type;
-            if (!(stroke->paintColor == color))
+            if (!(stroke->visitedLinkPaintColor == color))
                 stroke.access()->visitedLinkPaintColor = color;
-            if (!(stroke->paintUri == uri))
+            if (!(stroke->visitedLinkPaintUri == uri))
                 stroke.access()->visitedLinkPaintUri = uri;
         }
     }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to