Reviewed by Darin.
authorrwlbuis <rwlbuis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Mar 2007 09:07:41 +0000 (09:07 +0000)
committerrwlbuis <rwlbuis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Mar 2007 09:07:41 +0000 (09:07 +0000)
        http://bugs.webkit.org/show_bug.cgi?id=12868
        parts of the CSS classes in this simple SVG example are not applied

        Make sure the xml stylesheets are parsed in strict mode.

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

LayoutTests/ChangeLog
LayoutTests/svg/custom/xml-stylesheet-expected.checksum [new file with mode: 0644]
LayoutTests/svg/custom/xml-stylesheet-expected.png [new file with mode: 0644]
LayoutTests/svg/custom/xml-stylesheet-expected.txt [new file with mode: 0644]
LayoutTests/svg/custom/xml-stylesheet.css [new file with mode: 0644]
LayoutTests/svg/custom/xml-stylesheet.svg [new file with mode: 0644]
WebCore/ChangeLog
WebCore/dom/ProcessingInstruction.cpp

index eeeb2cf..cc54cbc 100644 (file)
@@ -1,3 +1,17 @@
+2007-03-05  Rob Buis  <buis@kde.org>
+
+        Reviewed by Darin.
+
+        Add test for:
+        http://bugs.webkit.org/show_bug.cgi?id=12868
+        parts of the CSS classes in this simple SVG example are not applied
+
+        * svg/custom/xml-stylesheet-expected.checksum: Added.
+        * svg/custom/xml-stylesheet-expected.png: Added.
+        * svg/custom/xml-stylesheet-expected.txt: Added.
+        * svg/custom/xml-stylesheet.css: Added.
+        * svg/custom/xml-stylesheet.svg: Added.
+
 2007-03-04  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Darin.
diff --git a/LayoutTests/svg/custom/xml-stylesheet-expected.checksum b/LayoutTests/svg/custom/xml-stylesheet-expected.checksum
new file mode 100644 (file)
index 0000000..59bdd60
--- /dev/null
@@ -0,0 +1 @@
+76bdc02f9e5c8554aebc20f37d11fae7
\ No newline at end of file
diff --git a/LayoutTests/svg/custom/xml-stylesheet-expected.png b/LayoutTests/svg/custom/xml-stylesheet-expected.png
new file mode 100644 (file)
index 0000000..830b0cd
Binary files /dev/null and b/LayoutTests/svg/custom/xml-stylesheet-expected.png differ
diff --git a/LayoutTests/svg/custom/xml-stylesheet-expected.txt b/LayoutTests/svg/custom/xml-stylesheet-expected.txt
new file mode 100644 (file)
index 0000000..08bbc25
--- /dev/null
@@ -0,0 +1,4 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+    RenderSVGContainer {svg} at (0,0) size 300x300
+      RenderPath {rect} at (0,0) size 300x300 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L300.00,0.00L300.00,300.00L0.00,300.00"]
diff --git a/LayoutTests/svg/custom/xml-stylesheet.css b/LayoutTests/svg/custom/xml-stylesheet.css
new file mode 100644 (file)
index 0000000..b2e7145
--- /dev/null
@@ -0,0 +1 @@
+.svgClass { fill: green; }
diff --git a/LayoutTests/svg/custom/xml-stylesheet.svg b/LayoutTests/svg/custom/xml-stylesheet.svg
new file mode 100644 (file)
index 0000000..d3ab792
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<?xml-stylesheet href="xml-stylesheet.css" type="text/css"?>\r
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [ ]>\r
+<svg xmlns="http://www.w3.org/2000/svg">\r
+<rect fill="red" x="0" y="0" width="300" height="300" class="svgClass"/>\r
+</svg>\r
index 527c119..6f623f2 100644 (file)
@@ -1,3 +1,15 @@
+2007-03-05  Rob Buis  <buis@kde.org>
+
+        Reviewed by Darin.
+
+        http://bugs.webkit.org/show_bug.cgi?id=12868
+        parts of the CSS classes in this simple SVG example are not applied
+
+        Make sure the xml stylesheets are parsed in strict mode.
+
+        * dom/ProcessingInstruction.cpp:
+        (WebCore::ProcessingInstruction::parseStyleSheet):
+
 2007-03-04  Adele Peterson  <adele@apple.com>
 
         Reviewed by Darin.
index 5d438f5..a1c17dd 100644 (file)
@@ -217,7 +217,7 @@ void ProcessingInstruction::setXSLStyleSheet(const String& url, const String& sh
 
 void ProcessingInstruction::parseStyleSheet(const String& sheet)
 {
-    m_sheet->parseString(sheet);
+    m_sheet->parseString(sheet, true);
     if (m_cachedSheet)
         m_cachedSheet->deref(this);
     m_cachedSheet = 0;