Diff
Modified: trunk/LayoutTests/ChangeLog (126240 => 126241)
--- trunk/LayoutTests/ChangeLog 2012-08-22 01:11:05 UTC (rev 126240)
+++ trunk/LayoutTests/ChangeLog 2012-08-22 01:26:49 UTC (rev 126241)
@@ -1,3 +1,17 @@
+2012-08-21 Tony Chang <[email protected]>
+
+ Force XML comments to maintain whitespace
+ https://bugs.webkit.org/show_bug.cgi?id=94620
+
+ Reviewed by Pavel Feldman.
+
+ Update comments to include whitespace formatting.
+
+ * http/tests/xmlviewer/dumpAsText/xlink-expected.txt:
+ * http/tests/xmlviewer/dumpAsText/xmlviewer-expected.txt:
+ * http/tests/xmlviewer/dumpAsText/xul-expected.txt:
+ * platform/chromium/http/tests/xmlviewer/dumpAsText/mathml-expected.txt:
+
2012-08-21 David Grogan <[email protected]>
IndexedDB: Fire error at request when abort is called in upgradeneeded
Modified: trunk/LayoutTests/http/tests/xmlviewer/dumpAsText/xlink-expected.txt (126240 => 126241)
--- trunk/LayoutTests/http/tests/xmlviewer/dumpAsText/xlink-expected.txt 2012-08-22 01:11:05 UTC (rev 126240)
+++ trunk/LayoutTests/http/tests/xmlviewer/dumpAsText/xlink-expected.txt 2012-08-22 01:26:49 UTC (rev 126241)
@@ -1,5 +1,5 @@
This XML file does not appear to have any style information associated with it. The document tree is shown below.
-<!-- If you can see this, this test has failed. -->
+<!-- If you can see this, this test has failed. -->
<test xmlns="http://still-unknown.example.org/">
<header>
This tests that xml viewer is not used when there is an attribute XLink namespace.
Modified: trunk/LayoutTests/http/tests/xmlviewer/dumpAsText/xmlviewer-expected.txt (126240 => 126241)
--- trunk/LayoutTests/http/tests/xmlviewer/dumpAsText/xmlviewer-expected.txt 2012-08-22 01:11:05 UTC (rev 126240)
+++ trunk/LayoutTests/http/tests/xmlviewer/dumpAsText/xmlviewer-expected.txt 2012-08-22 01:26:49 UTC (rev 126241)
@@ -1,7 +1,13 @@
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<?some-short-processing-instruction short-params?>
<?some-long-processing-instruction
-The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
+The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy
+ dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps
+ over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
+ jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick
+ brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
+ The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy
+ dog. The quick brown fox jumps over the lazy dog.
?>
<root-tag-with-mixed-content>
<empty-tag/>
@@ -17,10 +23,19 @@
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
</tag-with-long-text-and-attrs>
And now some text in root element. And now some other text in root element.
-<!-- some short comment -->
+<!-- some short comment -->
And now some long text in root element. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
<!--
-some long comment The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
+ some long comment
+ The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
+ lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
+ jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The
+ quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the
+ lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox
+ jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The
+ quick brown fox jumps over the lazy dog. The quick brown fox
+ jumps over the lazy dog.
+
-->
<tag-with-short-cdata>
<![CDATA[ some short text ]]>
Modified: trunk/LayoutTests/http/tests/xmlviewer/dumpAsText/xul-expected.txt (126240 => 126241)
--- trunk/LayoutTests/http/tests/xmlviewer/dumpAsText/xul-expected.txt 2012-08-22 01:11:05 UTC (rev 126240)
+++ trunk/LayoutTests/http/tests/xmlviewer/dumpAsText/xul-expected.txt 2012-08-22 01:26:49 UTC (rev 126241)
@@ -1,5 +1,5 @@
This XML file does not appear to have any style information associated with it. The document tree is shown below.
-<!-- If you can see this, this test has failed. -->
+<!-- If you can see this, this test has failed. -->
<FAIL xmlns:a="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<header>
This tests that xml viewer is not used when there is an attribute in XUL namespace.
Modified: trunk/LayoutTests/platform/chromium/http/tests/xmlviewer/dumpAsText/mathml-expected.txt (126240 => 126241)
--- trunk/LayoutTests/platform/chromium/http/tests/xmlviewer/dumpAsText/mathml-expected.txt 2012-08-22 01:11:05 UTC (rev 126240)
+++ trunk/LayoutTests/platform/chromium/http/tests/xmlviewer/dumpAsText/mathml-expected.txt 2012-08-22 01:26:49 UTC (rev 126241)
@@ -1,6 +1,7 @@
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<!--
-If you can see this, this test has failed, except if you are not using a MathML-aware client.
+ If you can see this, this test has failed, except if you are
+ not using a MathML-aware client.
-->
<FAIL xmlns:a="http://www.w3.org/1998/Math/MathML">
<header>
Modified: trunk/LayoutTests/svg/hixie/error/dumpAsText/004-expected.txt (126240 => 126241)
--- trunk/LayoutTests/svg/hixie/error/dumpAsText/004-expected.txt 2012-08-22 01:11:05 UTC (rev 126240)
+++ trunk/LayoutTests/svg/hixie/error/dumpAsText/004-expected.txt 2012-08-22 01:26:49 UTC (rev 126241)
@@ -1,9 +1,15 @@
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<svg width="300" height="200">
-<!-- note: no namespace, but sent as image/svg+xml -->
+<!-- note: no namespace, but sent as image/svg+xml -->
<desc>There should be no red on this page.</desc>
<rect x="10" y="10" width="280" height="180" fill="red"/>
<!--
-This document is either not SVG, or is SVG but is in error. Section 5.1.1 of SVG 1.1 says: # In all cases, for compliance with the "Namespaces in XML" # Recommendation [XML-NS], an SVG namespace declaration must be # provided so that all SVG elements are identified as belonging # to the SVG namespace.
+ This document is either not SVG, or is SVG but is in error.
+ Section 5.1.1 of SVG 1.1 says:
+ # In all cases, for compliance with the "Namespaces in XML"
+ # Recommendation [XML-NS], an SVG namespace declaration must be
+ # provided so that all SVG elements are identified as belonging
+ # to the SVG namespace.
+
-->
</svg>
Modified: trunk/LayoutTests/svg/hixie/error/dumpAsText/005-expected.txt (126240 => 126241)
--- trunk/LayoutTests/svg/hixie/error/dumpAsText/005-expected.txt 2012-08-22 01:11:05 UTC (rev 126240)
+++ trunk/LayoutTests/svg/hixie/error/dumpAsText/005-expected.txt 2012-08-22 01:26:49 UTC (rev 126241)
@@ -1,6 +1,6 @@
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<svg xmlns="http://www.example.org/" width="300" height="200">
-<!-- wrong namespace, but sent as image/svg+xml -->
+<!-- wrong namespace, but sent as image/svg+xml -->
<desc>There should be no red on this page.</desc>
<rect x="10" y="10" width="280" height="180" fill="red"/>
</svg>
Modified: trunk/Source/WebCore/ChangeLog (126240 => 126241)
--- trunk/Source/WebCore/ChangeLog 2012-08-22 01:11:05 UTC (rev 126240)
+++ trunk/Source/WebCore/ChangeLog 2012-08-22 01:26:49 UTC (rev 126241)
@@ -1,3 +1,21 @@
+2012-08-21 Tony Chang <[email protected]>
+
+ Force XML comments to maintain whitespace
+ https://bugs.webkit.org/show_bug.cgi?id=94620
+
+ Reviewed by Pavel Feldman.
+
+ Fix a typo in XMLViewer.css for white-space formatting. This seems
+ like the desired behavior so you can see, e.g., code formatted in an
+ XML comment.
+
+ Covered by existing xmlviewer tests in http/tests/xmlviewer/dumpAsText
+
+ * xml/XMLViewer.css:
+ (.comment): Fix typo.
+ * xml/XMLViewer.js:
+ (createComment): Add style to comment nodes.
+
2012-08-21 Sheriff Bot <[email protected]>
Unreviewed, rolling out r126202.
Modified: trunk/Source/WebCore/xml/XMLViewer.css (126240 => 126241)
--- trunk/Source/WebCore/xml/XMLViewer.css 2012-08-22 01:11:05 UTC (rev 126240)
+++ trunk/Source/WebCore/xml/XMLViewer.css 2012-08-22 01:26:49 UTC (rev 126241)
@@ -51,7 +51,7 @@
margin-left: 1em;
}
.comment {
- whitespace: pre;
+ white-space: pre;
}
.button {
Modified: trunk/Source/WebCore/xml/XMLViewer.js (126240 => 126241)
--- trunk/Source/WebCore/xml/XMLViewer.js 2012-08-22 01:11:05 UTC (rev 126240)
+++ trunk/Source/WebCore/xml/XMLViewer.js 2012-08-22 01:26:49 UTC (rev 126241)
@@ -289,6 +289,7 @@
function createComment(commentString)
{
var comment = createHTMLElement('span');
+ comment.classList.add('comment');
comment.classList.add('webkit-html-comment');
comment.textContent = commentString;
return comment;