Title: [90351] trunk
- Revision
- 90351
- Author
- [email protected]
- Date
- 2011-07-03 22:56:53 -0700 (Sun, 03 Jul 2011)
Log Message
2011-07-03 Dominic Cooney <[email protected]>
The value property of an indeterminate progress element should be zero
https://bugs.webkit.org/show_bug.cgi?id=63861
Reviewed by Kent Tamura.
Updates test result, and adds a test for setting value < 0.
* fast/dom/HTMLProgressElement/script-tests/set-progress-properties.js:
* fast/dom/HTMLProgressElement/set-progress-properties-expected.txt:
2011-07-03 Dominic Cooney <[email protected]>
The value property of an indeterminate progress element should be zero
https://bugs.webkit.org/show_bug.cgi?id=63861
Reviewed by Kent Tamura.
Test: fast/dom/HTMLProgressElement/set-progress-properties.html
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::value):
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (90350 => 90351)
--- trunk/LayoutTests/ChangeLog 2011-07-04 05:20:03 UTC (rev 90350)
+++ trunk/LayoutTests/ChangeLog 2011-07-04 05:56:53 UTC (rev 90351)
@@ -1,3 +1,15 @@
+2011-07-03 Dominic Cooney <[email protected]>
+
+ The value property of an indeterminate progress element should be zero
+ https://bugs.webkit.org/show_bug.cgi?id=63861
+
+ Reviewed by Kent Tamura.
+
+ Updates test result, and adds a test for setting value < 0.
+
+ * fast/dom/HTMLProgressElement/script-tests/set-progress-properties.js:
+ * fast/dom/HTMLProgressElement/set-progress-properties-expected.txt:
+
2011-07-03 Yuta Kitamura <[email protected]>
Reviewed by Kent Tamura.
Modified: trunk/LayoutTests/fast/dom/HTMLProgressElement/script-tests/set-progress-properties.js (90350 => 90351)
--- trunk/LayoutTests/fast/dom/HTMLProgressElement/script-tests/set-progress-properties.js 2011-07-04 05:20:03 UTC (rev 90350)
+++ trunk/LayoutTests/fast/dom/HTMLProgressElement/script-tests/set-progress-properties.js 2011-07-04 05:56:53 UTC (rev 90351)
@@ -3,7 +3,7 @@
var p = document.createElement('progress');
debug("Test values before properties were set");
-shouldBe("p.value", "1");
+shouldBe("p.value", "0");
shouldBe("p.max", "1");
shouldBe("p.position", "-1");
@@ -21,6 +21,11 @@
shouldBe("p.max", "100");
shouldBe("p.position", "1");
+debug("Set value less than zero");
+p.value = -42;
+shouldBe('p.value', '0');
+shouldBe('p.position', '0');
+
debug("Set invalid value, should throw");
shouldThrow('p.value = "200A";', '"Error: NOT_SUPPORTED_ERR: DOM Exception 9"');
Modified: trunk/LayoutTests/fast/dom/HTMLProgressElement/set-progress-properties-expected.txt (90350 => 90351)
--- trunk/LayoutTests/fast/dom/HTMLProgressElement/set-progress-properties-expected.txt 2011-07-04 05:20:03 UTC (rev 90350)
+++ trunk/LayoutTests/fast/dom/HTMLProgressElement/set-progress-properties-expected.txt 2011-07-04 05:56:53 UTC (rev 90351)
@@ -4,7 +4,7 @@
Test values before properties were set
-PASS p.value is 1
+PASS p.value is 0
PASS p.max is 1
PASS p.position is -1
Set valid values
@@ -15,6 +15,9 @@
PASS p.value is 100
PASS p.max is 100
PASS p.position is 1
+Set value less than zero
+PASS p.value is 0
+PASS p.position is 0
Set invalid value, should throw
PASS p.value = "200A"; threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
Set invalid max, should throw
Modified: trunk/Source/WebCore/ChangeLog (90350 => 90351)
--- trunk/Source/WebCore/ChangeLog 2011-07-04 05:20:03 UTC (rev 90350)
+++ trunk/Source/WebCore/ChangeLog 2011-07-04 05:56:53 UTC (rev 90351)
@@ -1,3 +1,15 @@
+2011-07-03 Dominic Cooney <[email protected]>
+
+ The value property of an indeterminate progress element should be zero
+ https://bugs.webkit.org/show_bug.cgi?id=63861
+
+ Reviewed by Kent Tamura.
+
+ Test: fast/dom/HTMLProgressElement/set-progress-properties.html
+
+ * html/HTMLProgressElement.cpp:
+ (WebCore::HTMLProgressElement::value):
+
2011-07-03 Robert Hogan <[email protected]>
Restore scroll position on page reloads scheduled by <meta http-equiv="refresh" content="XX"/>
Modified: trunk/Source/WebCore/html/HTMLProgressElement.cpp (90350 => 90351)
--- trunk/Source/WebCore/html/HTMLProgressElement.cpp 2011-07-04 05:20:03 UTC (rev 90350)
+++ trunk/Source/WebCore/html/HTMLProgressElement.cpp 2011-07-04 05:56:53 UTC (rev 90351)
@@ -93,11 +93,10 @@
double HTMLProgressElement::value() const
{
- const AtomicString& valueString = getAttribute(valueAttr);
double value;
- bool ok = parseToDoubleForNumberType(valueString, &value);
+ bool ok = parseToDoubleForNumberType(fastGetAttribute(valueAttr), &value);
if (!ok || value < 0)
- return valueString.isNull() ? 1 : 0;
+ return 0;
return (value > max()) ? max() : value;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes