Title: [206453] trunk
- Revision
- 206453
- Author
- [email protected]
- Date
- 2016-09-27 12:35:49 -0700 (Tue, 27 Sep 2016)
Log Message
Second parameter to MutationObserver.observe() should be optional
https://bugs.webkit.org/show_bug.cgi?id=162627
Reviewed by Ryosuke Niwa.
LayoutTests/imported/w3c:
Rebaseline W3C test now that one more check is passing.
* web-platform-tests/dom/interfaces-expected.txt:
Source/WebCore:
Second parameter to MutationObserver.observe() should be optional:
- https://dom.spec.whatwg.org/#interface-mutationobserver
Firefox agrees with the specification. There is no real behavior change
except that MutationObserver.prototype.observe.length is now 1 instead
of 2. Passing only one parameter will still throw a TypeError because
the Dictionary is empty. However, this parameter needs to be marked as
optional because Web IDL requires the last parameter to be optional if
it is a Dictionary.
No new tests, rebaselined existing test.
* dom/MutationObserver.idl:
LayoutTests:
Rebaseline existing test now that the exception messages are slightly
different.
* fast/dom/MutationObserver/observe-exceptions-expected.txt:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (206452 => 206453)
--- trunk/LayoutTests/ChangeLog 2016-09-27 19:32:28 UTC (rev 206452)
+++ trunk/LayoutTests/ChangeLog 2016-09-27 19:35:49 UTC (rev 206453)
@@ -1,3 +1,15 @@
+2016-09-27 Chris Dumez <[email protected]>
+
+ Second parameter to MutationObserver.observe() should be optional
+ https://bugs.webkit.org/show_bug.cgi?id=162627
+
+ Reviewed by Ryosuke Niwa.
+
+ Rebaseline existing test now that the exception messages are slightly
+ different.
+
+ * fast/dom/MutationObserver/observe-exceptions-expected.txt:
+
2016-09-27 Dan Bernstein <[email protected]>
[iOS] REGRESSION (r182126): Selection highlight and handles aren’t visible with WKSelectionGranularityCharacter
Modified: trunk/LayoutTests/fast/dom/MutationObserver/observe-exceptions-expected.txt (206452 => 206453)
--- trunk/LayoutTests/fast/dom/MutationObserver/observe-exceptions-expected.txt 2016-09-27 19:32:28 UTC (rev 206452)
+++ trunk/LayoutTests/fast/dom/MutationObserver/observe-exceptions-expected.txt 2016-09-27 19:35:49 UTC (rev 206453)
@@ -4,9 +4,9 @@
PASS observer.observe() threw exception TypeError: Not enough arguments.
-PASS observer.observe(null) threw exception TypeError: Not enough arguments.
-PASS observer.observe(undefined) threw exception TypeError: Not enough arguments.
-PASS observer.observe(document.body) threw exception TypeError: Not enough arguments.
+PASS observer.observe(null) threw exception TypeError: Argument 1 ('target') to MutationObserver.observe must be an instance of Node.
+PASS observer.observe(undefined) threw exception TypeError: Argument 1 ('target') to MutationObserver.observe must be an instance of Node.
+PASS observer.observe(document.body) threw exception TypeError: Type error.
PASS observer.observe(document.body, null) threw exception TypeError: Type error.
PASS observer.observe(document.body, undefined) threw exception TypeError: Type error.
PASS observer.observe(null, {attributes: true}) threw exception TypeError: Argument 1 ('target') to MutationObserver.observe must be an instance of Node.
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (206452 => 206453)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-09-27 19:32:28 UTC (rev 206452)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-09-27 19:35:49 UTC (rev 206453)
@@ -1 +1,12 @@
+2016-09-27 Chris Dumez <[email protected]>
+
+ Second parameter to MutationObserver.observe() should be optional
+ https://bugs.webkit.org/show_bug.cgi?id=162627
+
+ Reviewed by Ryosuke Niwa.
+
+ Rebaseline W3C test now that one more check is passing.
+
+ * web-platform-tests/dom/interfaces-expected.txt:
+
== Rolled over to ChangeLog-2016-09-26 ==
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt (206452 => 206453)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt 2016-09-27 19:32:28 UTC (rev 206452)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt 2016-09-27 19:35:49 UTC (rev 206453)
@@ -141,7 +141,7 @@
PASS MutationObserver interface object name
PASS MutationObserver interface: existence and properties of interface prototype object
PASS MutationObserver interface: existence and properties of interface prototype object's "constructor" property
-FAIL MutationObserver interface: operation observe(Node,MutationObserverInit) assert_equals: property has wrong .length expected 1 but got 2
+PASS MutationObserver interface: operation observe(Node,MutationObserverInit)
PASS MutationObserver interface: operation disconnect()
PASS MutationObserver interface: operation takeRecords()
PASS MutationRecord interface: existence and properties of interface object
Modified: trunk/Source/WebCore/ChangeLog (206452 => 206453)
--- trunk/Source/WebCore/ChangeLog 2016-09-27 19:32:28 UTC (rev 206452)
+++ trunk/Source/WebCore/ChangeLog 2016-09-27 19:35:49 UTC (rev 206453)
@@ -1,3 +1,24 @@
+2016-09-27 Chris Dumez <[email protected]>
+
+ Second parameter to MutationObserver.observe() should be optional
+ https://bugs.webkit.org/show_bug.cgi?id=162627
+
+ Reviewed by Ryosuke Niwa.
+
+ Second parameter to MutationObserver.observe() should be optional:
+ - https://dom.spec.whatwg.org/#interface-mutationobserver
+
+ Firefox agrees with the specification. There is no real behavior change
+ except that MutationObserver.prototype.observe.length is now 1 instead
+ of 2. Passing only one parameter will still throw a TypeError because
+ the Dictionary is empty. However, this parameter needs to be marked as
+ optional because Web IDL requires the last parameter to be optional if
+ it is a Dictionary.
+
+ No new tests, rebaselined existing test.
+
+ * dom/MutationObserver.idl:
+
2016-09-20 Anders Carlsson <[email protected]>
PlatformEvent::m_modifiers should be an OptionSet
Modified: trunk/Source/WebCore/dom/MutationObserver.idl (206452 => 206453)
--- trunk/Source/WebCore/dom/MutationObserver.idl 2016-09-27 19:32:28 UTC (rev 206452)
+++ trunk/Source/WebCore/dom/MutationObserver.idl 2016-09-27 19:35:49 UTC (rev 206453)
@@ -33,7 +33,7 @@
CustomIsReachable,
ImplementationLacksVTable,
] interface MutationObserver {
- [RaisesException] void observe(Node target, MutationObserverInit options);
+ [RaisesException] void observe(Node target, optional MutationObserverInit options);
sequence<MutationRecord> takeRecords();
void disconnect();
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes