Title: [97596] trunk
Revision
97596
Author
[email protected]
Date
2011-10-17 02:15:12 -0700 (Mon, 17 Oct 2011)

Log Message

Test :visited pseudo class
https://bugs.webkit.org/show_bug.cgi?id=70219

Source/WebCore: 

Reviewed by Andreas Kling.
        
Currently DRT doesn't support :visited. All tests where it should match have wrong checked in results.
        
- Make <a href="" to match :visited in DRT. It already does on browsers. A number of existing tests 
  for :visited use it already, the rest can be modified to use it.
- Make render tree dumps correctly dump the visited state dependent color.

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::determineLinkStateSlowCase):
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):

LayoutTests: 

Reviewed by Andreas Kling.
    
Update Mac results for tests that already use <a href=""
        
All other platforms need rebaselining too.

* platform/mac/css2.1/t0511-c21-pseud-link-02-e-expected.txt:
* platform/mac/css2.1/t0511-c21-pseud-link-03-e-expected.txt:
* platform/mac/fast/dom/34176-expected.txt:
* platform/mac/fast/events/reveal-link-when-focused-expected.txt:
* platform/mac/fast/history/visited-link-background-color-expected.txt:
* platform/mac/tables/mozilla/bugs/bug26553-expected.txt:
* platform/mac/tables/mozilla/bugs/bug46623-1-expected.txt:
* platform/mac/tables/mozilla/bugs/bug51140-expected.txt:
* platform/mac/tables/mozilla/bugs/bug7342-expected.txt:
* platform/mac/tables/mozilla/bugs/bug8950-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (97595 => 97596)


--- trunk/LayoutTests/ChangeLog	2011-10-17 09:04:20 UTC (rev 97595)
+++ trunk/LayoutTests/ChangeLog	2011-10-17 09:15:12 UTC (rev 97596)
@@ -1,3 +1,25 @@
+2011-10-15  Antti Koivisto  <[email protected]>
+
+        Test :visited pseudo class
+        https://bugs.webkit.org/show_bug.cgi?id=70219
+
+        Reviewed by Andreas Kling.
+    
+        Update Mac results for tests that already use <a href=""
+        
+        All other platforms need rebaselining too.
+
+        * platform/mac/css2.1/t0511-c21-pseud-link-02-e-expected.txt:
+        * platform/mac/css2.1/t0511-c21-pseud-link-03-e-expected.txt:
+        * platform/mac/fast/dom/34176-expected.txt:
+        * platform/mac/fast/events/reveal-link-when-focused-expected.txt:
+        * platform/mac/fast/history/visited-link-background-color-expected.txt:
+        * platform/mac/tables/mozilla/bugs/bug26553-expected.txt:
+        * platform/mac/tables/mozilla/bugs/bug46623-1-expected.txt:
+        * platform/mac/tables/mozilla/bugs/bug51140-expected.txt:
+        * platform/mac/tables/mozilla/bugs/bug7342-expected.txt:
+        * platform/mac/tables/mozilla/bugs/bug8950-expected.txt:
+
 2011-10-17  Kent Tamura  <[email protected]>
 
         [Chromium] test expectation update

Modified: trunk/LayoutTests/platform/mac/css2.1/t0511-c21-pseud-link-02-e-expected.txt (97595 => 97596)


--- trunk/LayoutTests/platform/mac/css2.1/t0511-c21-pseud-link-02-e-expected.txt	2011-10-17 09:04:20 UTC (rev 97595)
+++ trunk/LayoutTests/platform/mac/css2.1/t0511-c21-pseud-link-02-e-expected.txt	2011-10-17 09:15:12 UTC (rev 97596)
@@ -4,7 +4,7 @@
   RenderBlock {HTML} at (0,0) size 800x50
     RenderBody {BODY} at (8,16) size 784x18
       RenderBlock {P} at (0,0) size 784x18
-        RenderInline {A} at (0,0) size 164x18 [color=#FF0000]
+        RenderInline {A} at (0,0) size 164x18 [color=#008000]
           RenderText {#text} at (0,0) size 164x18
             text run at (0,0) width 164: "This link should be green."
         RenderText {#text} at (164,0) size 219x18

Modified: trunk/LayoutTests/platform/mac/css2.1/t0511-c21-pseud-link-03-e-expected.txt (97595 => 97596)


--- trunk/LayoutTests/platform/mac/css2.1/t0511-c21-pseud-link-03-e-expected.txt	2011-10-17 09:04:20 UTC (rev 97595)
+++ trunk/LayoutTests/platform/mac/css2.1/t0511-c21-pseud-link-03-e-expected.txt	2011-10-17 09:15:12 UTC (rev 97596)
@@ -4,7 +4,7 @@
   RenderBlock {HTML} at (0,0) size 800x50
     RenderBody {BODY} at (8,16) size 784x18
       RenderBlock {P} at (0,0) size 784x18
-        RenderInline {A} at (0,0) size 164x18 [color=#FF0000]
+        RenderInline {A} at (0,0) size 164x18 [color=#008000]
           RenderText {#text} at (0,0) size 164x18
             text run at (0,0) width 164: "This link should be green."
         RenderText {#text} at (164,0) size 219x18

Modified: trunk/LayoutTests/platform/mac/fast/dom/34176-expected.txt (97595 => 97596)


--- trunk/LayoutTests/platform/mac/fast/dom/34176-expected.txt	2011-10-17 09:04:20 UTC (rev 97595)
+++ trunk/LayoutTests/platform/mac/fast/dom/34176-expected.txt	2011-10-17 09:15:12 UTC (rev 97596)
@@ -216,7 +216,7 @@
           RenderText {#text} at (680,6) size 60x18
             text run at (680,6) width 60: "This is a "
           RenderInline {SPAN} at (0,0) size 109x18
-            RenderInline {A} at (0,0) size 109x18 [color=#0000EE]
+            RenderInline {A} at (0,0) size 109x18 [color=#551A8B]
               RenderText {#text} at (740,6) size 29x18
                 text run at (740,6) width 29: "Test"
               RenderInline {SPAN} at (0,0) size 20x18
@@ -225,7 +225,7 @@
           RenderText {#text} at (680,1) size 60x18
             text run at (680,1) width 60: "This is a "
           RenderInline {SPAN} at (0,0) size 122x18
-            RenderInline {A} at (0,0) size 122x18 [color=#0000EE]
+            RenderInline {A} at (0,0) size 122x18 [color=#551A8B]
               RenderText {#text} at (676,1) size 93x18
                 text run at (676,1) width 4 RTL: " "
                 text run at (740,1) width 29: "Test"
@@ -239,7 +239,7 @@
             RenderInline {EM} at (0,0) size 87x18
               RenderText {#text} at (742,0) size 27x18
                 text run at (742,0) width 27: "Test"
-              RenderInline {A} at (0,0) size 0x18 [color=#0000EE]
+              RenderInline {A} at (0,0) size 0x18 [color=#551A8B]
         RenderBlock {DIV} at (0,113) size 769x24 [bgcolor=#FF0000]
           RenderText {#text} at (682,6) size 60x18
             text run at (682,6) width 60: "This is a "
@@ -253,7 +253,7 @@
           RenderText {#text} at (639,0) size 60x18
             text run at (639,0) width 60: "This is a "
           RenderInline {SPAN} at (0,0) size 70x18
-            RenderInline {A} at (0,0) size 70x18 [color=#0000EE]
+            RenderInline {A} at (0,0) size 70x18 [color=#551A8B]
               RenderText {#text} at (699,0) size 33x18
                 text run at (699,0) width 33: "Test "
               RenderInline {SPAN} at (0,0) size 37x18

Modified: trunk/LayoutTests/platform/mac/fast/events/reveal-link-when-focused-expected.txt (97595 => 97596)


--- trunk/LayoutTests/platform/mac/fast/events/reveal-link-when-focused-expected.txt	2011-10-17 09:04:20 UTC (rev 97595)
+++ trunk/LayoutTests/platform/mac/fast/events/reveal-link-when-focused-expected.txt	2011-10-17 09:15:12 UTC (rev 97596)
@@ -7,7 +7,7 @@
         RenderText {#text} at (0,0) size 331x18
           text run at (0,0) width 331: "padding to make link be initially scrolled out of sight"
       RenderBlock (anonymous) at (0,2000) size 769x18
-        RenderInline {A} at (0,0) size 355x18 [color=#0000EE]
+        RenderInline {A} at (0,0) size 355x18 [color=#551A8B]
           RenderText {#text} at (0,0) size 355x18
             text run at (0,0) width 355: "this link should be focused and revealed after page loads"
         RenderText {#text} at (0,0) size 0x0

Modified: trunk/LayoutTests/platform/mac/fast/history/visited-link-background-color-expected.txt (97595 => 97596)


--- trunk/LayoutTests/platform/mac/fast/history/visited-link-background-color-expected.txt	2011-10-17 09:04:20 UTC (rev 97595)
+++ trunk/LayoutTests/platform/mac/fast/history/visited-link-background-color-expected.txt	2011-10-17 09:15:12 UTC (rev 97596)
@@ -3,6 +3,6 @@
 layer at (0,0) size 800x600
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {A} at (0,0) size 500x500 [color=#0000EE] [bgcolor=#808000]
+      RenderBlock {A} at (0,0) size 500x500 [color=#FFFFFF] [bgcolor=#808000]
         RenderText {#text} at (0,0) size 316x18
           text run at (0,0) width 316: "This text should be white on an olive background."

Modified: trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug26553-expected.txt (97595 => 97596)


--- trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug26553-expected.txt	2011-10-17 09:04:20 UTC (rev 97595)
+++ trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug26553-expected.txt	2011-10-17 09:15:12 UTC (rev 97596)
@@ -7,11 +7,11 @@
         RenderTableSection {TBODY} at (1,1) size 782x130
           RenderTableRow {TR} at (0,2) size 782x126
             RenderTableCell {TD} at (2,2) size 183x126 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
-              RenderInline {A} at (0,0) size 181x18 [color=#0000EE]
+              RenderInline {A} at (0,0) size 181x18 [color=#551A8B]
                 RenderImage {IMG} at (1,1) size 61x62
                 RenderImage {IMG} at (1,63) size 181x62
             RenderTableCell {TD} at (187,33) size 453x64 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
               RenderImage {IMG} at (134,1) size 186x62
             RenderTableCell {TD} at (642,33) size 138x64 [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
-              RenderInline {A} at (0,0) size 0x0 [color=#0000EE]
+              RenderInline {A} at (0,0) size 0x0 [color=#551A8B]
                 RenderImage {IMG} at (4,1) size 133x62

Modified: trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug46623-1-expected.txt (97595 => 97596)


--- trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug46623-1-expected.txt	2011-10-17 09:04:20 UTC (rev 97595)
+++ trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug46623-1-expected.txt	2011-10-17 09:15:12 UTC (rev 97596)
@@ -19,19 +19,19 @@
                       RenderBR {BR} at (0,0) size 0x0
                       RenderInline {FONT} at (0,0) size 239x30
                         RenderInline {B} at (0,0) size 149x15
-                          RenderInline {A} at (0,0) size 149x15 [color=#0000EE]
+                          RenderInline {A} at (0,0) size 149x15 [color=#551A8B]
                             RenderText {#text} at (2,20) size 149x15
                               text run at (2,20) width 33: "Click "
                               text run at (35,20) width 116: "here to email full list"
                         RenderText {#text} at (151,20) size 73x15
                           text run at (151,20) width 73: ", or copy this "
-                        RenderInline {A} at (0,0) size 239x30 [color=#0000EE]
+                        RenderInline {A} at (0,0) size 239x30 [color=#551A8B]
                           RenderText {#text} at (224,20) size 239x30
                             text run at (224,20) width 17: "list"
                             text run at (2,35) width 65: "of addresses"
                         RenderText {#text} at (67,35) size 40x15
                           text run at (67,35) width 40: ".  View "
-                        RenderInline {A} at (0,0) size 83x15 [color=#0000EE]
+                        RenderInline {A} at (0,0) size 83x15 [color=#551A8B]
                           RenderText {#text} at (107,35) size 83x15
                             text run at (107,35) width 83: "Who is in MPG"
                         RenderText {#text} at (190,35) size 3x15

Modified: trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug51140-expected.txt (97595 => 97596)


--- trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug51140-expected.txt	2011-10-17 09:04:20 UTC (rev 97595)
+++ trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug51140-expected.txt	2011-10-17 09:15:12 UTC (rev 97596)
@@ -4,12 +4,12 @@
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584
       RenderBlock (anonymous) at (0,0) size 784x18
-        RenderInline {A} at (0,0) size 27x18 [color=#0000EE]
+        RenderInline {A} at (0,0) size 27x18 [color=#551A8B]
           RenderText {#text} at (0,0) size 27x18
             text run at (0,0) width 27: "note"
         RenderText {#text} at (27,0) size 4x18
           text run at (27,0) width 4: " "
-        RenderInline {A} at (0,0) size 72x18 [color=#0000EE]
+        RenderInline {A} at (0,0) size 72x18 [color=#551A8B]
           RenderText {#text} at (31,0) size 72x18
             text run at (31,0) width 72: "closepopup"
         RenderText {#text} at (0,0) size 0x0

Modified: trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug7342-expected.txt (97595 => 97596)


--- trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug7342-expected.txt	2011-10-17 09:04:20 UTC (rev 97595)
+++ trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug7342-expected.txt	2011-10-17 09:15:12 UTC (rev 97596)
@@ -21,28 +21,28 @@
                     RenderTableSection {TBODY} at (1,1) size 114x118
                       RenderTableRow {TR} at (0,2) size 114x27
                         RenderTableCell {TD} at (2,3) size 110x24 [bgcolor=#CCCCCC] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
-                          RenderInline {A} at (0,0) size 61x18 [color=#000099]
+                          RenderInline {A} at (0,0) size 61x18 [color=#660099]
                             RenderInline {B} at (0,0) size 61x18
                               RenderText {#text} at (3,3) size 61x18
                                 text run at (3,3) width 61: "Netscape"
                           RenderText {#text} at (0,0) size 0x0
                       RenderTableRow {TR} at (0,31) size 114x27
                         RenderTableCell {TD} at (2,32) size 110x24 [bgcolor=#FFFFFF] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
-                          RenderInline {A} at (0,0) size 57x18 [color=#000099]
+                          RenderInline {A} at (0,0) size 57x18 [color=#660099]
                             RenderInline {B} at (0,0) size 57x18
                               RenderText {#text} at (3,3) size 57x18
                                 text run at (3,3) width 57: "Infoseek"
                           RenderText {#text} at (0,0) size 0x0
                       RenderTableRow {TR} at (0,60) size 114x27
                         RenderTableCell {TD} at (2,61) size 110x24 [bgcolor=#FFFFFF] [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=1]
-                          RenderInline {A} at (0,0) size 78x18 [color=#000099]
+                          RenderInline {A} at (0,0) size 78x18 [color=#660099]
                             RenderInline {B} at (0,0) size 78x18
                               RenderText {#text} at (3,3) size 78x18
                                 text run at (3,3) width 78: "LookSmart"
                           RenderText {#text} at (0,0) size 0x0
                       RenderTableRow {TR} at (0,89) size 114x27
                         RenderTableCell {TD} at (2,90) size 110x24 [bgcolor=#FFFFFF] [border: (1px inset #808080)] [r=3 c=0 rs=1 cs=1]
-                          RenderInline {A} at (0,0) size 65x18 [color=#000099]
+                          RenderInline {A} at (0,0) size 65x18 [color=#660099]
                             RenderInline {B} at (0,0) size 65x18
                               RenderText {#text} at (3,3) size 65x18
                                 text run at (3,3) width 65: "Directory"

Modified: trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug8950-expected.txt (97595 => 97596)


--- trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug8950-expected.txt	2011-10-17 09:04:20 UTC (rev 97595)
+++ trunk/LayoutTests/platform/mac/tables/mozilla/bugs/bug8950-expected.txt	2011-10-17 09:15:12 UTC (rev 97596)
@@ -49,29 +49,29 @@
                                                   RenderTableSection {TBODY} at (1,1) size 271x74
                                                     RenderTableRow {TR} at (0,2) size 271x22
                                                       RenderTableCell {TD} at (2,2) size 144x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
-                                                        RenderInline {A} at (0,0) size 51x18 [color=#0000EE]
+                                                        RenderInline {A} at (0,0) size 51x18 [color=#551A8B]
                                                           RenderText {#text} at (2,2) size 51x18
                                                             text run at (2,2) width 51: "Holiday"
                                                       RenderTableCell {TD} at (148,2) size 121x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
-                                                        RenderInline {A} at (0,0) size 29x18 [color=#0000EE]
+                                                        RenderInline {A} at (0,0) size 29x18 [color=#551A8B]
                                                           RenderText {#text} at (2,2) size 29x18
                                                             text run at (2,2) width 29: "Cars"
                                                     RenderTableRow {TR} at (0,26) size 271x22
                                                       RenderTableCell {TD} at (2,26) size 144x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
-                                                        RenderInline {A} at (0,0) size 40x18 [color=#0000EE]
+                                                        RenderInline {A} at (0,0) size 40x18 [color=#551A8B]
                                                           RenderText {#text} at (2,2) size 40x18
                                                             text run at (2,2) width 40: "Sports"
                                                       RenderTableCell {TD} at (148,26) size 121x22 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
-                                                        RenderInline {A} at (0,0) size 53x18 [color=#0000EE]
+                                                        RenderInline {A} at (0,0) size 53x18 [color=#551A8B]
                                                           RenderText {#text} at (2,2) size 53x18
                                                             text run at (2,2) width 53: "Animals"
                                                     RenderTableRow {TR} at (0,50) size 271x22
                                                       RenderTableCell {TD} at (2,50) size 144x22 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=1]
-                                                        RenderInline {A} at (0,0) size 69x18 [color=#0000EE]
+                                                        RenderInline {A} at (0,0) size 69x18 [color=#551A8B]
                                                           RenderText {#text} at (2,2) size 69x18
                                                             text run at (2,2) width 69: "Computers"
                                                       RenderTableCell {TD} at (148,50) size 121x22 [border: (1px inset #808080)] [r=2 c=1 rs=1 cs=1]
-                                                        RenderInline {A} at (0,0) size 57x18 [color=#0000EE]
+                                                        RenderInline {A} at (0,0) size 57x18 [color=#551A8B]
                                                           RenderText {#text} at (2,2) size 57x18
                                                             text run at (2,2) width 57: "Cartoons"
       RenderBlock (anonymous) at (0,233) size 784x18
@@ -115,6 +115,6 @@
                         RenderTableSection {TBODY} at (1,1) size 198x26
                           RenderTableRow {TR} at (0,2) size 198x22
                             RenderTableCell {TD} at (2,2) size 194x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
-                              RenderInline {A} at (0,0) size 51x18 [color=#0000EE]
+                              RenderInline {A} at (0,0) size 51x18 [color=#551A8B]
                                 RenderText {#text} at (2,2) size 51x18
                                   text run at (2,2) width 51: "Holiday"

Modified: trunk/Source/WebCore/ChangeLog (97595 => 97596)


--- trunk/Source/WebCore/ChangeLog	2011-10-17 09:04:20 UTC (rev 97595)
+++ trunk/Source/WebCore/ChangeLog	2011-10-17 09:15:12 UTC (rev 97596)
@@ -1,3 +1,21 @@
+2011-10-15  Antti Koivisto  <[email protected]>
+
+        Test :visited pseudo class
+        https://bugs.webkit.org/show_bug.cgi?id=70219
+
+        Reviewed by Andreas Kling.
+        
+        Currently DRT doesn't support :visited. All tests where it should match have wrong checked in results.
+        
+        - Make <a href="" to match :visited in DRT. It already does on browsers. A number of existing tests 
+          for :visited use it already, the rest can be modified to use it.
+        - Make render tree dumps correctly dump the visited state dependent color.
+
+        * css/SelectorChecker.cpp:
+        (WebCore::SelectorChecker::determineLinkStateSlowCase):
+        * rendering/RenderTreeAsText.cpp:
+        (WebCore::RenderTreeAsText::writeRenderObject):
+
 2011-10-17  Satish Sampath  <[email protected]>
 
         Avoid leaking document when leaving google.com due to geolocation

Modified: trunk/Source/WebCore/css/SelectorChecker.cpp (97595 => 97596)


--- trunk/Source/WebCore/css/SelectorChecker.cpp	2011-10-17 09:04:20 UTC (rev 97595)
+++ trunk/Source/WebCore/css/SelectorChecker.cpp	2011-10-17 09:15:12 UTC (rev 97596)
@@ -229,6 +229,11 @@
     if (!attr || attr->isNull())
         return NotInsideLink;
 
+    // An empty href refers to the document itself which is always visited. It is useful to check this explicitly so
+    // that visited links can be tested in platform independent manner, without explicit support in the test harness.
+    if (attr->isEmpty())
+        return InsideVisitedLink;
+
     LinkHash hash = visitedLinkHash(m_document->baseURL(), *attr);
     if (!hash)
         return InsideUnvisitedLink;

Modified: trunk/Source/WebCore/rendering/RenderTreeAsText.cpp (97595 => 97596)


--- trunk/Source/WebCore/rendering/RenderTreeAsText.cpp	2011-10-17 09:04:20 UTC (rev 97595)
+++ trunk/Source/WebCore/rendering/RenderTreeAsText.cpp	2011-10-17 09:15:12 UTC (rev 97596)
@@ -282,27 +282,30 @@
         if (o.isFileUploadControl())
             ts << " " << quoteAndEscapeNonPrintables(toRenderFileUploadControl(&o)->fileTextValue());
 
-        if (o.parent() && (o.parent()->style()->color() != o.style()->color()))
-            ts << " [color=" << o.style()->color().nameForRenderTreeAsText() << "]";
+        if (o.parent()) {
+            Color color = o.style()->visitedDependentColor(CSSPropertyColor);
+            if (o.parent()->style()->visitedDependentColor(CSSPropertyColor) != color)
+                ts << " [color=" << color.nameForRenderTreeAsText() << "]";
 
-        if (o.parent() && (o.parent()->style()->backgroundColor() != o.style()->backgroundColor()) &&
-            o.style()->backgroundColor().isValid() && o.style()->backgroundColor().rgb())
             // Do not dump invalid or transparent backgrounds, since that is the default.
-            ts << " [bgcolor=" << o.style()->backgroundColor().nameForRenderTreeAsText() << "]";
-        
-        if (o.parent() && (o.parent()->style()->textFillColor() != o.style()->textFillColor()) &&
-            o.style()->textFillColor().isValid() && o.style()->textFillColor() != o.style()->color() &&
-            o.style()->textFillColor().rgb())
-            ts << " [textFillColor=" << o.style()->textFillColor().nameForRenderTreeAsText() << "]";
+            Color backgroundColor = o.style()->visitedDependentColor(CSSPropertyBackgroundColor);
+            if (o.parent()->style()->visitedDependentColor(CSSPropertyBackgroundColor) != backgroundColor
+                && backgroundColor.isValid() && backgroundColor.rgb())
+                ts << " [bgcolor=" << backgroundColor.nameForRenderTreeAsText() << "]";
+            
+            Color textFillColor = o.style()->visitedDependentColor(CSSPropertyWebkitTextFillColor);
+            if (o.parent()->style()->visitedDependentColor(CSSPropertyWebkitTextFillColor) != textFillColor
+                && textFillColor.isValid() && textFillColor != color && textFillColor.rgb())
+                ts << " [textFillColor=" << textFillColor.nameForRenderTreeAsText() << "]";
 
-        if (o.parent() && (o.parent()->style()->textStrokeColor() != o.style()->textStrokeColor()) &&
-            o.style()->textStrokeColor().isValid() && o.style()->textStrokeColor() != o.style()->color() &&
-            o.style()->textStrokeColor().rgb())
-            ts << " [textStrokeColor=" << o.style()->textStrokeColor().nameForRenderTreeAsText() << "]";
+            Color textStrokeColor = o.style()->visitedDependentColor(CSSPropertyWebkitTextStrokeColor);
+            if (o.parent()->style()->visitedDependentColor(CSSPropertyWebkitTextStrokeColor) != textStrokeColor
+                && textStrokeColor.isValid() && textStrokeColor != color && textStrokeColor.rgb())
+                ts << " [textStrokeColor=" << textStrokeColor.nameForRenderTreeAsText() << "]";
 
-        if (o.parent() && (o.parent()->style()->textStrokeWidth() != o.style()->textStrokeWidth()) &&
-            o.style()->textStrokeWidth() > 0)
-            ts << " [textStrokeWidth=" << o.style()->textStrokeWidth() << "]";
+            if (o.parent()->style()->textStrokeWidth() != o.style()->textStrokeWidth() && o.style()->textStrokeWidth() > 0)
+                ts << " [textStrokeWidth=" << o.style()->textStrokeWidth() << "]";
+        }
 
         if (!o.isBoxModelObject())
             return;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to