[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
tony at chromium.org
tony at chromium.org
Sun Feb 20 22:52:38 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 524140e76c8f2c412c1d012e55c28c37b9aed23d
Author: tony at chromium.org <tony at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jan 12 22:26:21 2011 +0000
2011-01-12 Tony Chang <tony at chromium.org>
Reviewed by Ojan Vafai.
output the value of input and textarea nodes when using dump-as-markup
https://bugs.webkit.org/show_bug.cgi?id=52319
* editing/inserting/5607069-2-expected.txt:
* editing/inserting/5607069-3-expected.txt:
* editing/selection/dump-as-markup-expected.txt:
* editing/selection/dump-as-markup-form-text-expected.txt: Added.
* editing/selection/dump-as-markup-form-text.html: Added.
* fast/parser/object-with-textarea-fallback-expected.txt:
* html5lib/runner.html:
* html5lib/webkit-resumer.html:
* resources/dump-as-markup.js:
(Markup.useHTML5libOutputFormat): Add a flag for html5lib compatibility
(Markup._get):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 39b44b1..f949038 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,22 @@
+2011-01-12 Tony Chang <tony at chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ output the value of input and textarea nodes when using dump-as-markup
+ https://bugs.webkit.org/show_bug.cgi?id=52319
+
+ * editing/inserting/5607069-2-expected.txt:
+ * editing/inserting/5607069-3-expected.txt:
+ * editing/selection/dump-as-markup-expected.txt:
+ * editing/selection/dump-as-markup-form-text-expected.txt: Added.
+ * editing/selection/dump-as-markup-form-text.html: Added.
+ * fast/parser/object-with-textarea-fallback-expected.txt:
+ * html5lib/runner.html:
+ * html5lib/webkit-resumer.html:
+ * resources/dump-as-markup.js:
+ (Markup.useHTML5libOutputFormat): Add a flag for html5lib compatibility
+ (Markup._get):
+
2011-01-12 Robert Hogan <robert at webkit.org>
Unreviewed, add expected results.
diff --git a/LayoutTests/editing/inserting/5607069-2-expected.txt b/LayoutTests/editing/inserting/5607069-2-expected.txt
index 402e2d8..a3ad853 100644
--- a/LayoutTests/editing/inserting/5607069-2-expected.txt
+++ b/LayoutTests/editing/inserting/5607069-2-expected.txt
@@ -1,6 +1,8 @@
This tests for a bug where InsertLineBreak would insert a '\n' instead of a <br> if the caret was set just before an input field. There should be a br element between two input elements.
| <input>
| type="text"
+| this.value=""
| <br>
| <input>
| type="text"
+| this.value=""
diff --git a/LayoutTests/editing/inserting/5607069-3-expected.txt b/LayoutTests/editing/inserting/5607069-3-expected.txt
index f8a1ec6..90c0fe9 100644
--- a/LayoutTests/editing/inserting/5607069-3-expected.txt
+++ b/LayoutTests/editing/inserting/5607069-3-expected.txt
@@ -3,8 +3,10 @@ This tests for a bug in InsertParagraph where it would split and clone a <form>
| style="border: 1px solid blue;"
| <input>
| type="text"
+| this.value=""
| "x"
| <br>
| "<#selection-caret>x"
| <input>
| type="text"
+| this.value=""
diff --git a/LayoutTests/editing/selection/dump-as-markup-expected.txt b/LayoutTests/editing/selection/dump-as-markup-expected.txt
index b816901..0051557 100644
--- a/LayoutTests/editing/selection/dump-as-markup-expected.txt
+++ b/LayoutTests/editing/selection/dump-as-markup-expected.txt
@@ -17,6 +17,7 @@ Tests basic dump-as-markup functionality.
"
| <input>
| type="text"
+| this.value=""
| "
"
| <div>
diff --git a/LayoutTests/editing/selection/dump-as-markup-form-text-expected.txt b/LayoutTests/editing/selection/dump-as-markup-form-text-expected.txt
new file mode 100644
index 0000000..155cc92
--- /dev/null
+++ b/LayoutTests/editing/selection/dump-as-markup-form-text-expected.txt
@@ -0,0 +1,29 @@
+Tests dump-as-markup for input and textarea forms.
+| <!DOCTYPE html>
+| <html>
+| <head>
+| <script>
+| src="../../resources/dump-as-markup.js"
+| "
+
+"
+| <body>
+| <input>
+| value="original"
+| this.value="replaced"
+| "
+"
+| <textarea>
+| this.value="replaced"
+| "original"
+| "
+"
+| <script>
+| "
+Markup.description("Tests dump-as-markup for input and textarea forms.");
+
+document.getElementsByTagName("input")[0].value = "replaced";
+document.getElementsByTagName("textarea")[0].value = "replaced";
+"
+| "
+"
diff --git a/LayoutTests/editing/selection/dump-as-markup-form-text.html b/LayoutTests/editing/selection/dump-as-markup-form-text.html
new file mode 100644
index 0000000..f61e9a0
--- /dev/null
+++ b/LayoutTests/editing/selection/dump-as-markup-form-text.html
@@ -0,0 +1,11 @@
+<!DocType html>
+<script src="../../resources/dump-as-markup.js"></script>
+
+<input value="original" />
+<textarea>original</textarea>
+<script>
+Markup.description("Tests dump-as-markup for input and textarea forms.");
+
+document.getElementsByTagName("input")[0].value = "replaced";
+document.getElementsByTagName("textarea")[0].value = "replaced";
+</script>
diff --git a/LayoutTests/fast/parser/object-with-textarea-fallback-expected.txt b/LayoutTests/fast/parser/object-with-textarea-fallback-expected.txt
index 5e9b32a..3f8a9f6 100644
--- a/LayoutTests/fast/parser/object-with-textarea-fallback-expected.txt
+++ b/LayoutTests/fast/parser/object-with-textarea-fallback-expected.txt
@@ -12,6 +12,7 @@
"
| <textarea>
| name="editor1"
+| this.value=""
| "
"
| "
diff --git a/LayoutTests/html5lib/runner.html b/LayoutTests/html5lib/runner.html
index b54de4e..27ef9f7 100644
--- a/LayoutTests/html5lib/runner.html
+++ b/LayoutTests/html5lib/runner.html
@@ -34,6 +34,7 @@ display: none;
<iframe></iframe>
<script>
Markup.noAutoDump();
+Markup.useHTML5libOutputFormat();
var test_files = [
'resources/pending-spec-changes-plain-text-unsafe.dat',
diff --git a/LayoutTests/html5lib/webkit-resumer.html b/LayoutTests/html5lib/webkit-resumer.html
index bd961a4..5b4510b 100644
--- a/LayoutTests/html5lib/webkit-resumer.html
+++ b/LayoutTests/html5lib/webkit-resumer.html
@@ -33,6 +33,7 @@ display: none;
<iframe></iframe>
<script>
Markup.noAutoDump();
+Markup.useHTML5libOutputFormat();
var test_files = [
// 'resources/tests1.dat',
diff --git a/LayoutTests/resources/dump-as-markup.js b/LayoutTests/resources/dump-as-markup.js
index f73dddf..e159651 100644
--- a/LayoutTests/resources/dump-as-markup.js
+++ b/LayoutTests/resources/dump-as-markup.js
@@ -119,6 +119,11 @@ Markup.notifyDone = function()
layoutTestController.notifyDone();
}
+Markup.useHTML5libOutputFormat = function()
+{
+ Markup._useHTML5libOutputFormat = true;
+}
+
Markup.get = function(node)
{
if (!node.firstChild)
@@ -139,7 +144,7 @@ Markup._get = function(node, depth)
var str = Markup._indent(depth);
switch (node.nodeType) {
- case 10:
+ case Node.DOCUMENT_TYPE_NODE:
str += '<!DOCTYPE ' + node.nodeName;
if (node.publicId || node.systemId) {
str += ' "' + node.publicId + '"';
@@ -148,7 +153,7 @@ Markup._get = function(node, depth)
str += '>';
break;
- case 8:
+ case Node.COMMENT_NODE:
try {
str += '<!-- ' + node.nodeValue + ' -->';
} catch (e) {
@@ -156,19 +161,19 @@ Markup._get = function(node, depth)
}
break;
- case 7:
+ case Node.PROCESSING_INSTRUCTION_NODE:
str += '<?' + node.nodeName + node.nodeValue + '>';
break;
- case 4:
+ case Node.CDATA_SECTION_NODE:
str += '<![CDATA[ ' + node.nodeValue + ' ]]>';
break;
- case 3:
+ case Node.TEXT_NODE:
str += '"' + Markup._getMarkupForTextNode(node) + '"';
break;
- case 1:
+ case Node.ELEMENT_NODE:
str += "<";
str += Markup._namespace(node)
@@ -198,6 +203,11 @@ Markup._get = function(node, depth)
}
}
}
+
+ if (!Markup._useHTML5libOutputFormat)
+ if (node.nodeName == "INPUT" || node.nodeName == "TEXTAREA")
+ str += Markup._indent(depth + 1) + 'this.value="' + node.value + '"';
+
break;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list