@namespace directives need to use "maybe_space" in the "maybe_ns_prefix" portion...
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Dec 2009 18:55:09 +0000 (18:55 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Dec 2009 18:55:09 +0000 (18:55 +0000)
the spec.  Not doing so prevent comments from being used immmediately after the namespace prefix.

Reviewed by David Kilzer.

Added fast/css/namespaces-comments.xml

* css/CSSGrammar.y:

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

LayoutTests/fast/css/namespaces/namespaces-comments.xml [new file with mode: 0644]
LayoutTests/platform/mac/fast/css/namespaces/namespaces-comments-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/css/namespaces/namespaces-comments-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/css/namespaces/namespaces-comments-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/css/CSSGrammar.y

diff --git a/LayoutTests/fast/css/namespaces/namespaces-comments.xml b/LayoutTests/fast/css/namespaces/namespaces-comments.xml
new file mode 100644 (file)
index 0000000..0985e89
--- /dev/null
@@ -0,0 +1,30 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#syntax"/>
+  <title>CSS Namespaces Test Suite: whitespace and comment handling</title>
+  <style>
+   test { background:red }
+  </style>
+  <style>
+   @namespace/* test */
+   a
+   url(
+test-a );
+
+   @namespace/**/b/**/url(     'test-b'
+);
+
+   @namespace  c       url("test-c"    
+);
+
+   a|test, b|test, c|test { background:lime }
+  </style>
+ </head>
+ <body>
+  <p><test xmlns="test-a">This sentence should have a green background.</test></p>
+  <p><test xmlns="test-b">This sentence should have a green background.</test></p>
+  <p><test xmlns="test-c">This sentence should have a green background.</test></p>
+ </body>
+</html>
diff --git a/LayoutTests/platform/mac/fast/css/namespaces/namespaces-comments-expected.checksum b/LayoutTests/platform/mac/fast/css/namespaces/namespaces-comments-expected.checksum
new file mode 100644 (file)
index 0000000..3556b17
--- /dev/null
@@ -0,0 +1 @@
+26451729dfd9c022b825cba344c46b1f
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/css/namespaces/namespaces-comments-expected.png b/LayoutTests/platform/mac/fast/css/namespaces/namespaces-comments-expected.png
new file mode 100644 (file)
index 0000000..532dcaf
Binary files /dev/null and b/LayoutTests/platform/mac/fast/css/namespaces/namespaces-comments-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/css/namespaces/namespaces-comments-expected.txt b/LayoutTests/platform/mac/fast/css/namespaces/namespaces-comments-expected.txt
new file mode 100644 (file)
index 0000000..2d782fb
--- /dev/null
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x118
+  RenderBlock {html} at (0,0) size 800x118
+    RenderBody {body} at (8,16) size 784x86
+      RenderBlock {p} at (0,0) size 784x18
+        RenderInline {test} at (0,0) size 299x18 [bgcolor=#00FF00]
+          RenderText {#text} at (0,0) size 299x18
+            text run at (0,0) width 299: "This sentence should have a green background."
+      RenderBlock {p} at (0,34) size 784x18
+        RenderInline {test} at (0,0) size 299x18 [bgcolor=#00FF00]
+          RenderText {#text} at (0,0) size 299x18
+            text run at (0,0) width 299: "This sentence should have a green background."
+      RenderBlock {p} at (0,68) size 784x18
+        RenderInline {test} at (0,0) size 299x18 [bgcolor=#00FF00]
+          RenderText {#text} at (0,0) size 299x18
+            text run at (0,0) width 299: "This sentence should have a green background."
index 0afcc932d8a2816344f054b15508989a188b2dcb..be6ac77575c4372fa053da6d6545b32c11eeaefa 100644 (file)
@@ -1,3 +1,14 @@
+2009-12-01  Dave Hyatt  <hyatt@apple.com>
+
+        Reviewed by David Kilzer.
+
+        @namespace directives need to use "maybe_space" in the "maybe_ns_prefix" portion of the grammar to match
+        the spec.  Not doing so prevent comments from being used immmediately after the namespace prefix.
+
+        Added fast/css/namespaces-comments.xml
+
+        * css/CSSGrammar.y:
+
 2009-12-01  Yael Aharon  <yael.aharon@nokia.com>
 
         Reviewed by Timothy Hatcher.
 2009-12-01  Yael Aharon  <yael.aharon@nokia.com>
 
         Reviewed by Timothy Hatcher.
index 0530e913ed347b8a3667879808d4ffbd8bb56a95..7c5f6301847289887967cf5889985d6e50b1d9f8 100644 (file)
@@ -580,7 +580,7 @@ NAMESPACE_SYM maybe_space maybe_ns_prefix string_or_uri maybe_space ';' {
 
 maybe_ns_prefix:
 /* empty */ { $$.characters = 0; }
 
 maybe_ns_prefix:
 /* empty */ { $$.characters = 0; }
-| IDENT WHITESPACE { $$ = $1; }
+| IDENT maybe_space { $$ = $1; }
 ;
 
 string_or_uri:
 ;
 
 string_or_uri: