2006-09-24 Eric Seidel <eric@eseidel.com>
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Sep 2006 01:30:36 +0000 (01:30 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Sep 2006 01:30:36 +0000 (01:30 +0000)
        Reviewed by hyatt.

        <svg:a> cannot be styled with a:hover
        http://bugzilla.opendarwin.org/show_bug.cgi?id=11005

        Test: svg/hixie/cascade/002.xml

        * css/cssstyleselector.cpp:
        (WebCore::checkPseudoState):

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

LayoutTests/ChangeLog
LayoutTests/svg/hixie/cascade/002.css [new file with mode: 0644]
LayoutTests/svg/hixie/cascade/002.xml [new file with mode: 0644]
WebCore/ChangeLog
WebCore/css/cssstyleselector.cpp

index 9b69a7d15f10238a644705c910c3979fe6212468..5918b2d6e65297c3f9e3bdae1ac13c930aea4e65 100644 (file)
@@ -1,3 +1,14 @@
+2006-09-24  Eric Seidel  <eric@eseidel.com>
+
+        Reviewed by hyatt.
+        
+        Import one of Hixie's tests for:
+        <svg:a> cannot be styled with a:hover
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=11005
+
+        * svg/hixie/cascade/002.css: Added.
+        * svg/hixie/cascade/002.xml: Added.
+
 2006-09-23  Alexey Proskuryakov  <ap@nypop.com>
 
         Reviewed by Eric.
diff --git a/LayoutTests/svg/hixie/cascade/002.css b/LayoutTests/svg/hixie/cascade/002.css
new file mode 100644 (file)
index 0000000..a02de19
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html lang="en">
+ <head>
+  <!-- page dynamically created -->
+  <link rel="stylesheet" href="/resources/style/spaced.css" type="text/css" media="all" title="Spaced">
+  <link rel="alternate stylesheet" href="/resources/style/orange/" type="text/css" title="Orange" media="all">
+  <link rel="alternate stylesheet" href="/resources/style/debug.css" type="text/css" title="Debugging" media="all">
+  <meta name="copyright" content="&copy; copyright 2003-2006 by Ian Hickson">
+
+  <title>File Not Found</title>
+ </head>
+ <body class="error">
+  <h1><span class="domain"><!--
+--><span class="subdomain"><span>w</span><span>w</span><span>w</span></span><!--
+--><span class="dot">.</span><!--
+--><span class="hixie">hixie</span><!--
+--><span class="dot">.</span><!--
+--><span class="ch"><span class="c">c</span>h</span><!--
+--></span></h1>
+  <h2>File Not Found</h2>
+
+<p>You step in the stream,<br>
+but the water has moved on.<br>
+This page is not here.</p>
+<!-- with thanks to http://www.gnu.org/fun/jokes/error-haiku.html -->
+
+  <p><a href="/">Return to the home page of this
+  site</a>.</p>
+
+ </body>
+</html>
+
+
diff --git a/LayoutTests/svg/hixie/cascade/002.xml b/LayoutTests/svg/hixie/cascade/002.xml
new file mode 100644 (file)
index 0000000..0de23fc
--- /dev/null
@@ -0,0 +1,7 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="400" width="400">
+ <style type="text/css">
+  circle { fill: maroon; }
+  a:visited circle { fill: green; }
+ </style>
+ <a xlink:href="002.xml" xlink:type="simple"><circle cx="200" cy="200" r="100" fill="red"/></a>
+</svg>
index 4511ba417a84dc55a3c3eaf98e99fb39571db558..5fca068297cccac17a5596b4a60138728caa17cb 100644 (file)
@@ -1,3 +1,15 @@
+2006-09-24  Eric Seidel  <eric@eseidel.com>
+
+        Reviewed by hyatt.
+
+        <svg:a> cannot be styled with a:hover
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=11005
+        
+        Test: svg/hixie/cascade/002.xml
+
+        * css/cssstyleselector.cpp:
+        (WebCore::checkPseudoState):
+
 2006-09-24  Sam Weinig  <sam.weinig@gmail.com>
 
         Reviewed by Tim H.
index 21ea1703b4a95c358d7f8070e53d41ae94c521c8..e5e2ce9fc0f1d75572be3bcf62275d0f4176fe87 100644 (file)
 #include "loader.h"
 #include "ShadowValue.h"
 
+#ifdef SVG_SUPPORT
+#include "XLinkNames.h"
+#endif
+
 using namespace std;
 
 namespace WebCore {
@@ -605,7 +609,13 @@ static void checkPseudoState(Element *e, bool checkVisited = true)
         return;
     }
     
-    const AtomicString& attr = e->getAttribute(hrefAttr);
+    AtomicString attr;
+    if (e->isHTMLElement())
+        attr = e->getAttribute(hrefAttr);
+#ifdef SVG_SUPPORT
+    else if (e->isSVGElement())
+        attr = e->getAttribute(XLinkNames::hrefAttr);
+#endif
     if (attr.isNull()) {
         pseudoState = PseudoNone;
         return;