Changeset 289075 in webkit
- Timestamp:
- Feb 3, 2022 1:34:50 PM (6 months ago)
- Location:
- trunk
- Files:
-
- 24 edited
- 2 copied
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/forms/date/date-stepup-stepdown-expected.txt (modified) (1 diff)
-
LayoutTests/fast/forms/date/date-stepup-stepdown.html (modified) (1 diff)
-
LayoutTests/fast/forms/datetimelocal/datetimelocal-stepup-stepdown-expected.txt (modified) (1 diff)
-
LayoutTests/fast/forms/datetimelocal/datetimelocal-stepup-stepdown.html (modified) (1 diff)
-
LayoutTests/fast/forms/month/month-stepup-stepdown-expected.txt (modified) (1 diff)
-
LayoutTests/fast/forms/month/month-stepup-stepdown.html (modified) (1 diff)
-
LayoutTests/fast/forms/number/number-stepup-stepdown-expected.txt (modified) (1 diff)
-
LayoutTests/fast/forms/number/number-stepup-stepdown.html (modified) (1 diff)
-
LayoutTests/fast/forms/range/range-stepup-stepdown-expected.txt (modified) (2 diffs)
-
LayoutTests/fast/forms/range/range-stepup-stepdown.html (modified) (2 diffs)
-
LayoutTests/fast/forms/time/time-stepup-stepdown-expected.txt (modified) (1 diff)
-
LayoutTests/fast/forms/time/time-stepup-stepdown.html (modified) (1 diff)
-
LayoutTests/fast/forms/week/week-stepup-stepdown-expected.txt (modified) (1 diff)
-
LayoutTests/fast/forms/week/week-stepup-stepdown.html (modified) (1 diff)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepdown-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepup-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-expected.txt (modified) (1 diff)
-
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt (modified) (1 diff)
-
LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepdown-expected.txt (copied) (copied from trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepdown-expected.txt) (1 diff)
-
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepup-expected.txt (copied) (copied from trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepup-expected.txt) (1 diff)
-
LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/html/InputType.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r289074 r289075 1 2022-02-03 Ziran Sun <zsun@igalia.com> 2 3 [Forms] Value doesn't change for stepUp()/stepDown() with out of range values 4 https://bugs.webkit.org/show_bug.cgi?id=235509 5 6 Reviewed by Chris Dumez. 7 8 Update expectation files. 9 10 * fast/forms/date/date-stepup-stepdown-expected.txt: 11 * fast/forms/date/date-stepup-stepdown.html: 12 * fast/forms/datetimelocal/datetimelocal-stepup-stepdown-expected.txt: 13 * fast/forms/datetimelocal/datetimelocal-stepup-stepdown.html: 14 * fast/forms/month/month-stepup-stepdown-expected.txt: 15 * fast/forms/month/month-stepup-stepdown.html: 16 * fast/forms/number/number-stepup-stepdown-expected.txt: 17 * fast/forms/number/number-stepup-stepdown.html: 18 * fast/forms/range/range-stepup-stepdown-expected.txt: 19 * fast/forms/range/range-stepup-stepdown.html: 20 * fast/forms/time/time-stepup-stepdown-expected.txt: 21 * fast/forms/time/time-stepup-stepdown.html: 22 * fast/forms/week/week-stepup-stepdown-expected.txt: 23 * fast/forms/week/week-stepup-stepdown.html: 24 * platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt: 25 * platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt: 26 * platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepdown-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepdown-expected.txt. 27 * platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepup-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepup-expected.txt. 28 * platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt: 29 1 30 2022-02-03 Nikolaos Mouchtaris <nmouchtaris@apple.com> 2 31 -
trunk/LayoutTests/fast/forms/date/date-stepup-stepdown-expected.txt
r219663 r289075 25 25 PASS stepDown("2010-02-10", "any", null) threw exception InvalidStateError: The object is in an invalid state.. 26 26 Overflow/underflow 27 PASS stepUp("2010-02-10", "3.40282346e+38", null) threw exception InvalidStateError: The object is in an invalid state..28 PASS stepDown("2010-02-10", "3.40282346e+38", null) threw exception InvalidStateError: The object is in an invalid state..29 PASS stepUp("2010-02-10", "1", "2010-02-10") threw exception InvalidStateError: The object is in an invalid state..30 PASS stepDown("2010-02-10", "1", "2010-02-10") threw exception InvalidStateError: The object is in an invalid state..27 PASS stepUp("2010-02-10", "3.40282346e+38", null) is "2010-02-10" 28 PASS stepDown("2010-02-10", "3.40282346e+38", null) is "2010-02-10" 29 PASS stepUp("2010-02-10", "1", "2010-02-10") is "2010-02-10" 30 PASS stepDown("2010-02-10", "1", "2010-02-10") is "2010-02-10" 31 31 32 32 PASS successfullyParsed is true -
trunk/LayoutTests/fast/forms/date/date-stepup-stepdown.html
r219663 r289075 59 59 shouldThrowErrorName('stepDown("2010-02-10", "any", null)', "InvalidStateError"); 60 60 debug('Overflow/underflow'); 61 should ThrowErrorName('stepUp("2010-02-10", "3.40282346e+38", null)', "InvalidStateError");62 should ThrowErrorName('stepDown("2010-02-10", "3.40282346e+38", null)', "InvalidStateError");63 should ThrowErrorName('stepUp("2010-02-10", "1", "2010-02-10")', "InvalidStateError");64 should ThrowErrorName('stepDown("2010-02-10", "1", "2010-02-10")', "InvalidStateError");61 shouldBe('stepUp("2010-02-10", "3.40282346e+38", null)', '"2010-02-10"'); 62 shouldBe('stepDown("2010-02-10", "3.40282346e+38", null)', '"2010-02-10"'); 63 shouldBe('stepUp("2010-02-10", "1", "2010-02-10")', '"2010-02-10"'); 64 shouldBe('stepDown("2010-02-10", "1", "2010-02-10")', '"2010-02-10"'); 65 65 66 66 debug(''); -
trunk/LayoutTests/fast/forms/datetimelocal/datetimelocal-stepup-stepdown-expected.txt
r219663 r289075 25 25 PASS stepDown("2010-02-10T20:13", "any", null) threw exception InvalidStateError: The object is in an invalid state.. 26 26 Overflow/underflow 27 PASS stepUp("2010-02-10T20:13", "3.40282346e+38", null) threw exception InvalidStateError: The object is in an invalid state..28 PASS stepDown("2010-02-10T20:13", "3.40282346e+38", null) threw exception InvalidStateError: The object is in an invalid state..29 PASS stepUp("2010-02-10T20:13", "1", "2010-02-10T20:13") threw exception InvalidStateError: The object is in an invalid state..30 PASS stepDown("2010-02-10T20:13", "1", "2010-02-10T20:13") threw exception InvalidStateError: The object is in an invalid state..27 PASS stepUp("2010-02-10T20:13", "3.40282346e+38", null) is "2010-02-10T20:13" 28 PASS stepDown("2010-02-10T20:13", "3.40282346e+38", null) is "2010-02-10T20:13" 29 PASS stepUp("2010-02-10T20:13", "1", "2010-02-10T20:13") is "2010-02-10T20:13" 30 PASS stepDown("2010-02-10T20:13", "1", "2010-02-10T20:13") is "2010-02-10T20:13" 31 31 PASS successfullyParsed is true 32 32 -
trunk/LayoutTests/fast/forms/datetimelocal/datetimelocal-stepup-stepdown.html
r219663 r289075 59 59 shouldThrowErrorName('stepDown("2010-02-10T20:13", "any", null)', "InvalidStateError"); 60 60 debug('Overflow/underflow'); 61 should ThrowErrorName('stepUp("2010-02-10T20:13", "3.40282346e+38", null)', "InvalidStateError");62 should ThrowErrorName('stepDown("2010-02-10T20:13", "3.40282346e+38", null)', "InvalidStateError");63 should ThrowErrorName('stepUp("2010-02-10T20:13", "1", "2010-02-10T20:13")', "InvalidStateError");64 should ThrowErrorName('stepDown("2010-02-10T20:13", "1", "2010-02-10T20:13")', "InvalidStateError");61 shouldBe('stepUp("2010-02-10T20:13", "3.40282346e+38", null)', '"2010-02-10T20:13"'); 62 shouldBe('stepDown("2010-02-10T20:13", "3.40282346e+38", null)', '"2010-02-10T20:13"'); 63 shouldBe('stepUp("2010-02-10T20:13", "1", "2010-02-10T20:13")', '"2010-02-10T20:13"'); 64 shouldBe('stepDown("2010-02-10T20:13", "1", "2010-02-10T20:13")', '"2010-02-10T20:13"'); 65 65 </script> 66 66 <script src="../../../resources/js-test-post.js"></script> -
trunk/LayoutTests/fast/forms/month/month-stepup-stepdown-expected.txt
r219663 r289075 25 25 PASS stepDown("2010-02", "any", null) threw exception InvalidStateError: The object is in an invalid state.. 26 26 Overflow/underflow 27 PASS stepUp("2010-02", "3.40282346e+38", null) threw exception InvalidStateError: The object is in an invalid state..28 PASS stepDown("2010-02", "3.40282346e+38", null) threw exception InvalidStateError: The object is in an invalid state..29 PASS stepUp("2010-02", "1", "2010-02") threw exception InvalidStateError: The object is in an invalid state..30 PASS stepDown("2010-02", "1", "2010-02") threw exception InvalidStateError: The object is in an invalid state..27 PASS stepUp("2010-02", "3.40282346e+38", null) is "2010-02" 28 PASS stepDown("2010-02", "3.40282346e+38", null) is "2010-02" 29 PASS stepUp("2010-02", "1", "2010-02") is "2010-02" 30 PASS stepDown("2010-02", "1", "2010-02") is "2010-02" 31 31 32 32 PASS successfullyParsed is true -
trunk/LayoutTests/fast/forms/month/month-stepup-stepdown.html
r219663 r289075 59 59 shouldThrowErrorName('stepDown("2010-02", "any", null)', "InvalidStateError"); 60 60 debug('Overflow/underflow'); 61 should ThrowErrorName('stepUp("2010-02", "3.40282346e+38", null)', "InvalidStateError");62 should ThrowErrorName('stepDown("2010-02", "3.40282346e+38", null)', "InvalidStateError");63 should ThrowErrorName('stepUp("2010-02", "1", "2010-02")', "InvalidStateError");64 should ThrowErrorName('stepDown("2010-02", "1", "2010-02")', "InvalidStateError");61 shouldBe('stepUp("2010-02", "3.40282346e+38", null)', '"2010-02"'); 62 shouldBe('stepDown("2010-02", "3.40282346e+38", null)', '"2010-02"'); 63 shouldBe('stepUp("2010-02", "1", "2010-02")', '"2010-02"'); 64 shouldBe('stepDown("2010-02", "1", "2010-02")', '"2010-02"'); 65 65 66 66 debug(''); -
trunk/LayoutTests/fast/forms/number/number-stepup-stepdown-expected.txt
r219663 r289075 142 142 Overflow/underflow 143 143 PASS stepDown("1", "1", "0") is "0" 144 PASS stepDown("0", "1", "0") threw exception InvalidStateError: The object is in an invalid state..145 PASS stepDown("1", "1", "0", 2) threw exception InvalidStateError: The object is in an invalid state..144 PASS stepDown("0", "1", "0") is "0" 145 PASS stepDown("1", "1", "0", 2) is "1" 146 146 PASS input.value is "1" 147 PASS stepDown("1", "3.40282346e+38", "", 2) threw exception InvalidStateError: The object is in an invalid state..147 PASS stepDown("1", "3.40282346e+38", "", 2) is "1" 148 148 PASS stepUp("-1", "1", "0") is "0" 149 PASS stepUp("0", "1", "0") threw exception InvalidStateError: The object is in an invalid state..150 PASS stepUp("-1", "1", "0", 2) threw exception InvalidStateError: The object is in an invalid state..149 PASS stepUp("0", "1", "0") is "0" 150 PASS stepUp("-1", "1", "0", 2) is "-1" 151 151 PASS input.value is "-1" 152 PASS stepUp("1", "3.40282346e+38", "", 2) threw exception InvalidStateError: The object is in an invalid state..152 PASS stepUp("1", "3.40282346e+38", "", 2) is "1" 153 153 154 154 stepDown()/stepUp() for stepMismatch values -
trunk/LayoutTests/fast/forms/number/number-stepup-stepdown.html
r219663 r289075 221 221 debug('Overflow/underflow'); 222 222 shouldBe('stepDown("1", "1", "0")', '"0"'); 223 should ThrowErrorName('stepDown("0", "1", "0")', "InvalidStateError");224 should ThrowErrorName('stepDown("1", "1", "0", 2)', "InvalidStateError");223 shouldBe('stepDown("0", "1", "0")', '"0"'); 224 shouldBe('stepDown("1", "1", "0", 2)', '"1"'); 225 225 shouldBe('input.value', '"1"'); 226 should ThrowErrorName('stepDown("1", "3.40282346e+38", "", 2)', "InvalidStateError");226 shouldBe('stepDown("1", "3.40282346e+38", "", 2)', '"1"'); 227 227 shouldBe('stepUp("-1", "1", "0")', '"0"'); 228 should ThrowErrorName('stepUp("0", "1", "0")', "InvalidStateError");229 should ThrowErrorName('stepUp("-1", "1", "0", 2)', "InvalidStateError");228 shouldBe('stepUp("0", "1", "0")', '"0"'); 229 shouldBe('stepUp("-1", "1", "0", 2)', '"-1"'); 230 230 shouldBe('input.value', '"-1"'); 231 should ThrowErrorName('stepUp("1", "3.40282346e+38", "", 2)', "InvalidStateError");231 shouldBe('stepUp("1", "3.40282346e+38", "", 2)', '"1"'); 232 232 233 233 debug(''); -
trunk/LayoutTests/fast/forms/range/range-stepup-stepdown-expected.txt
r219663 r289075 140 140 Overflow/underflow 141 141 PASS stepUpExplicitBounds(null, "100", "1", "99") is "100" 142 PASS stepUpExplicitBounds(null, "100", "1", "100") threw exception InvalidStateError: The object is in an invalid state..142 PASS stepUpExplicitBounds(null, "100", "1", "100") is "100" 143 143 PASS input.value is "100" 144 PASS stepUpExplicitBounds(null, "100", "1", "99", "2") threw exception InvalidStateError: The object is in an invalid state..144 PASS stepUpExplicitBounds(null, "100", "1", "99", "2") is "99" 145 145 PASS input.value is "99" 146 146 PASS stepDownExplicitBounds("0", null, "1", "1") is "0" 147 PASS stepDownExplicitBounds("0", null, "1", "0") threw exception InvalidStateError: The object is in an invalid state..147 PASS stepDownExplicitBounds("0", null, "1", "0") is "0" 148 148 PASS input.value is "0" 149 PASS stepDownExplicitBounds("0", null, "1", "1", "2") threw exception InvalidStateError: The object is in an invalid state..149 PASS stepDownExplicitBounds("0", null, "1", "1", "2") is "1" 150 150 PASS input.value is "1" 151 PASS stepDownExplicitBounds(null, null, "3.40282346e+38", "1", "2") threw exception InvalidStateError: The object is in an invalid state..151 PASS stepDownExplicitBounds(null, null, "3.40282346e+38", "1", "2") is "0" 152 152 PASS stepUpExplicitBounds(-100, 0, 1, -1) is "0" 153 PASS stepUpExplicitBounds(null, 0, 1, 0) threw exception InvalidStateError: The object is in an invalid state..154 PASS stepUpExplicitBounds(-100, 0, 1, -1, 2) threw exception InvalidStateError: The object is in an invalid state..153 PASS stepUpExplicitBounds(null, 0, 1, 0) is "0" 154 PASS stepUpExplicitBounds(-100, 0, 1, -1, 2) is "-1" 155 155 PASS input.value is "-1" 156 PASS stepUpExplicitBounds(null, null, "3.40282346e+38", "1", "2") threw exception InvalidStateError: The object is in an invalid state..156 PASS stepUpExplicitBounds(null, null, "3.40282346e+38", "1", "2") is "0" 157 157 158 158 stepDown()/stepUp() for stepMismatch values … … 163 163 164 164 value + step is <= max, but rounded result would be > max. 165 PASS stepUpExplicitBounds(null, 99, 10, 89) threw exception InvalidStateError: The object is in an invalid state..165 PASS stepUpExplicitBounds(null, 99, 10, 89) is "90" 166 166 167 167 Huge value and small step -
trunk/LayoutTests/fast/forms/range/range-stepup-stepdown.html
r219663 r289075 230 230 debug('Overflow/underflow'); 231 231 shouldBe('stepUpExplicitBounds(null, "100", "1", "99")', '"100"'); 232 should ThrowErrorName('stepUpExplicitBounds(null, "100", "1", "100")', "InvalidStateError");232 shouldBe('stepUpExplicitBounds(null, "100", "1", "100")', '"100"'); 233 233 shouldBe('input.value', '"100"'); 234 should ThrowErrorName('stepUpExplicitBounds(null, "100", "1", "99", "2")', "InvalidStateError");234 shouldBe('stepUpExplicitBounds(null, "100", "1", "99", "2")', '"99"'); 235 235 shouldBe('input.value', '"99"'); 236 236 shouldBe('stepDownExplicitBounds("0", null, "1", "1")', '"0"'); 237 should ThrowErrorName('stepDownExplicitBounds("0", null, "1", "0")', "InvalidStateError");237 shouldBe('stepDownExplicitBounds("0", null, "1", "0")', '"0"'); 238 238 shouldBe('input.value', '"0"'); 239 should ThrowErrorName('stepDownExplicitBounds("0", null, "1", "1", "2")', "InvalidStateError");239 shouldBe('stepDownExplicitBounds("0", null, "1", "1", "2")', '"1"'); 240 240 shouldBe('input.value', '"1"'); 241 should ThrowErrorName('stepDownExplicitBounds(null, null, "3.40282346e+38", "1", "2")', "InvalidStateError");241 shouldBe('stepDownExplicitBounds(null, null, "3.40282346e+38", "1", "2")', '"0"'); 242 242 shouldBe('stepUpExplicitBounds(-100, 0, 1, -1)', '"0"'); 243 should ThrowErrorName('stepUpExplicitBounds(null, 0, 1, 0)', "InvalidStateError");244 should ThrowErrorName('stepUpExplicitBounds(-100, 0, 1, -1, 2)', "InvalidStateError");243 shouldBe('stepUpExplicitBounds(null, 0, 1, 0)', '"0"'); 244 shouldBe('stepUpExplicitBounds(-100, 0, 1, -1, 2)', '"-1"'); 245 245 shouldBe('input.value', '"-1"'); 246 should ThrowErrorName('stepUpExplicitBounds(null, null, "3.40282346e+38", "1", "2")', "InvalidStateError");246 shouldBe('stepUpExplicitBounds(null, null, "3.40282346e+38", "1", "2")', '"0"'); 247 247 248 248 debug(''); … … 255 255 debug(''); 256 256 debug('value + step is <= max, but rounded result would be > max.'); 257 should ThrowErrorName('stepUpExplicitBounds(null, 99, 10, 89)', "InvalidStateError");257 shouldBe('stepUpExplicitBounds(null, 99, 10, 89)', '"90"'); 258 258 259 259 debug(''); -
trunk/LayoutTests/fast/forms/time/time-stepup-stepdown-expected.txt
r219663 r289075 25 25 PASS stepDown("20:13", "any", null) threw exception InvalidStateError: The object is in an invalid state.. 26 26 Overflow/underflow 27 PASS stepUp("20:13", "3.40282346e+38", null) threw exception InvalidStateError: The object is in an invalid state..28 PASS stepDown("20:13", "3.40282346e+38", null) threw exception InvalidStateError: The object is in an invalid state..29 PASS stepUp("20:13", "1", "20:13") threw exception InvalidStateError: The object is in an invalid state..30 PASS stepDown("20:13", "1", "20:13") threw exception InvalidStateError: The object is in an invalid state..31 PASS stepUp("23:59", null, null) threw exception InvalidStateError: The object is in an invalid state..32 PASS stepDown("00:00", null, null) threw exception InvalidStateError: The object is in an invalid state..27 PASS stepUp("20:13", "3.40282346e+38", null) is "20:13" 28 PASS stepDown("20:13", "3.40282346e+38", null) is "20:13" 29 PASS stepUp("20:13", "1", "20:13") is "20:13" 30 PASS stepDown("20:13", "1", "20:13") is "20:13" 31 PASS stepUp("23:59", null, null) is "23:59" 32 PASS stepDown("00:00", null, null) is "00:00" 33 33 34 34 PASS successfullyParsed is true -
trunk/LayoutTests/fast/forms/time/time-stepup-stepdown.html
r219663 r289075 59 59 shouldThrowErrorName('stepDown("20:13", "any", null)', "InvalidStateError"); 60 60 debug('Overflow/underflow'); 61 should ThrowErrorName('stepUp("20:13", "3.40282346e+38", null)', "InvalidStateError");62 should ThrowErrorName('stepDown("20:13", "3.40282346e+38", null)', "InvalidStateError");63 should ThrowErrorName('stepUp("20:13", "1", "20:13")', "InvalidStateError");64 should ThrowErrorName('stepDown("20:13", "1", "20:13")', "InvalidStateError");65 should ThrowErrorName('stepUp("23:59", null, null)', "InvalidStateError");66 should ThrowErrorName('stepDown("00:00", null, null)', "InvalidStateError");61 shouldBe('stepUp("20:13", "3.40282346e+38", null)', '"20:13"'); 62 shouldBe('stepDown("20:13", "3.40282346e+38", null)', '"20:13"'); 63 shouldBe('stepUp("20:13", "1", "20:13")', '"20:13"'); 64 shouldBe('stepDown("20:13", "1", "20:13")', '"20:13"'); 65 shouldBe('stepUp("23:59", null, null)', '"23:59"'); 66 shouldBe('stepDown("00:00", null, null)', '"00:00"'); 67 67 68 68 debug(''); -
trunk/LayoutTests/fast/forms/week/week-stepup-stepdown-expected.txt
r219663 r289075 25 25 PASS stepDown("2010-W02", "any", null) threw exception InvalidStateError: The object is in an invalid state.. 26 26 Overflow/underflow 27 PASS stepUp("2010-W02", "3.40282346e+38", null) threw exception InvalidStateError: The object is in an invalid state..28 PASS stepDown("2010-W02", "3.40282346e+38", null) threw exception InvalidStateError: The object is in an invalid state..29 PASS stepUp("2010-W02", "1", "2010-W02") threw exception InvalidStateError: The object is in an invalid state..30 PASS stepDown("2010-W02", "1", "2010-W02") threw exception InvalidStateError: The object is in an invalid state..27 PASS stepUp("2010-W02", "3.40282346e+38", null) is "2010-W02" 28 PASS stepDown("2010-W02", "3.40282346e+38", null) is "2010-W02" 29 PASS stepUp("2010-W02", "1", "2010-W02") is "2010-W02" 30 PASS stepDown("2010-W02", "1", "2010-W02") is "2010-W02" 31 31 32 32 PASS successfullyParsed is true -
trunk/LayoutTests/fast/forms/week/week-stepup-stepdown.html
r219663 r289075 59 59 shouldThrowErrorName('stepDown("2010-W02", "any", null)', "InvalidStateError"); 60 60 debug('Overflow/underflow'); 61 should ThrowErrorName('stepUp("2010-W02", "3.40282346e+38", null)', "InvalidStateError");62 should ThrowErrorName('stepDown("2010-W02", "3.40282346e+38", null)', "InvalidStateError");63 should ThrowErrorName('stepUp("2010-W02", "1", "2010-W02")', "InvalidStateError");64 should ThrowErrorName('stepDown("2010-W02", "1", "2010-W02")', "InvalidStateError");61 shouldBe('stepUp("2010-W02", "3.40282346e+38", null)', '"2010-W02"'); 62 shouldBe('stepDown("2010-W02", "3.40282346e+38", null)', '"2010-W02"'); 63 shouldBe('stepUp("2010-W02", "1", "2010-W02")', '"2010-W02"'); 64 shouldBe('stepDown("2010-W02", "1", "2010-W02")', '"2010-W02"'); 65 65 66 66 debug(''); -
trunk/LayoutTests/imported/w3c/ChangeLog
r289058 r289075 1 2022-02-03 Ziran Sun <zsun@igalia.com> 2 3 [Forms] Value doesn't change for stepUp()/stepDown() with out of range values 4 https://bugs.webkit.org/show_bug.cgi?id=235509 5 6 Reviewed by Chris Dumez. 7 8 * web-platform-tests/html/semantics/forms/the-input-element/input-stepdown-expected.txt: 9 * web-platform-tests/html/semantics/forms/the-input-element/input-stepup-expected.txt: 10 * web-platform-tests/html/semantics/forms/the-input-element/range-expected.txt: 11 1 12 2022-02-03 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepdown-expected.txt
r267646 r289075 4 4 5 5 PASS Forms 6 FAIL Calling stepDown() on input - number - where value < min should not modify value. The object is in an invalid state.7 FAIL Calling stepDown() on input - date - where value < min should not modify value. The object is in an invalid state.8 FAIL Calling stepDown() on input - datetime-local - where value < min should not modify value. The object is in an invalid state.9 FAIL Calling stepDown() on input - month - where value < min should not modify value. The object is in an invalid state.10 FAIL Calling stepDown() on input - time - where value < min should not modify value. The object is in an invalid state.11 FAIL Calling stepDown() on input - week - where value < min should not modify value. The object is in an invalid state.6 PASS Calling stepDown() on input - number - where value < min should not modify value. 7 PASS Calling stepDown() on input - date - where value < min should not modify value. 8 PASS Calling stepDown() on input - datetime-local - where value < min should not modify value. 9 PASS Calling stepDown() on input - month - where value < min should not modify value. 10 PASS Calling stepDown() on input - time - where value < min should not modify value. 11 PASS Calling stepDown() on input - week - where value < min should not modify value. 12 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepup-expected.txt
r267646 r289075 5 5 6 6 PASS Forms 7 FAIL Calling stepUp() on input -number- where value > max should not modify value. The object is in an invalid state.8 FAIL Calling stepUp() on input -date- where value > max should not modify value. The object is in an invalid state.9 FAIL Calling stepUp() on input -datetime-local- where value > max should not modify value. The object is in an invalid state.10 FAIL Calling stepUp() on input -month- where value > max should not modify value. The object is in an invalid state.11 FAIL Calling stepUp() on input -time- where value > max should not modify value. The object is in an invalid state.12 FAIL Calling stepUp() on input -week- where value > max should not modify value. The object is in an invalid state.7 PASS Calling stepUp() on input -number- where value > max should not modify value. 8 PASS Calling stepUp() on input -date- where value > max should not modify value. 9 PASS Calling stepUp() on input -datetime-local- where value > max should not modify value. 10 PASS Calling stepUp() on input -month- where value > max should not modify value. 11 PASS Calling stepUp() on input -time- where value > max should not modify value. 12 PASS Calling stepUp() on input -week- where value > max should not modify value. 13 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/range-expected.txt
r267646 r289075 22 22 PASS Performing stepUp() 23 23 PASS Performing stepDown() 24 FAIL Performing stepUp() beyond the value of the max attribute The object is in an invalid state.25 FAIL Performing stepDown() beyond the value of the min attribute The object is in an invalid state.24 FAIL Performing stepUp() beyond the value of the max attribute assert_equals: expected "12" but got "9" 25 FAIL Performing stepDown() beyond the value of the min attribute assert_equals: expected "3" but got "6" 26 26 FAIL Skip ASCII whitespace within input assert_equals: expected "123" but got "50" 27 27 PASS Multiply value by ten raised to the exponentth power with `e` -
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt
r276481 r289075 28 28 PASS stepUp argument 2 times 29 29 PASS stepDown argument 2 times 30 FAIL stepUp stop because it exceeds the maximum value The object is in an invalid state. 31 FAIL stepDown stop so lower than the minimum value The object is in an invalid state. 32 FAIL stop at border on stepUp The object is in an invalid state.33 FAIL stop at border on stepDown The object is in an invalid state.30 PASS stepUp stop because it exceeds the maximum value 31 PASS stepDown stop so lower than the minimum value 32 FAIL stop at border on stepUp assert_in_array: a valid time string representing 1 minute after 3pm value "15:00" not in array ["15:01", "15:01:00", "15:01:00.0", "15:01:00.00", "15:01:00.000"] 33 FAIL stop at border on stepDown assert_in_array: a valid time string representing 1 minute before 2pm value "13:00" not in array ["12:59", "12:59:00", "12:59:00.0", "12:59:00.00", "12:59:00.000"] 34 34 FAIL empty value of stepUp The object is in an invalid state. 35 35 PASS set value on not time format value -
trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt
r267658 r289075 28 28 PASS stepUp argument 2 times 29 29 PASS stepDown argument 2 times 30 FAIL stepUp stop because it exceeds the maximum value The object is in an invalid state. 31 FAIL stepDown stop so lower than the minimum value The object is in an invalid state. 32 FAIL stop at border on stepUp The object is in an invalid state.33 FAIL stop at border on stepDown The object is in an invalid state.30 PASS stepUp stop because it exceeds the maximum value 31 PASS stepDown stop so lower than the minimum value 32 FAIL stop at border on stepUp assert_in_array: a valid time string representing 1 minute after 3pm value "15:00" not in array ["15:01", "15:01:00", "15:01:00.0", "15:01:00.00", "15:01:00.000"] 33 FAIL stop at border on stepDown assert_in_array: a valid time string representing 1 minute before 2pm value "13:00" not in array ["12:59", "12:59:00", "12:59:00.0", "12:59:00.00", "12:59:00.000"] 34 34 FAIL empty value of stepUp The object is in an invalid state. 35 35 PASS set value on not time format value -
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepdown-expected.txt
r289074 r289075 4 4 5 5 PASS Forms 6 FAIL Calling stepDown() on input - number - where value < min should not modify value. The object is in an invalid state.6 PASS Calling stepDown() on input - number - where value < min should not modify value. 7 7 FAIL Calling stepDown() on input - date - where value < min should not modify value. The object is in an invalid state. 8 8 FAIL Calling stepDown() on input - datetime-local - where value < min should not modify value. The object is in an invalid state. -
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/input-stepup-expected.txt
r289074 r289075 5 5 6 6 PASS Forms 7 FAIL Calling stepUp() on input -number- where value > max should not modify value. The object is in an invalid state.7 PASS Calling stepUp() on input -number- where value > max should not modify value. 8 8 FAIL Calling stepUp() on input -date- where value > max should not modify value. The object is in an invalid state. 9 9 FAIL Calling stepUp() on input -datetime-local- where value > max should not modify value. The object is in an invalid state. -
trunk/LayoutTests/platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-expected.txt
r267658 r289075 28 28 PASS stepUp argument 2 times 29 29 PASS stepDown argument 2 times 30 FAIL stepUp stop because it exceeds the maximum value The object is in an invalid state. 31 FAIL stepDown stop so lower than the minimum value The object is in an invalid state. 32 FAIL stop at border on stepUp The object is in an invalid state.33 FAIL stop at border on stepDown The object is in an invalid state.30 PASS stepUp stop because it exceeds the maximum value 31 PASS stepDown stop so lower than the minimum value 32 FAIL stop at border on stepUp assert_in_array: a valid time string representing 1 minute after 3pm value "15:00" not in array ["15:01", "15:01:00", "15:01:00.0", "15:01:00.00", "15:01:00.000"] 33 FAIL stop at border on stepDown assert_in_array: a valid time string representing 1 minute before 2pm value "13:00" not in array ["12:59", "12:59:00", "12:59:00.0", "12:59:00.00", "12:59:00.000"] 34 34 FAIL empty value of stepUp The object is in an invalid state. 35 35 PASS set value on not time format value -
trunk/Source/WebCore/ChangeLog
r289074 r289075 1 2022-02-03 Ziran Sun <zsun@igalia.com> 2 3 [Forms] Value doesn't change for stepUp()/stepDown() with out of range values 4 https://bugs.webkit.org/show_bug.cgi?id=235509 5 6 Reviewed by Chris Dumez. 7 8 For input type number, WebKit throws "invalid state" Error when the value is greater than 9 max when calling stepUp() or less than min when calling stepDown(). According to section 10 10 in https://html.spec.whatwg.org/multipage/input.html#dom-input-stepup, 11 we should do "return", which indicates that value doesn't change. 12 13 * html/InputType.cpp: 14 (WebCore::InputType::applyStep): 15 1 16 2022-02-03 Nikolaos Mouchtaris <nmouchtaris@apple.com> 2 17 -
trunk/Source/WebCore/html/InputType.cpp
r287138 r289075 936 936 const Decimal acceptableErrorValue = stepRange.acceptableError(); 937 937 if (newValue - stepRange.minimum() < -acceptableErrorValue) 938 return Exception { InvalidStateError};938 return { }; 939 939 if (newValue < stepRange.minimum()) 940 940 newValue = stepRange.minimum(); … … 944 944 945 945 if (newValue - stepRange.maximum() > acceptableErrorValue) 946 return Exception { InvalidStateError};946 return { }; 947 947 if (newValue > stepRange.maximum()) 948 948 newValue = stepRange.maximum();
Note: See TracChangeset
for help on using the changeset viewer.