[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
eric at webkit.org
eric at webkit.org
Tue Jan 5 23:40:33 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit e7744c4f28a3526ec74f327522b70f426aedf7a4
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 2 05:17:10 2009 +0000
2009-12-01 Kent Tamura <tkent at chromium.org>
Reviewed by Darin Adler.
Change [Reflect] to [ConvertNullToNullString, Reflect] for min, max,
pattern and step attributes of HTMLInputElement.
https://bugs.webkit.org/show_bug.cgi?id=31708
* fast/forms/input-minmax-expected.txt:
* fast/forms/input-pattern-expected.txt: Added.
* fast/forms/input-pattern.html: Added.
* fast/forms/input-step-expected.txt:
* fast/forms/script-tests/input-minmax.js: Add tests for null/undefined/non-string.
* fast/forms/script-tests/input-pattern.js: Added.
* fast/forms/script-tests/input-step.js: Change the result for null.
2009-12-01 Kent Tamura <tkent at chromium.org>
Reviewed by Darin Adler.
Change [Reflect] to [ConvertNullToNullString, Reflect] for min, max,
pattern and step attributes of HTMLInputElement.
https://bugs.webkit.org/show_bug.cgi?id=31708
* html/HTMLInputElement.idl:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 6090537..30887b4 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2009-12-01 Kent Tamura <tkent at chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Change [Reflect] to [ConvertNullToNullString, Reflect] for min, max,
+ pattern and step attributes of HTMLInputElement.
+ https://bugs.webkit.org/show_bug.cgi?id=31708
+
+ * fast/forms/input-minmax-expected.txt:
+ * fast/forms/input-pattern-expected.txt: Added.
+ * fast/forms/input-pattern.html: Added.
+ * fast/forms/input-step-expected.txt:
+ * fast/forms/script-tests/input-minmax.js: Add tests for null/undefined/non-string.
+ * fast/forms/script-tests/input-pattern.js: Added.
+ * fast/forms/script-tests/input-step.js: Change the result for null.
+
2009-12-01 Chris Fleizach <cfleizach at apple.com>
Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/forms/input-minmax-expected.txt b/LayoutTests/fast/forms/input-minmax-expected.txt
index cede00d..6574621 100644
--- a/LayoutTests/fast/forms/input-minmax-expected.txt
+++ b/LayoutTests/fast/forms/input-minmax-expected.txt
@@ -13,6 +13,31 @@ PASS input.getAttribute("min") is "foo"
PASS input.getAttribute("max") is "bar"
PASS input.getAttribute("min") is ""
PASS input.getAttribute("max") is ""
+Setting null to min:
+PASS input.min is ""
+PASS input.getAttribute("min") is null
+PASS input.min is "null"
+Setting null to max:
+PASS input.max is ""
+PASS input.getAttribute("max") is null
+PASS input.max is "null"
+Setting undefined to min:
+PASS input.min is "undefined"
+PASS input.getAttribute("min") is "undefined"
+PASS input.min is "undefined"
+Setting undefined to max:
+PASS input.max is "undefined"
+PASS input.getAttribute("max") is "undefined"
+PASS input.max is "undefined"
+Setting non-string to min:
+PASS input.min is "256"
+PASS input.getAttribute("min") is "256"
+PASS input.min is "256"
+Setting non-string to max:
+PASS input.max is "256"
+PASS input.getAttribute("max") is "256"
+PASS input.max is "256"
+Check implicit min/max of type=range:
PASS input.min is ""
PASS input.max is ""
PASS successfullyParsed is true
diff --git a/LayoutTests/fast/forms/input-pattern-expected.txt b/LayoutTests/fast/forms/input-pattern-expected.txt
new file mode 100644
index 0000000..ffecb9e
--- /dev/null
+++ b/LayoutTests/fast/forms/input-pattern-expected.txt
@@ -0,0 +1,21 @@
+Test the behavior of pattern attribute and pattern DOM property.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS input.pattern is ""
+PASS input.getAttribute("pattern") is "foo"
+PASS input.pattern is "bar"
+PASS input.pattern is ""
+PASS input.getAttribute("pattern") is null
+PASS input.pattern is "null"
+PASS input.pattern is "undefined"
+PASS input.getAttribute("pattern") is "undefined"
+PASS input.pattern is "undefined"
+PASS input.pattern is "256"
+PASS input.getAttribute("pattern") is "256"
+PASS input.pattern is "256"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/input-pattern.html b/LayoutTests/fast/forms/input-pattern.html
new file mode 100644
index 0000000..6ca47a4
--- /dev/null
+++ b/LayoutTests/fast/forms/input-pattern.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/input-pattern.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/forms/input-step-expected.txt b/LayoutTests/fast/forms/input-step-expected.txt
index fa1b6ca..771c549 100644
--- a/LayoutTests/fast/forms/input-step-expected.txt
+++ b/LayoutTests/fast/forms/input-step-expected.txt
@@ -6,8 +6,8 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
PASS input.step is ""
PASS input.getAttribute("step") is "foo"
PASS input.step is "bar"
-PASS input.step is "null"
-PASS input.getAttribute("step") is "null"
+PASS input.step is ""
+PASS input.getAttribute("step") is null
PASS input.step is "null"
PASS input.step is "undefined"
PASS input.getAttribute("step") is "undefined"
diff --git a/LayoutTests/fast/forms/script-tests/input-minmax.js b/LayoutTests/fast/forms/script-tests/input-minmax.js
index 068c5cc..a078ba7 100644
--- a/LayoutTests/fast/forms/script-tests/input-minmax.js
+++ b/LayoutTests/fast/forms/script-tests/input-minmax.js
@@ -24,8 +24,54 @@ input.max = '';
shouldBe('input.getAttribute("min")', '""');
shouldBe('input.getAttribute("max")', '""');
+// Null.
+debug('Setting null to min:');
+input.min = null;
+shouldBe('input.min', '""');
+shouldBe('input.getAttribute("min")', 'null');
+input.setAttribute('min', null);
+shouldBe('input.min', '"null"');
+
+debug('Setting null to max:');
+input.max = null;
+shouldBe('input.max', '""');
+shouldBe('input.getAttribute("max")', 'null');
+input.setAttribute('max', null);
+shouldBe('input.max', '"null"');
+
+// Undefined.
+debug('Setting undefined to min:');
+input.min = undefined;
+shouldBe('input.min', '"undefined"');
+shouldBe('input.getAttribute("min")', '"undefined"');
+input.setAttribute('min', undefined);
+shouldBe('input.min', '"undefined"');
+
+debug('Setting undefined to max:');
+input.max = undefined;
+shouldBe('input.max', '"undefined"');
+shouldBe('input.getAttribute("max")', '"undefined"');
+input.setAttribute('max', undefined);
+shouldBe('input.max', '"undefined"');
+
+// Non-string.
+debug('Setting non-string to min:');
+input.min = 256;
+shouldBe('input.min', '"256"');
+shouldBe('input.getAttribute("min")', '"256"');
+input.setAttribute('min', 256);
+shouldBe('input.min', '"256"');
+
+debug('Setting non-string to max:');
+input.max = 256;
+shouldBe('input.max', '"256"');
+shouldBe('input.getAttribute("max")', '"256"');
+input.setAttribute('max', 256);
+shouldBe('input.max', '"256"');
+
// The range type has the default minimum and the default maximum.
// But they aren't exposed by .min .max IDL attributes.
+debug('Check implicit min/max of type=range:');
input.type = 'range';
input.setAttribute('min', '');
input.setAttribute('max', '');
diff --git a/LayoutTests/fast/forms/script-tests/input-pattern.js b/LayoutTests/fast/forms/script-tests/input-pattern.js
new file mode 100644
index 0000000..702ae4b
--- /dev/null
+++ b/LayoutTests/fast/forms/script-tests/input-pattern.js
@@ -0,0 +1,36 @@
+description('Test the behavior of pattern attribute and pattern DOM property.');
+
+var input = document.createElement('input');
+input.type = 'text';
+
+// No pattern attribute.
+shouldBe('input.pattern', '""');
+
+// Set a string value.
+input.pattern = 'foo';
+shouldBe('input.getAttribute("pattern")', '"foo"');
+input.setAttribute('pattern', 'bar');
+shouldBe('input.pattern', '"bar"');
+
+// Null.
+input.pattern = null;
+shouldBe('input.pattern', '""');
+shouldBe('input.getAttribute("pattern")', 'null');
+input.setAttribute('pattern', null);
+shouldBe('input.pattern', '"null"');
+
+// Undefined.
+input.pattern = undefined;
+shouldBe('input.pattern', '"undefined"');
+shouldBe('input.getAttribute("pattern")', '"undefined"');
+input.setAttribute('pattern', undefined);
+shouldBe('input.pattern', '"undefined"');
+
+// Non-string.
+input.pattern = 256;
+shouldBe('input.pattern', '"256"');
+shouldBe('input.getAttribute("pattern")', '"256"');
+input.setAttribute('pattern', 256);
+shouldBe('input.pattern', '"256"');
+
+var successfullyParsed = true;
diff --git a/LayoutTests/fast/forms/script-tests/input-step.js b/LayoutTests/fast/forms/script-tests/input-step.js
index 216a009..4264d42 100644
--- a/LayoutTests/fast/forms/script-tests/input-step.js
+++ b/LayoutTests/fast/forms/script-tests/input-step.js
@@ -14,8 +14,8 @@ shouldBe('input.step', '"bar"');
// Null.
input.step = null;
-shouldBe('input.step', '"null"');
-shouldBe('input.getAttribute("step")', '"null"');
+shouldBe('input.step', '""');
+shouldBe('input.getAttribute("step")', 'null');
input.setAttribute('step', null);
shouldBe('input.step', '"null"');
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 949b681..309d7c9 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2009-12-01 Kent Tamura <tkent at chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Change [Reflect] to [ConvertNullToNullString, Reflect] for min, max,
+ pattern and step attributes of HTMLInputElement.
+ https://bugs.webkit.org/show_bug.cgi?id=31708
+
+ * html/HTMLInputElement.idl:
+
2009-12-01 Chris Fleizach <cfleizach at apple.com>
Reviewed by Darin Adler.
diff --git a/WebCore/html/HTMLInputElement.idl b/WebCore/html/HTMLInputElement.idl
index c9d08e3..a1c17ba 100644
--- a/WebCore/html/HTMLInputElement.idl
+++ b/WebCore/html/HTMLInputElement.idl
@@ -43,16 +43,16 @@ module html {
readonly attribute HTMLElement list;
#endif
#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
- attribute [Reflect] DOMString max;
+ attribute [ConvertNullToNullString, Reflect] DOMString max;
#endif
attribute long maxLength
setter raises(DOMException);
#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
- attribute [Reflect] DOMString min;
+ attribute [ConvertNullToNullString, Reflect] DOMString min;
#endif
attribute boolean multiple;
attribute [ConvertNullToNullString] DOMString name;
- attribute [Reflect] DOMString pattern;
+ attribute [ConvertNullToNullString, Reflect] DOMString pattern;
attribute DOMString placeholder;
attribute boolean readOnly;
attribute boolean required;
@@ -63,7 +63,7 @@ module html {
attribute unsigned long size; // Changed string -> long as part of DOM level 2
#endif
attribute [ConvertNullToNullString] DOMString src;
- attribute [Reflect] DOMString step;
+ attribute [ConvertNullToNullString, Reflect] DOMString step;
attribute [ConvertNullToNullString, JSCCustomGetter] DOMString type; // readonly dropped as part of DOM level 2
attribute [ConvertNullToNullString] DOMString useMap;
attribute [ConvertNullToNullString] DOMString value;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list