MutationObserver.observe should treat a null or undefined options argument as empty
authoradamk@chromium.org <adamk@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jun 2012 19:36:50 +0000 (19:36 +0000)
committeradamk@chromium.org <adamk@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jun 2012 19:36:50 +0000 (19:36 +0000)
commit0f57e545d5b45b0e8f96f5e754424b67984c95ef
tree589f1afd58010ad46d3e4a08745c1332abfc9835
parent8fb7d9a77081331bf86e42a619802c97749cce89
MutationObserver.observe should treat a null or undefined options argument as empty
https://bugs.webkit.org/show_bug.cgi?id=89992

Reviewed by Ojan Vafai.

Source/WebCore:

The WebIDL spec was recently updated to treat null or undefined
Dictionary arguments the same as the empty dictionary. This patch
updates MutationObserver.observe to follow that spec.

Note that we still throw a SYNTAX_ERR in this case, since it's an
error not to pass one of "attributes", "childList", or "characterData"
as a key in the dictionary.

* dom/WebKitMutationObserver.cpp:
(WebCore::WebKitMutationObserver::observe):

LayoutTests:

* fast/mutation/observe-exceptions-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/mutation/observe-exceptions-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/dom/WebKitMutationObserver.cpp