[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

eric at webkit.org eric at webkit.org
Thu Oct 29 20:39:09 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 4bd1c43bc50c781c155d8c0ac400175e45c44e3e
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 5 19:07:59 2009 +0000

    2009-10-05  Eric Seidel  <eric at webkit.org>
    
            No review, rolling out r49104.
            http://trac.webkit.org/changeset/49104
    
            * fast/forms/ValidityState-rangeOverflow-number-expected.txt: Removed.
            * fast/forms/ValidityState-rangeOverflow-number.html: Removed.
            * fast/forms/ValidityState-rangeOverflow-range-expected.txt: Removed.
            * fast/forms/ValidityState-rangeOverflow-range.html: Removed.
            * fast/forms/ValidityState-rangeUnderflow-number-expected.txt: Removed.
            * fast/forms/ValidityState-rangeUnderflow-number.html: Removed.
            * fast/forms/ValidityState-rangeUnderflow-range-expected.txt: Removed.
            * fast/forms/ValidityState-rangeUnderflow-range.html: Removed.
            * fast/forms/input-minmax-expected.txt: Removed.
            * fast/forms/input-minmax.html: Removed.
            * fast/forms/script-tests/ValidityState-rangeOverflow-number.js: Removed.
            * fast/forms/script-tests/ValidityState-rangeOverflow-range.js: Removed.
            * fast/forms/script-tests/ValidityState-rangeUnderflow-number.js: Removed.
            * fast/forms/script-tests/ValidityState-rangeUnderflow-range.js: Removed.
            * fast/forms/script-tests/input-minmax.js: Removed.
    2009-10-05  Eric Seidel  <eric at webkit.org>
    
            No review, rolling out r49104.
            http://trac.webkit.org/changeset/49104
    
            * html/HTMLInputElement.cpp:
            * html/HTMLInputElement.h:
            * html/HTMLInputElement.idl:
            * html/ValidityState.cpp:
            * html/ValidityState.h:
            (WebCore::ValidityState::rangeUnderflow):
            (WebCore::ValidityState::rangeOverflow):
            * rendering/RenderSlider.cpp:
            (WebCore::SliderRange::SliderRange):
            (WebCore::SliderRange::valueFromElement):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49107 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 189fcb7..79e86cb 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,24 @@
+2009-10-05  Eric Seidel  <eric at webkit.org>
+
+        No review, rolling out r49104.
+        http://trac.webkit.org/changeset/49104
+
+        * fast/forms/ValidityState-rangeOverflow-number-expected.txt: Removed.
+        * fast/forms/ValidityState-rangeOverflow-number.html: Removed.
+        * fast/forms/ValidityState-rangeOverflow-range-expected.txt: Removed.
+        * fast/forms/ValidityState-rangeOverflow-range.html: Removed.
+        * fast/forms/ValidityState-rangeUnderflow-number-expected.txt: Removed.
+        * fast/forms/ValidityState-rangeUnderflow-number.html: Removed.
+        * fast/forms/ValidityState-rangeUnderflow-range-expected.txt: Removed.
+        * fast/forms/ValidityState-rangeUnderflow-range.html: Removed.
+        * fast/forms/input-minmax-expected.txt: Removed.
+        * fast/forms/input-minmax.html: Removed.
+        * fast/forms/script-tests/ValidityState-rangeOverflow-number.js: Removed.
+        * fast/forms/script-tests/ValidityState-rangeOverflow-range.js: Removed.
+        * fast/forms/script-tests/ValidityState-rangeUnderflow-number.js: Removed.
+        * fast/forms/script-tests/ValidityState-rangeUnderflow-range.js: Removed.
+        * fast/forms/script-tests/input-minmax.js: Removed.
+
 2009-10-05  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Eric Seidel.
diff --git a/LayoutTests/fast/forms/ValidityState-rangeOverflow-number-expected.txt b/LayoutTests/fast/forms/ValidityState-rangeOverflow-number-expected.txt
deleted file mode 100644
index 4128436..0000000
--- a/LayoutTests/fast/forms/ValidityState-rangeOverflow-number-expected.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-This test aims to check for rangeOverflow flag with type=number input fields
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS The value "101" doesn't overflow the maximum value "100".
-PASS The value "99" doesn't overflow the maximum value "100".
-PASS The value "-101" doesn't overflow the maximum value "-100".
-PASS The value "99" doesn't overflow the maximum value "1E+2".
-PASS The value "0.99" doesn't overflow the maximum value "1.00".
-PASS The value "abc" doesn't overflow the maximum value "100".
-PASS The value "" doesn't overflow the maximum value "-1".
-PASS The value "101" doesn't overflow the maximum value "".
-PASS The value "101" doesn't overflow the maximum value "xxx".
-PASS The value "0.999999999999999999999999999999999999999999" doesn't overflow the maximum value "0.999999999999999999999999999999999999999998".
-PASS The value "101" overflows the maximum value "100".
-PASS The value "-99" overflows the maximum value "-100".
-PASS The value "101" overflows the maximum value "1E+2".
-PASS The value "101" overflows the maximum value "100".
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/ValidityState-rangeOverflow-number.html b/LayoutTests/fast/forms/ValidityState-rangeOverflow-number.html
deleted file mode 100644
index 58e5fa8..0000000
--- a/LayoutTests/fast/forms/ValidityState-rangeOverflow-number.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!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/ValidityState-rangeOverflow-number.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/ValidityState-rangeOverflow-range-expected.txt b/LayoutTests/fast/forms/ValidityState-rangeOverflow-range-expected.txt
deleted file mode 100644
index 1a09a00..0000000
--- a/LayoutTests/fast/forms/ValidityState-rangeOverflow-range-expected.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-This test aims to check for rangeOverflow flag with type=range input fields
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS The value "101" doesn't overflow the maximum value "100".
-PASS The value "99" doesn't overflow the maximum value "100".
-PASS The value "-101" doesn't overflow the maximum value "-100".
-PASS The value "99" doesn't overflow the maximum value "1E+2".
-PASS The value "0.99" doesn't overflow the maximum value "1.00".
-PASS The value "abc" doesn't overflow the maximum value "100".
-PASS The value "" doesn't overflow the maximum value "-1".
-PASS The value "0.999999999999999999999999999999999999999999" doesn't overflow the maximum value "0.999999999999999999999999999999999999999998".
-PASS The value "101" doesn't overflow the maximum value "100".
-PASS The value "101" overflows the maximum value "100".
-PASS The value "-99" overflows the maximum value "-100".
-PASS The value "101" overflows the maximum value "1E+2".
-PASS The value "101" overflows the maximum value "".
-PASS The value "101" overflows the maximum value "xxx".
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/ValidityState-rangeOverflow-range.html b/LayoutTests/fast/forms/ValidityState-rangeOverflow-range.html
deleted file mode 100644
index 0385b25..0000000
--- a/LayoutTests/fast/forms/ValidityState-rangeOverflow-range.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!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/ValidityState-rangeOverflow-range.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/ValidityState-rangeUnderflow-number-expected.txt b/LayoutTests/fast/forms/ValidityState-rangeUnderflow-number-expected.txt
deleted file mode 100644
index 807997f..0000000
--- a/LayoutTests/fast/forms/ValidityState-rangeUnderflow-number-expected.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-This test aims to check for rangeUnderflow flag with type=number input fields
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS The value "99" doesn't underflow the minimum value "100".
-PASS The value "101" doesn't underflow the minimum value "100".
-PASS The value "-99" doesn't underflow the minimum value "-100".
-PASS The value "101" doesn't underflow the minimum value "1E+2".
-PASS The value "1.01" doesn't underflow the minimum value "1.00".
-PASS The value "abc" doesn't underflow the minimum value "100".
-PASS The value "" doesn't underflow the minimum value "1".
-PASS The value "-1" doesn't underflow the minimum value "".
-PASS The value "-1" doesn't underflow the minimum value "xxx".
-PASS The value "0.999999999999999999999999999999999999999998" doesn't underflow the minimum value "0.999999999999999999999999999999999999999999".
-PASS The value "99" underflows the minimum value "100".
-PASS The value "-101" underflows the minimum value "-100".
-PASS The value "99" underflows the minimum value "1E+2".
-PASS The value "101" underflows the minimum value "200".
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/ValidityState-rangeUnderflow-number.html b/LayoutTests/fast/forms/ValidityState-rangeUnderflow-number.html
deleted file mode 100644
index 5e7527b..0000000
--- a/LayoutTests/fast/forms/ValidityState-rangeUnderflow-number.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!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/ValidityState-rangeUnderflow-number.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/ValidityState-rangeUnderflow-range-expected.txt b/LayoutTests/fast/forms/ValidityState-rangeUnderflow-range-expected.txt
deleted file mode 100644
index cb6ca85..0000000
--- a/LayoutTests/fast/forms/ValidityState-rangeUnderflow-range-expected.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-This test aims to check for rangeUnderflow flag with type=range input fields
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS The value "99" doesn't underflow the minimum value "100".
-PASS The value "101" doesn't underflow the minimum value "100".
-PASS The value "-99" doesn't underflow the minimum value "-100".
-PASS The value "101" doesn't underflow the minimum value "1E+2".
-PASS The value "1.01" doesn't underflow the minimum value "1.00".
-PASS The value "abc" doesn't underflow the minimum value "100".
-PASS The value "" doesn't underflow the minimum value "1".
-PASS The value "0.999999999999999999999999999999999999999998" doesn't underflow the minimum value "0.999999999999999999999999999999999999999999".
-PASS The value "101" doesn't underflow the minimum value "100".
-PASS The value "99" underflows the minimum value "100".
-PASS The value "-101" underflows the minimum value "-100".
-PASS The value "99" underflows the minimum value "1E+2".
-PASS The value "-1" underflows the minimum value "".
-PASS The value "-1" underflows the minimum value "xxx".
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/ValidityState-rangeUnderflow-range.html b/LayoutTests/fast/forms/ValidityState-rangeUnderflow-range.html
deleted file mode 100644
index 6ffbebf..0000000
--- a/LayoutTests/fast/forms/ValidityState-rangeUnderflow-range.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!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/ValidityState-rangeUnderflow-range.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/input-minmax-expected.txt b/LayoutTests/fast/forms/input-minmax-expected.txt
deleted file mode 100644
index cede00d..0000000
--- a/LayoutTests/fast/forms/input-minmax-expected.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-Tests the behavior of .min and .max of HTMLInputElement.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS input.min is ""
-PASS input.max is ""
-PASS input.min is "0"
-PASS input.max is "100"
-PASS input.min is "abc"
-PASS input.max is "qwerty"
-PASS input.getAttribute("min") is "foo"
-PASS input.getAttribute("max") is "bar"
-PASS input.getAttribute("min") is ""
-PASS input.getAttribute("max") is ""
-PASS input.min is ""
-PASS input.max is ""
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/input-minmax.html b/LayoutTests/fast/forms/input-minmax.html
deleted file mode 100644
index 22f8dd9..0000000
--- a/LayoutTests/fast/forms/input-minmax.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!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-minmax.js"></script>
-<script src="../../fast/js/resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/fast/forms/script-tests/ValidityState-rangeOverflow-number.js b/LayoutTests/fast/forms/script-tests/ValidityState-rangeOverflow-number.js
deleted file mode 100644
index f459f2d..0000000
--- a/LayoutTests/fast/forms/script-tests/ValidityState-rangeOverflow-number.js
+++ /dev/null
@@ -1,40 +0,0 @@
-description('This test aims to check for rangeOverflow flag with type=number input fields');
-
-var input = document.createElement('input');
-
-function check(value, max, overflowExpected)
-{
-    input.value = value;
-    input.max = max;
-    var actual = input.validity.rangeOverflow;
-    var didPass = actual == overflowExpected;
-    var resultText = 'The value "' + input.value + '" ' + (actual ? 'overflows' : 'doesn\'t overflow') + ' the maximum value "' + input.max + '".';
-    if (didPass)
-        testPassed(resultText);
-    else
-        testFailed(resultText);
-}
-
-// No overflow cases
-input.type = 'text';  // No overflow for type=text.
-check('101', '100', false);
-input.type = 'number';
-check('99', '100', false);  // Very normal case.
-check('-101', '-100', false);
-check('99', '1E+2', false);
-check('0.99', '1.00', false);
-check('abc', '100', false);  // Invalid value.
-check('', '-1', false);  // No value.
-check('101', '', false);  // No max.
-check('101', 'xxx', false);  // Invalid max.
-// The following case should be rangeOverflow==true ideally.  But the "double" type doesn't have enough precision.
-check('0.999999999999999999999999999999999999999999', '0.999999999999999999999999999999999999999998', false);
-
-// Overflow cases
-check('101', '100', true);
-check('-99', '-100', true);
-check('101', '1E+2', true);
-input.min = '200';  // value < min && value > max
-check('101', '100', true);
-
-var successfullyParsed = true;
diff --git a/LayoutTests/fast/forms/script-tests/ValidityState-rangeOverflow-range.js b/LayoutTests/fast/forms/script-tests/ValidityState-rangeOverflow-range.js
deleted file mode 100644
index 27b01a1..0000000
--- a/LayoutTests/fast/forms/script-tests/ValidityState-rangeOverflow-range.js
+++ /dev/null
@@ -1,43 +0,0 @@
-description('This test aims to check for rangeOverflow flag with type=range input fields');
-
-var input = document.createElement('input');
-
-function check(value, max, overflowExpected)
-{
-    input.value = value;
-    input.max = max;
-    var actual = input.validity.rangeOverflow;
-    var didPass = actual == overflowExpected;
-    var resultText = 'The value "' + input.value + '" ' + (actual ? 'overflows' : 'doesn\'t overflow') + ' the maximum value "' + input.max + '".';
-    if (didPass)
-        testPassed(resultText);
-    else
-        testFailed(resultText);
-}
-
-// No overflow cases
-input.type = 'text';  // No overflow for type=text.
-check('101', '100', false);
-input.type = 'range';
-check('99', '100', false);  // Very normal case.
-check('-101', '-100', false);
-check('99', '1E+2', false);
-check('0.99', '1.00', false);
-check('abc', '100', false);  // Invalid value.
-check('', '-1', false);  // No value.
-// The following case should be rangeOverflow==true ideally.  But the "double" type doesn't have enough precision.
-check('0.999999999999999999999999999999999999999999', '0.999999999999999999999999999999999999999998', false);
-input.min = '200';  // If min > max, max is reset to min.
-check('101', '100', false);
-input.min = '';
-
-// Overflow cases
-check('101', '100', true);
-input.min = '-200';
-check('-99', '-100', true);
-input.min = '';
-check('101', '1E+2', true);
-check('101', '', true);  // No max.
-check('101', 'xxx', true);  // Invalid max.
-
-var successfullyParsed = true;
diff --git a/LayoutTests/fast/forms/script-tests/ValidityState-rangeUnderflow-number.js b/LayoutTests/fast/forms/script-tests/ValidityState-rangeUnderflow-number.js
deleted file mode 100644
index f4edfe2..0000000
--- a/LayoutTests/fast/forms/script-tests/ValidityState-rangeUnderflow-number.js
+++ /dev/null
@@ -1,40 +0,0 @@
-description('This test aims to check for rangeUnderflow flag with type=number input fields');
-
-var input = document.createElement('input');
-
-function check(value, min, underflowExpected)
-{
-    input.value = value;
-    input.min = min;
-    var actual = input.validity.rangeUnderflow;
-    var didPass = actual == underflowExpected;
-    var resultText = 'The value "' + input.value + '" ' + (actual ? 'underflows' : 'doesn\'t underflow') + ' the minimum value "' + input.min + '".';
-    if (didPass)
-        testPassed(resultText);
-    else
-        testFailed(resultText);
-}
-
-// No underflow cases
-input.type = 'text';  // No underflow for type=text.
-check('99', '100', false);
-input.type = 'number';
-check('101', '100', false);  // Very normal case.
-check('-99', '-100', false);
-check('101', '1E+2', false);
-check('1.01', '1.00', false);
-check('abc', '100', false);  // Invalid value.
-check('', '1', false);  // No value.
-check('-1', '', false);  // No min.
-check('-1', 'xxx', false);  // Invalid min.
-// The following case should be rangeUnderflow==true ideally.  But the "double" type doesn't have enough precision.
-check('0.999999999999999999999999999999999999999998', '0.999999999999999999999999999999999999999999', false);
-
-// Underflow cases
-check('99', '100', true);
-check('-101', '-100', true);
-check('99', '1E+2', true);
-input.max = '100';  // value < min && value > max
-check('101', '200', true);
-
-var successfullyParsed = true;
diff --git a/LayoutTests/fast/forms/script-tests/ValidityState-rangeUnderflow-range.js b/LayoutTests/fast/forms/script-tests/ValidityState-rangeUnderflow-range.js
deleted file mode 100644
index 5e45bb2..0000000
--- a/LayoutTests/fast/forms/script-tests/ValidityState-rangeUnderflow-range.js
+++ /dev/null
@@ -1,41 +0,0 @@
-description('This test aims to check for rangeUnderflow flag with type=range input fields');
-
-var input = document.createElement('input');
-
-function check(value, min, underflowExpected)
-{
-    input.value = value;
-    input.min = min;
-    var actual = input.validity.rangeUnderflow;
-    var didPass = actual == underflowExpected;
-    var resultText = 'The value "' + input.value + '" ' + (actual ? 'underflows' : 'doesn\'t underflow') + ' the minimum value "' + input.min + '".';
-    if (didPass)
-        testPassed(resultText);
-    else
-        testFailed(resultText);
-}
-
-// No underflow cases
-input.type = 'text';  // No overflow for type=text.
-check('99', '100', false);
-input.type = 'range';
-check('101', '100', false);  // Very normal case.
-check('-99', '-100', false);
-check('101', '1E+2', false);
-check('1.01', '1.00', false);
-check('abc', '100', false);  // Invalid value.
-check('', '1', false);  // No value.
-// The following case should be rangeUnderflow==true ideally.  But the "double" type doesn't have enough precision.
-check('0.999999999999999999999999999999999999999998', '0.999999999999999999999999999999999999999999', false);
-input.max = '0';  // If min > max, max is reset to min and min is not changed.
-check('101', '100', false);
-input.max = '';
-
-// Underflow cases
-check('99', '100', true);
-check('-101', '-100', true);
-check('99', '1E+2', true);
-check('-1', '', true);  // No min.
-check('-1', 'xxx', true);  // Invalid min.
-
-var successfullyParsed = true;
diff --git a/LayoutTests/fast/forms/script-tests/input-minmax.js b/LayoutTests/fast/forms/script-tests/input-minmax.js
deleted file mode 100644
index 068c5cc..0000000
--- a/LayoutTests/fast/forms/script-tests/input-minmax.js
+++ /dev/null
@@ -1,35 +0,0 @@
-description('Tests the behavior of .min and .max of HTMLInputElement.');
-
-var input = document.createElement('input');
-
-// .min and .max just reflect the corresponding attributes.
-input.type = 'text';
-shouldBe('input.min', '""');
-shouldBe('input.max', '""');
-input.setAttribute('min', '0');
-input.setAttribute('max', '100');
-shouldBe('input.min', '"0"');
-shouldBe('input.max', '"100"');
-input.setAttribute('min', 'abc');
-input.setAttribute('max', 'qwerty');
-shouldBe('input.min', '"abc"');
-shouldBe('input.max', '"qwerty"');
-
-input.min = 'foo';
-input.max = 'bar';
-shouldBe('input.getAttribute("min")', '"foo"');
-shouldBe('input.getAttribute("max")', '"bar"');
-input.min = '';
-input.max = '';
-shouldBe('input.getAttribute("min")', '""');
-shouldBe('input.getAttribute("max")', '""');
-
-// The range type has the default minimum and the default maximum.
-// But they aren't exposed by .min .max IDL attributes.
-input.type = 'range';
-input.setAttribute('min', '');
-input.setAttribute('max', '');
-shouldBe('input.min', '""');
-shouldBe('input.max', '""');
-
-var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 55f1521..5cc5377 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2009-10-05  Eric Seidel  <eric at webkit.org>
+
+        No review, rolling out r49104.
+        http://trac.webkit.org/changeset/49104
+
+        * html/HTMLInputElement.cpp:
+        * html/HTMLInputElement.h:
+        * html/HTMLInputElement.idl:
+        * html/ValidityState.cpp:
+        * html/ValidityState.h:
+        (WebCore::ValidityState::rangeUnderflow):
+        (WebCore::ValidityState::rangeOverflow):
+        * rendering/RenderSlider.cpp:
+        (WebCore::SliderRange::SliderRange):
+        (WebCore::SliderRange::valueFromElement):
+
 2009-10-05  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp
index fa0e343..b9fc2c9 100644
--- a/WebCore/html/HTMLInputElement.cpp
+++ b/WebCore/html/HTMLInputElement.cpp
@@ -232,62 +232,6 @@ bool HTMLInputElement::tooLong() const
     return false;
 }
 
-bool HTMLInputElement::rangeUnderflow() const
-{
-    if (inputType() == NUMBER) {
-        double min;
-        double doubleValue;
-        if (formStringToDouble(getAttribute(minAttr), &min) && formStringToDouble(value(), &doubleValue))
-            return doubleValue < min;
-    } else if (inputType() == RANGE) {
-        double doubleValue;
-        if (formStringToDouble(value(), &doubleValue))
-            return doubleValue < rangeMinimum();
-    }
-    return false;
-}
-
-bool HTMLInputElement::rangeOverflow() const
-{
-    if (inputType() == NUMBER) {
-        double max;
-        double doubleValue;
-        if (formStringToDouble(getAttribute(maxAttr), &max) && formStringToDouble(value(), &doubleValue))
-            return doubleValue > max;
-    } else if (inputType() == RANGE) {
-        double doubleValue;
-        if (formStringToDouble(value(), &doubleValue))
-            return doubleValue > rangeMaximum();
-    }
-    return false;
-}
-
-double HTMLInputElement::rangeMinimum() const
-{
-    ASSERT(inputType() == RANGE);
-    // The range type's "default minimum" is 0.
-    double min = 0.0;
-    formStringToDouble(getAttribute(minAttr), &min);
-    return min;
-}
-
-double HTMLInputElement::rangeMaximum() const
-{
-    ASSERT(inputType() == RANGE);
-    // The range type's "default maximum" is 100.
-    static const double defaultMaximum = 100.0;
-    double max = defaultMaximum;
-    formStringToDouble(getAttribute(maxAttr), &max);
-    const double min = rangeMinimum();
-
-    if (max < min) {
-        // A remedy for the inconsistent min/max values.
-        // Sets the maxmimum to the default (100.0) or the minimum value.
-        max = min < defaultMaximum ? defaultMaximum : min;
-    }
-    return max;
-}
-
 static inline CheckedRadioButtons& checkedRadioButtons(const HTMLInputElement *element)
 {
     if (HTMLFormElement* form = element->form())
diff --git a/WebCore/html/HTMLInputElement.h b/WebCore/html/HTMLInputElement.h
index 799d92c..0f9474c 100644
--- a/WebCore/html/HTMLInputElement.h
+++ b/WebCore/html/HTMLInputElement.h
@@ -94,14 +94,6 @@ public:
     virtual bool valueMissing() const;
     virtual bool patternMismatch() const;
     virtual bool tooLong() const;
-    // For ValidityState
-    bool rangeUnderflow() const;
-    bool rangeOverflow() const;
-    // Returns the minimum value for type=range.  Don't call this for other types.
-    double rangeMinimum() const;
-    // Returns the maximum value for type=range.  Don't call this for other types.
-    // This always returns a value which is <= rangeMinimum().
-    double rangeMaximum() const;
 
     bool isTextButton() const { return m_type == SUBMIT || m_type == RESET || m_type == BUTTON; }
     virtual bool isRadioButton() const { return m_type == RADIO; }
diff --git a/WebCore/html/HTMLInputElement.idl b/WebCore/html/HTMLInputElement.idl
index bc0d35a..7cdf487 100644
--- a/WebCore/html/HTMLInputElement.idl
+++ b/WebCore/html/HTMLInputElement.idl
@@ -42,10 +42,8 @@ module html {
 #if defined(ENABLE_DATALIST) && ENABLE_DATALIST
         readonly attribute HTMLElement     list;
 #endif
-                 attribute [Reflect] DOMString max;
                  attribute long            maxLength
                      setter raises(DOMException);
-                 attribute [Reflect] DOMString min;
                  attribute boolean         multiple;
                  attribute [ConvertNullToNullString] DOMString name;
                  attribute [Reflect] DOMString       pattern;
diff --git a/WebCore/html/ValidityState.cpp b/WebCore/html/ValidityState.cpp
index 5bf8382..df8933d 100644
--- a/WebCore/html/ValidityState.cpp
+++ b/WebCore/html/ValidityState.cpp
@@ -60,20 +60,6 @@ bool ValidityState::typeMismatch()
     }
 }
 
-bool ValidityState::rangeUnderflow()
-{
-    if (!control()->hasTagName(inputTag))
-        return false;
-    return static_cast<HTMLInputElement*>(control())->rangeUnderflow();
-}
-
-bool ValidityState::rangeOverflow()
-{
-    if (!control()->hasTagName(inputTag))
-        return false;
-    return static_cast<HTMLInputElement*>(control())->rangeOverflow();
-}
-
 bool ValidityState::valid()
 {
     bool someError = typeMismatch() || stepMismatch() || rangeUnderflow() || rangeOverflow() ||
diff --git a/WebCore/html/ValidityState.h b/WebCore/html/ValidityState.h
index 67afa53..9adc8fd 100644
--- a/WebCore/html/ValidityState.h
+++ b/WebCore/html/ValidityState.h
@@ -44,8 +44,8 @@ namespace WebCore {
         bool typeMismatch();
         bool patternMismatch() { return control()->patternMismatch(); }
         bool tooLong() { return control()->tooLong(); }
-        bool rangeUnderflow();
-        bool rangeOverflow();
+        bool rangeUnderflow() { return false; }
+        bool rangeOverflow() { return false; }
         bool stepMismatch() { return false; }
         bool customError() { return !m_customErrorMessage.isEmpty(); }
         bool valid();
diff --git a/WebCore/rendering/RenderSlider.cpp b/WebCore/rendering/RenderSlider.cpp
index 442af39..247acda 100644
--- a/WebCore/rendering/RenderSlider.cpp
+++ b/WebCore/rendering/RenderSlider.cpp
@@ -50,7 +50,7 @@ static const int defaultTrackLength = 129;
 struct SliderRange {
     bool isIntegral;
     double minimum;
-    double maximum;  // maximum must be >= minimum.
+    double maximum;
 
     explicit SliderRange(HTMLInputElement*);
     double clampValue(double value);
@@ -80,8 +80,12 @@ SliderRange::SliderRange(HTMLInputElement* element)
 
     isIntegral = !equalIgnoringCase(element->getAttribute(precisionAttr), "float");
 
-    maximum = element->rangeMaximum();
-    minimum = element->rangeMinimum();
+    // FIXME: This treats maximum strings that can't be parsed as 0, but perhaps 100 would be more appropriate.
+    const AtomicString& maxString = element->getAttribute(maxAttr);
+    maximum = maxString.isNull() ? 100.0 : maxString.toDouble();
+
+    // If the maximum is smaller, use it as the minimum.
+    minimum = min(element->getAttribute(minAttr).toDouble(), maximum);
 }
 
 double SliderRange::clampValue(double value)
@@ -92,14 +96,12 @@ double SliderRange::clampValue(double value)
 
 double SliderRange::valueFromElement(HTMLInputElement* element, bool* wasClamped)
 {
-    double oldValue;
-    bool parseSuccess = HTMLInputElement::formStringToDouble(element->value(), &oldValue);
-    if (!parseSuccess)
-        oldValue = (minimum + maximum) / 2;
+    String valueString = element->value();
+    double oldValue = valueString.isNull() ? (minimum + maximum) / 2 : valueString.toDouble();
     double newValue = clampValue(oldValue);
 
     if (wasClamped)
-        *wasClamped = !parseSuccess || newValue != oldValue;
+        *wasClamped = valueString.isNull() || newValue != oldValue;
 
     return newValue;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list