angler-fishThe Vulnerability History Project

[MutationObservers] Add stub implementation of WebKitMutationObserver

      https://bugs.webkit.org/show_bug.cgi?id=68949

Reviewed by Ryosuke Niwa, Oliver Hunt, and Dimitri Glazkov.

Source/WebCore:

See https://bugs.webkit.org/show_bug.cgi?id=68729 for the metabug.

This patch adds a stub WebKitMutationObserver and its supporting classes
MutationCallback and MutationObserverOptions.
No implementation is provided for the all-important observe() and
disconnect() methods.

Note that WebKitMutationObserver is vendor-prefixed since it has a
constructor exposed on DOMWindow.  None of the rest of the API needs
prefixing, as it's only available via a call through a MutationObserver
callback (created by instantiating WebKitMutationObserver).

Given the number of files required to get just the stub up and running,
it seems reasonable to leave the actual implementation for the next
patch (or more likely several patches).  I've left FIXMEs in all the places
that'll need augmentation.

Tests: fast/mutation/mutation-observer-constructor.html
       fast/mutation/observe-exceptions.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* UseJSC.cmake:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDictionary.h:
(WebCore::JSDictionary::tryGetProperty):
* bindings/js/JSMutationCallbackCustom.cpp: Added.
(WebCore::JSMutationCallback::handleEvent):
* bindings/js/JSWebKitMutationObserverCustom.cpp: Added.
(WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver):
(WebCore::JSWebKitMutationObserver::observe):
* bindings/v8/custom/V8MutationCallbackCustom.cpp: Added.
(WebCore::V8MutationCallback::handleEvent):
* bindings/v8/custom/V8WebKitMutationObserverCustom.cpp: Added.
(WebCore::V8WebKitMutationObserver::constructorCallback):
(WebCore::V8WebKitMutationObserver::observeCallback):
* dom/MutationCallback.h: Added.
(WebCore::MutationCallback::~MutationCallback):
*
    
commit 18551dbaecaa6417390f443739e671cca55ab984
-19
-14
-35
-15
-36
-3
-3
-3
-3
-3
-3
-76
-2
-2
-6
-2
-14
-8
-216
-44
-27
-72
-97
-88
-111
-58
-38
-92
-68
-65
-40
-2
-9
+1 -2
expand_less