Title: [207375] trunk
- Revision
- 207375
- Author
- [email protected]
- Date
- 2016-10-15 07:53:23 -0700 (Sat, 15 Oct 2016)
Log Message
Setting HTMLMediaElement.volume to NaN or Inf should throw a TypeError
https://bugs.webkit.org/show_bug.cgi?id=163472
Reviewed by Sam Weinig.
LayoutTests/imported/w3c:
Rebaseline w3c test now that more checks are passing.
* web-platform-tests/html/semantics/embedded-content/media-elements/volume_nonfinite-expected.txt:
Source/WebCore:
Setting HTMLMediaElement.volume to NaN or Inf should throw a TypeError:
- https://html.spec.whatwg.org/#dom-media-volume
This is because the attribute is of type double (not unrestricted double in the IDL).
Chrome and Firefox agree with the specification. WebKit throws an IndexSizeErr instead.
No new tests, rebaselined existing test.
* html/HTMLMediaElement.idl:
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (207374 => 207375)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-10-15 14:24:33 UTC (rev 207374)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-10-15 14:53:23 UTC (rev 207375)
@@ -1,3 +1,14 @@
+2016-10-15 Chris Dumez <[email protected]>
+
+ Setting HTMLMediaElement.volume to NaN or Inf should throw a TypeError
+ https://bugs.webkit.org/show_bug.cgi?id=163472
+
+ Reviewed by Sam Weinig.
+
+ Rebaseline w3c test now that more checks are passing.
+
+ * web-platform-tests/html/semantics/embedded-content/media-elements/volume_nonfinite-expected.txt:
+
2016-10-14 Chris Dumez <[email protected]>
Setting HTMLMediaElement.muted to the same value should not fire a volume change event
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/volume_nonfinite-expected.txt (207374 => 207375)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/volume_nonfinite-expected.txt 2016-10-15 14:24:33 UTC (rev 207374)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/volume_nonfinite-expected.txt 2016-10-15 14:53:23 UTC (rev 207375)
@@ -1,20 +1,8 @@
-FAIL Setting audio.volume to NaN should throw a TypeError assert_throws: function "function () {
- el.volume = aValue;
- }" did not throw
-FAIL Setting audio.volume to Infinity should throw a TypeError assert_throws: function "function () {
- el.volume = aValue;
- }" threw object "IndexSizeError (DOM Exception 1): The index is not in the..." ("IndexSizeError") expected object "TypeError" ("TypeError")
-FAIL Setting audio.volume to -Infinity should throw a TypeError assert_throws: function "function () {
- el.volume = aValue;
- }" threw object "IndexSizeError (DOM Exception 1): The index is not in the..." ("IndexSizeError") expected object "TypeError" ("TypeError")
-FAIL Setting video.volume to NaN should throw a TypeError assert_throws: function "function () {
- el.volume = aValue;
- }" did not throw
-FAIL Setting video.volume to Infinity should throw a TypeError assert_throws: function "function () {
- el.volume = aValue;
- }" threw object "IndexSizeError (DOM Exception 1): The index is not in the..." ("IndexSizeError") expected object "TypeError" ("TypeError")
-FAIL Setting video.volume to -Infinity should throw a TypeError assert_throws: function "function () {
- el.volume = aValue;
- }" threw object "IndexSizeError (DOM Exception 1): The index is not in the..." ("IndexSizeError") expected object "TypeError" ("TypeError")
+PASS Setting audio.volume to NaN should throw a TypeError
+PASS Setting audio.volume to Infinity should throw a TypeError
+PASS Setting audio.volume to -Infinity should throw a TypeError
+PASS Setting video.volume to NaN should throw a TypeError
+PASS Setting video.volume to Infinity should throw a TypeError
+PASS Setting video.volume to -Infinity should throw a TypeError
Modified: trunk/Source/WebCore/ChangeLog (207374 => 207375)
--- trunk/Source/WebCore/ChangeLog 2016-10-15 14:24:33 UTC (rev 207374)
+++ trunk/Source/WebCore/ChangeLog 2016-10-15 14:53:23 UTC (rev 207375)
@@ -1,3 +1,21 @@
+2016-10-15 Chris Dumez <[email protected]>
+
+ Setting HTMLMediaElement.volume to NaN or Inf should throw a TypeError
+ https://bugs.webkit.org/show_bug.cgi?id=163472
+
+ Reviewed by Sam Weinig.
+
+ Setting HTMLMediaElement.volume to NaN or Inf should throw a TypeError:
+ - https://html.spec.whatwg.org/#dom-media-volume
+
+ This is because the attribute is of type double (not unrestricted double in the IDL).
+
+ Chrome and Firefox agree with the specification. WebKit throws an IndexSizeErr instead.
+
+ No new tests, rebaselined existing test.
+
+ * html/HTMLMediaElement.idl:
+
2016-10-15 Zalan Bujtas <[email protected]>
CounterNode::resetRenderers is so inefficient.
Modified: trunk/Source/WebCore/html/HTMLMediaElement.idl (207374 => 207375)
--- trunk/Source/WebCore/html/HTMLMediaElement.idl 2016-10-15 14:24:33 UTC (rev 207374)
+++ trunk/Source/WebCore/html/HTMLMediaElement.idl 2016-10-15 14:53:23 UTC (rev 207375)
@@ -77,7 +77,7 @@
// controls
attribute boolean controls;
- [SetterMayThrowLegacyException] attribute unrestricted double volume;
+ [SetterMayThrowLegacyException] attribute double volume;
attribute boolean muted;
[Reflect=muted] attribute boolean defaultMuted;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes