Submitted by: eseidel
Reviewed by: darin & mjs
Fixes SVG to load external scripts and report parse errors.
http://bugzilla.opendarwin.org/show_bug.cgi?id=5875
Added 7 layout tests to exercise parse error code.
* fast/invalid/junk-data-expected.checksum: Added.
* fast/invalid/junk-data-expected.png: Added.
* fast/invalid/junk-data-expected.txt: Added.
* fast/invalid/junk-data.xml: Added.
* fast/invalid/missing-end-tag-expected.checksum: Added.
* fast/invalid/missing-end-tag-expected.png: Added.
* fast/invalid/missing-end-tag-expected.txt: Added.
* fast/invalid/missing-end-tag.xhtml: Added.
* fast/xsl/xslt-extra-content-at-end-expected.checksum: Added.
* fast/xsl/xslt-extra-content-at-end-expected.png: Added.
* fast/xsl/xslt-extra-content-at-end-expected.txt: Added.
* fast/xsl/xslt-extra-content-at-end.xml: Added.
* fast/xsl/xslt-mismatched-tags-in-xslt-expected.checksum: Added.
* fast/xsl/xslt-mismatched-tags-in-xslt-expected.png: Added.
* fast/xsl/xslt-mismatched-tags-in-xslt-expected.txt: Added.
* fast/xsl/xslt-mismatched-tags-in-xslt.xml: Added.
* fast/xsl/xslt-missing-namespace-in-xslt-expected.checksum: Added.
* fast/xsl/xslt-missing-namespace-in-xslt-expected.png: Added.
* fast/xsl/xslt-missing-namespace-in-xslt-expected.txt: Added.
* fast/xsl/xslt-missing-namespace-in-xslt.xml: Added.
* svg/custom/junk-data-expected.checksum: Added.
* svg/custom/junk-data-expected.png: Added.
* svg/custom/junk-data-expected.txt: Added.
* svg/custom/junk-data.svg: Added.
* svg/custom/missing-xlink-expected.checksum: Added.
* svg/custom/missing-xlink-expected.png: Added.
* svg/custom/missing-xlink-expected.txt: Added.
* svg/custom/missing-xlink.svg: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@11532
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-12-11 Eric Seidel <eseidel@apple.com>
+
+ Reviewed by darin & mjs.
+
+ Fixes SVG to load external scripts and report parse errors.
+ http://bugzilla.opendarwin.org/show_bug.cgi?id=5875
+
+ Added 7 layout tests to exercise parse error code.
+
+ * fast/invalid/junk-data-expected.checksum: Added.
+ * fast/invalid/junk-data-expected.png: Added.
+ * fast/invalid/junk-data-expected.txt: Added.
+ * fast/invalid/junk-data.xml: Added.
+ * fast/invalid/missing-end-tag-expected.checksum: Added.
+ * fast/invalid/missing-end-tag-expected.png: Added.
+ * fast/invalid/missing-end-tag-expected.txt: Added.
+ * fast/invalid/missing-end-tag.xhtml: Added.
+ * fast/xsl/xslt-extra-content-at-end-expected.checksum: Added.
+ * fast/xsl/xslt-extra-content-at-end-expected.png: Added.
+ * fast/xsl/xslt-extra-content-at-end-expected.txt: Added.
+ * fast/xsl/xslt-extra-content-at-end.xml: Added.
+ * fast/xsl/xslt-mismatched-tags-in-xslt-expected.checksum: Added.
+ * fast/xsl/xslt-mismatched-tags-in-xslt-expected.png: Added.
+ * fast/xsl/xslt-mismatched-tags-in-xslt-expected.txt: Added.
+ * fast/xsl/xslt-mismatched-tags-in-xslt.xml: Added.
+ * fast/xsl/xslt-missing-namespace-in-xslt-expected.checksum: Added.
+ * fast/xsl/xslt-missing-namespace-in-xslt-expected.png: Added.
+ * fast/xsl/xslt-missing-namespace-in-xslt-expected.txt: Added.
+ * fast/xsl/xslt-missing-namespace-in-xslt.xml: Added.
+ * svg/custom/junk-data-expected.checksum: Added.
+ * svg/custom/junk-data-expected.png: Added.
+ * svg/custom/junk-data-expected.txt: Added.
+ * svg/custom/junk-data.svg: Added.
+ * svg/custom/missing-xlink-expected.checksum: Added.
+ * svg/custom/missing-xlink-expected.png: Added.
+ * svg/custom/missing-xlink-expected.txt: Added.
+ * svg/custom/missing-xlink.svg: Added.
+
2005-12-11 Eric Seidel <eseidel@apple.com>
Reviewed by hyatt.
--- /dev/null
+11245d8bdb5d3df5f7535df1594deca3
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x130
+ RenderBlock {HTML} at (0,0) size 800x130
+ RenderBody {BODY} at (8,18) size 784x94
+ RenderBlock (anonymous) at (0,0) size 784x0
+ RenderInline {PARSERERROR} at (0,0) size 0x0 [bgcolor=#FFDDDD] [border: (2px solid #CC7777)]
+ RenderBlock (anonymous) at (0,0) size 784x94
+ RenderBlock {H3} at (0,0) size 784x22
+ RenderText {TEXT} at (0,0) size 324x22
+ text run at (0,0) width 324: "This page contains the following errors:"
+ RenderBlock {DIV} at (0,40) size 784x14
+ RenderText {TEXT} at (0,0) size 483x14
+ text run at (0,0) width 483: "error on line 1 at column 1: Extra content at the end of the document"
+ RenderBlock {H3} at (0,72) size 784x22
+ RenderText {TEXT} at (0,0) size 429x22
+ text run at (0,0) width 429: "Below is a rendering of the page up to the first error."
+ RenderBlock (anonymous) at (0,112) size 784x0
+ RenderInline {PARSERERROR} at (0,0) size 0x0 [bgcolor=#FFDDDD] [border: (2px solid #CC7777)]
--- /dev/null
+<
\ No newline at end of file
--- /dev/null
+51479126c46abd928cc81321b74054f8
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x148
+ RenderBlock {html} at (0,0) size 800x148
+ RenderBlock (anonymous) at (0,0) size 800x0
+ RenderInline {PARSERERROR} at (0,0) size 0x0 [bgcolor=#FFDDDD] [border: (2px solid #CC7777)]
+ RenderBlock (anonymous) at (0,18) size 800x94
+ RenderBlock {H3} at (0,0) size 800x22
+ RenderText {TEXT} at (0,0) size 324x22
+ text run at (0,0) width 324: "This page contains the following errors:"
+ RenderBlock {DIV} at (0,40) size 800x14
+ RenderText {TEXT} at (0,0) size 560x14
+ text run at (0,0) width 560: "error on line 7 at column 29: Opening and ending tag mismatch: p line 0 and body"
+ RenderBlock {H3} at (0,72) size 800x22
+ RenderText {TEXT} at (0,0) size 429x22
+ text run at (0,0) width 429: "Below is a rendering of the page up to the first error."
+ RenderBlock (anonymous) at (0,130) size 800x18
+ RenderInline {PARSERERROR} at (0,0) size 0x0 [bgcolor=#FFDDDD] [border: (2px solid #CC7777)]
+ RenderInline {body} at (0,0) size 180x18
+ RenderText {TEXT} at (0,0) size 0x0
+ RenderInline {p} at (0,0) size 180x18
+ RenderText {TEXT} at (0,0) size 180x18
+ text run at (0,0) width 180: "You should see errors above"
+ RenderText {TEXT} at (0,0) size 0x0
+ RenderInline {p} at (0,0) size 0x0
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html>
+<body>
+<p>You should see errors above</p>
+<p>because this para is missing an end tag
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+e767829d61e15e8155ff45db7850fe85
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x216
+ RenderBlock {HTML} at (0,0) size 800x216
+ RenderBlock (anonymous) at (0,0) size 800x0
+ RenderInline {PARSERERROR} at (0,0) size 0x0 [bgcolor=#FFDDDD] [border: (2px solid #CC7777)]
+ RenderBlock (anonymous) at (0,18) size 800x148
+ RenderBlock {H3} at (0,0) size 800x22
+ RenderText {TEXT} at (0,0) size 324x22
+ text run at (0,0) width 324: "This page contains the following errors:"
+ RenderBlock {DIV} at (0,40) size 800x14
+ RenderText {TEXT} at (0,0) size 490x14
+ text run at (0,0) width 490: "error on line 2 at column 31: Extra content at the end of the document"
+ RenderBlock {H3} at (0,72) size 800x22
+ RenderText {TEXT} at (0,0) size 429x22
+ text run at (0,0) width 429: "Below is a rendering of the page up to the first error."
+ RenderBlock {P} at (0,112) size 800x36
+ RenderText {TEXT} at (0,0) size 731x36
+ text run at (0,0) width 731: "This document was created as the result of an XSL transformation. The line and column numbers given are from the"
+ text run at (0,18) width 117: "transformed result."
+ RenderBlock (anonymous) at (0,182) size 800x0
+ RenderInline {PARSERERROR} at (0,0) size 0x0 [bgcolor=#FFDDDD] [border: (2px solid #CC7777)]
+ RenderBody {BODY} at (8,182) size 784x18
+ RenderBlock {P} at (0,0) size 784x18
+ RenderText {TEXT} at (0,0) size 227x18
+ text run at (0,0) width 227: "You should see error text above this"
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="resources/xslt-extra-content-at-end.xsl"?>
+
+<TEST/>
--- /dev/null
+853de00567d121bea0b7bece66a5d61c
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="resources/xslt-mismatched-tags-in-xslt.xsl"?>
+
+<TEST/>
--- /dev/null
+e3bcd293d802c91b63bd40b932c98f1e
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x84
+ RenderBlock {HTML} at (0,0) size 800x84
+ RenderBody {BODY} at (8,16) size 784x52
+ RenderBlock {P} at (0,0) size 784x18
+ RenderText {TEXT} at (0,0) size 227x18
+ text run at (0,0) width 227: "You should see error text above this"
+ RenderBlock (anonymous) at (0,34) size 784x0
+ RenderInline {bar} at (0,0) size 0x0
+ RenderBlock {P} at (0,34) size 784x18
+ RenderText {TEXT} at (0,0) size 350x18
+ text run at (0,0) width 350: "ERROR? this, and nothing below it should be rendered"
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="resources/xslt-missing-namespace-in-xslt.xsl"?>
+
+<TEST/>
--- /dev/null
+0ef71fc9150c0988287ab2df32f7c4a9
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 480x360
+ RenderCanvas at (0,0) size 480x360
+layer at (0,0) size 480x156
+ RenderBlock {HTML} at (0,0) size 480x156
+ RenderBody {BODY} at (8,18) size 464x130
+ RenderBlock (anonymous) at (0,0) size 464x0
+ RenderInline {PARSERERROR} at (0,0) size 0x0 [bgcolor=#FFDDDD] [border: (2px solid #CC7777)]
+ RenderBlock (anonymous) at (0,0) size 464x94
+ RenderBlock {H3} at (0,0) size 464x22
+ RenderText {TEXT} at (0,0) size 324x22
+ text run at (0,0) width 324: "This page contains the following errors:"
+ RenderBlock {DIV} at (0,40) size 464x14
+ RenderText {TEXT} at (0,0) size 420x14
+ text run at (0,0) width 420: "error on line 6 at column 48: StartTag: invalid element name"
+ RenderBlock {H3} at (0,72) size 464x22
+ RenderText {TEXT} at (0,0) size 429x22
+ text run at (0,0) width 429: "Below is a rendering of the page up to the first error."
+ RenderBlock (anonymous) at (0,112) size 464x18
+ RenderInline {PARSERERROR} at (0,0) size 0x0 [bgcolor=#FFDDDD] [border: (2px solid #CC7777)]
+ KCanvasContainer {svg} at (8,130) size 100x100
+ KCanvasItem {rect} at (8,130) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
--- /dev/null
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
+<svg xmlns="http://www.w3.org/2000/svg">
+<text>You should see an error above</text>
+<rect width="100" height="100" color="green" />
+<
+<rect width="100" height="100" color="red" />
+</svg>
\ No newline at end of file
--- /dev/null
+94d4c9e21df053f0354e065c80e2e289
\ No newline at end of file
--- /dev/null
+layer at (0,0) size 575x345
+ RenderCanvas at (0,0) size 480x345
+layer at (0,0) size 575x156
+ RenderBlock {HTML} at (0,0) size 480x156
+ RenderBody {BODY} at (8,18) size 464x130
+ RenderBlock (anonymous) at (0,0) size 464x0
+ RenderInline {PARSERERROR} at (0,0) size 0x0 [bgcolor=#FFDDDD] [border: (2px solid #CC7777)]
+ RenderBlock (anonymous) at (0,0) size 464x94
+ RenderBlock {H3} at (0,0) size 464x22
+ RenderText {TEXT} at (0,0) size 324x22
+ text run at (0,0) width 324: "This page contains the following errors:"
+ RenderBlock {DIV} at (0,40) size 464x14
+ RenderText {TEXT} at (0,0) size 567x14
+ text run at (0,0) width 567: "error on line 6 at column 60: Namespace prefix xlink for href on a is not defined"
+ RenderBlock {H3} at (0,72) size 464x22
+ RenderText {TEXT} at (0,0) size 429x22
+ text run at (0,0) width 429: "Below is a rendering of the page up to the first error."
+ RenderBlock (anonymous) at (0,112) size 464x18
+ RenderInline {PARSERERROR} at (0,0) size 0x0 [bgcolor=#FFDDDD] [border: (2px solid #CC7777)]
+ KCanvasContainer {svg} at (8,130) size 100x100
+ KCanvasItem {rect} at (8,130) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+ KCanvasContainer {a} at (8,130) size 100x100
+ KCanvasItem {rect} at (8,130) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
--- /dev/null
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
+<svg xmlns="http://www.w3.org/2000/svg">
+<text>You should see an error above</text>
+<rect width="100" height="100" color="green" />
+<a xlink:href="foo.svg"><rect width="100" height="100" color="red" /></a>
+</svg>
\ No newline at end of file