WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-89231-20120615111644.patch (text/plain), 170.92 KB, created by
Adam Klein
on 2012-06-15 11:16:44 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Adam Klein
Created:
2012-06-15 11:16:44 PDT
Size:
170.92 KB
patch
obsolete
>Subversion Revision: 120478 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 038c5a39962cf8fde12582f40bd9dea88e751425..f8c060841956191ba0512112f95823e26a7f6367 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,107 @@ >+2012-06-15 Adam Klein <adamk@chromium.org> >+ >+ Remove vendor prefix from DOM MutationObservers >+ https://bugs.webkit.org/show_bug.cgi?id=89231 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ MutationObservers have been specified as part of DOM4 for some time now, >+ and Mozilla is shipping a compatible implementation without a vendor >+ prefix. This change exposes the MutationObserver constructor on the >+ Window object. All references to the old prefixed name have been >+ removed, save for a backwards-compatibility reference in DOMWindow.idl. >+ >+ No new tests, no change in functionality. >+ >+ * CMakeLists.txt: >+ * DerivedSources.cpp: >+ * DerivedSources.make: >+ * GNUmakefile.list.am: >+ * Target.pri: >+ * UseJSC.cmake: >+ * UseV8.cmake: >+ * WebCore.gypi: >+ * WebCore.vcproj/WebCore.vcproj: >+ * WebCore.xcodeproj/project.pbxproj: >+ * bindings/js/JSBindingsAllInOne.cpp: >+ * bindings/js/JSMainThreadExecState.cpp: >+ (WebCore::JSMainThreadExecState::didLeaveScriptContext): >+ * bindings/js/JSMutationCallbackCustom.cpp: >+ (WebCore::JSMutationCallback::handleEvent): >+ * bindings/js/JSMutationObserverCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWebKitMutationObserverCustom.cpp. >+ (WebCore): >+ (WebCore::JSMutationObserverConstructor::constructJSMutationObserver): >+ (BooleanOption): >+ (WebCore::JSMutationObserver::observe): >+ * bindings/v8/V8RecursionScope.cpp: >+ (WebCore::V8RecursionScope::didLeaveScriptContext): >+ * bindings/v8/custom/V8MutationCallbackCustom.cpp: >+ (WebCore::V8MutationCallback::handleEvent): >+ * bindings/v8/custom/V8MutationObserverCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp. >+ (WebCore): >+ (WebCore::V8MutationObserver::constructorCallback): >+ (WebCore::V8MutationObserver::observeCallback): >+ * dom/CharacterData.cpp: >+ * dom/ChildListMutationScope.h: >+ (WebCore::ChildListMutationScope::ChildListMutationScope): >+ * dom/DOMAllInOne.cpp: >+ * dom/Document.h: >+ (WebCore::Document::hasMutationObserversOfType): >+ * dom/Element.cpp: >+ * dom/MutationCallback.h: >+ (WebCore): >+ (MutationCallback): >+ * dom/MutationCallback.idl: >+ * dom/MutationObserver.cpp: Renamed from Source/WebCore/dom/WebKitMutationObserver.cpp. >+ (WebCore): >+ (WebCore::MutationObserver::ObserverLessThan::operator()): >+ (WebCore::MutationObserver::create): >+ (WebCore::MutationObserver::MutationObserver): >+ (WebCore::MutationObserver::~MutationObserver): >+ (WebCore::MutationObserver::validateOptions): >+ (WebCore::MutationObserver::observe): >+ (WebCore::MutationObserver::takeRecords): >+ (WebCore::MutationObserver::disconnect): >+ (WebCore::MutationObserver::observationStarted): >+ (WebCore::MutationObserver::observationEnded): >+ (WebCore::activeMutationObservers): >+ (WebCore::MutationObserver::enqueueMutationRecord): >+ (WebCore::MutationObserver::setHasTransientRegistration): >+ (WebCore::MutationObserver::deliver): >+ (WebCore::MutationObserver::deliverAllMutations): >+ * dom/MutationObserver.h: Renamed from Source/WebCore/dom/WebKitMutationObserver.h. >+ (WebCore): >+ (MutationObserver): >+ * dom/MutationObserver.idl: Renamed from Source/WebCore/dom/WebKitMutationObserver.idl. >+ * dom/MutationObserverInterestGroup.cpp: >+ (WebCore::MutationObserverInterestGroup::createIfNeeded): >+ (WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup): >+ (WebCore::MutationObserverInterestGroup::isOldValueRequested): >+ (WebCore::MutationObserverInterestGroup::enqueueMutationRecord): >+ * dom/MutationObserverInterestGroup.h: >+ (WebCore::MutationObserverInterestGroup::createForChildListMutation): >+ (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation): >+ (WebCore::MutationObserverInterestGroup::createForAttributesMutation): >+ (MutationObserverInterestGroup): >+ * dom/MutationObserverRegistration.cpp: >+ (WebCore::MutationObserverRegistration::create): >+ (WebCore::MutationObserverRegistration::MutationObserverRegistration): >+ (WebCore::MutationObserverRegistration::shouldReceiveMutationFrom): >+ * dom/MutationObserverRegistration.h: >+ (MutationObserverRegistration): >+ (WebCore::MutationObserverRegistration::isSubtree): >+ (WebCore::MutationObserverRegistration::observer): >+ (WebCore::MutationObserverRegistration::deliveryOptions): >+ (WebCore::MutationObserverRegistration::mutationTypes): >+ * dom/Node.cpp: >+ (WebCore::Node::collectMatchingObserversForMutation): >+ (WebCore::Node::getRegisteredMutationObserversOfType): >+ (WebCore::Node::registerMutationObserver): >+ * dom/Node.h: >+ (Node): >+ * dom/NodeRareData.h: >+ * page/DOMWindow.idl: >+ > 2012-06-15 Silvia Pfeiffer <silviapf@chromium.org> > > Remove volume thumb for videos without audio track. >diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog >index bee9638bf3b4353aadaf086ae4034d53a4fd055d..daf499f58a41d938b140e5fdc3256f3c19e2fd87 100644 >--- a/Source/WebKit/chromium/ChangeLog >+++ b/Source/WebKit/chromium/ChangeLog >@@ -1,3 +1,12 @@ >+2012-06-15 Adam Klein <adamk@chromium.org> >+ >+ Unprefix DOM MutationObservers >+ https://bugs.webkit.org/show_bug.cgi?id=89231 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * src/WebKit.cpp: >+ > 2012-06-15 Sami Kyostila <skyostil@chromium.org> > > [chromium] Allow scrolling non-root layers in the compositor thread >diff --git a/Source/WebKit/efl/ChangeLog b/Source/WebKit/efl/ChangeLog >index 52e10f0fd5d6fd49c511f89b3fc6d72aea029709..03412d59ce1066eebb95f0324921cb93fa3a9715 100644 >--- a/Source/WebKit/efl/ChangeLog >+++ b/Source/WebKit/efl/ChangeLog >@@ -1,3 +1,13 @@ >+2012-06-15 Adam Klein <adamk@chromium.org> >+ >+ Unprefix DOM MutationObservers >+ https://bugs.webkit.org/show_bug.cgi?id=89231 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp: >+ (DumpRenderTreeSupportEfl::deliverAllMutationsIfNecessary): >+ > 2012-06-15 Christophe Dumez <christophe.dumez@intel.com> > > [EFL] EFL's LayoutTestController does not support titleTextDirection >diff --git a/Source/WebKit/gtk/ChangeLog b/Source/WebKit/gtk/ChangeLog >index 7a50a7c3d0e15c97277d128b9e5e247962da5a6c..0c52fc8d10421ddeb7d59da5e782183b0cffbe6f 100644 >--- a/Source/WebKit/gtk/ChangeLog >+++ b/Source/WebKit/gtk/ChangeLog >@@ -1,3 +1,13 @@ >+2012-06-15 Adam Klein <adamk@chromium.org> >+ >+ Unprefix DOM MutationObservers >+ https://bugs.webkit.org/show_bug.cgi?id=89231 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: >+ (DumpRenderTreeSupportGtk::deliverAllMutationsIfNecessary): >+ > 2012-06-14 Alejandro G. Castro <alex@igalia.com> > > [GTK] Add TextureMapper ImageBuffer support as a fallback from the hardware accelerated path >diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt >index 9ad85bb9422504dc32cd6d1ff88f34683aed46fa..bac63b7a283a528d15c06962edfd49de035d441e 100644 >--- a/Source/WebCore/CMakeLists.txt >+++ b/Source/WebCore/CMakeLists.txt >@@ -221,6 +221,7 @@ SET(WebCore_IDL_FILES > dom/MouseEvent.idl > dom/MutationCallback.idl > dom/MutationEvent.idl >+ dom/MutationObserver.idl > dom/MutationRecord.idl > dom/NamedNodeMap.idl > dom/NodeFilter.idl >@@ -244,7 +245,6 @@ SET(WebCore_IDL_FILES > dom/TreeWalker.idl > dom/UIEvent.idl > dom/WebKitAnimationEvent.idl >- dom/WebKitMutationObserver.idl > dom/WebKitNamedFlow.idl > dom/WebKitTransitionEvent.idl > dom/WheelEvent.idl >@@ -609,6 +609,7 @@ SET(WebCore_SOURCES > dom/MouseEvent.cpp > dom/MouseRelatedEvent.cpp > dom/MutationEvent.cpp >+ dom/MutationObserver.cpp > dom/MutationObserverInterestGroup.cpp > dom/MutationObserverRegistration.cpp > dom/MutationRecord.cpp >@@ -662,7 +663,6 @@ SET(WebCore_SOURCES > dom/UserTypingGestureIndicator.cpp > dom/ViewportArguments.cpp > dom/WebKitAnimationEvent.cpp >- dom/WebKitMutationObserver.cpp > dom/WebKitNamedFlow.cpp > dom/WebKitTransitionEvent.cpp > dom/WheelEvent.cpp >diff --git a/Source/WebCore/DerivedSources.cpp b/Source/WebCore/DerivedSources.cpp >index 8e810b90e36f023d2680d6198ee19750346c23f6..16f6e152e33c936f778c80a4e140afd69c0aba16 100644 >--- a/Source/WebCore/DerivedSources.cpp >+++ b/Source/WebCore/DerivedSources.cpp >@@ -244,6 +244,7 @@ > #include "JSMouseEvent.cpp" > #include "JSMutationCallback.cpp" > #include "JSMutationEvent.cpp" >+#include "JSMutationObserver.cpp" > #include "JSMutationRecord.cpp" > #include "JSNamedNodeMap.cpp" > #include "JSNavigator.cpp" >@@ -477,7 +478,6 @@ > #include "JSWebKitCSSTransformValue.cpp" > #include "JSWebKitCSSMatrix.cpp" > #include "JSWebKitCSSRegionRule.cpp" >-#include "JSWebKitMutationObserver.cpp" > #include "JSWebKitNamedFlow.cpp" > #include "JSWebKitPoint.cpp" > #include "JSWebKitTransitionEvent.cpp" >diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make >index d55414fc44ada3b972f78a5d793b2296d01296c0..2fcc2337cb576a550e84c95fb9871aa2f37e2f44 100644 >--- a/Source/WebCore/DerivedSources.make >+++ b/Source/WebCore/DerivedSources.make >@@ -224,6 +224,7 @@ BINDING_IDLS = \ > $(WebCore)/dom/MouseEvent.idl \ > $(WebCore)/dom/MutationCallback.idl \ > $(WebCore)/dom/MutationEvent.idl \ >+ $(WebCore)/dom/MutationObserver.idl \ > $(WebCore)/dom/MutationRecord.idl \ > $(WebCore)/dom/NamedNodeMap.idl \ > $(WebCore)/dom/Node.idl \ >@@ -249,7 +250,6 @@ BINDING_IDLS = \ > $(WebCore)/dom/TreeWalker.idl \ > $(WebCore)/dom/UIEvent.idl \ > $(WebCore)/dom/WebKitAnimationEvent.idl \ >- $(WebCore)/dom/WebKitMutationObserver.idl \ > $(WebCore)/dom/WebKitNamedFlow.idl \ > $(WebCore)/dom/WebKitTransitionEvent.idl \ > $(WebCore)/dom/WheelEvent.idl \ >diff --git a/Source/WebCore/GNUmakefile.list.am b/Source/WebCore/GNUmakefile.list.am >index 37b7e5ac2997ea3161e94ac86461a6ce6765b340..217026d763a666121cc366dbd95fd12b774836f6 100644 >--- a/Source/WebCore/GNUmakefile.list.am >+++ b/Source/WebCore/GNUmakefile.list.am >@@ -405,6 +405,8 @@ webcore_built_sources += \ > DerivedSources/WebCore/JSMutationCallback.h \ > DerivedSources/WebCore/JSMutationEvent.cpp \ > DerivedSources/WebCore/JSMutationEvent.h \ >+ DerivedSources/WebCore/JSMutationObserver.cpp \ >+ DerivedSources/WebCore/JSMutationObserver.h \ > DerivedSources/WebCore/JSMutationRecord.cpp \ > DerivedSources/WebCore/JSMutationRecord.h \ > DerivedSources/WebCore/JSNamedNodeMap.cpp \ >@@ -614,8 +616,6 @@ webcore_built_sources += \ > DerivedSources/WebCore/JSWebKitCSSRegionRule.h \ > DerivedSources/WebCore/JSWebKitCSSTransformValue.cpp \ > DerivedSources/WebCore/JSWebKitCSSTransformValue.h \ >- DerivedSources/WebCore/JSWebKitMutationObserver.cpp \ >- DerivedSources/WebCore/JSWebKitMutationObserver.h \ > DerivedSources/WebCore/JSWebKitNamedFlow.cpp \ > DerivedSources/WebCore/JSWebKitNamedFlow.h \ > DerivedSources/WebCore/JSWebKitPoint.cpp \ >@@ -766,6 +766,7 @@ dom_binding_idls += \ > $(WebCore)/dom/MouseEvent.idl \ > $(WebCore)/dom/MutationCallback.idl \ > $(WebCore)/dom/MutationEvent.idl \ >+ $(WebCore)/dom/MutationObserver.idl \ > $(WebCore)/dom/MutationRecord.idl \ > $(WebCore)/dom/NamedNodeMap.idl \ > $(WebCore)/dom/Node.idl \ >@@ -789,7 +790,6 @@ dom_binding_idls += \ > $(WebCore)/dom/TreeWalker.idl \ > $(WebCore)/dom/UIEvent.idl \ > $(WebCore)/dom/WebKitAnimationEvent.idl \ >- $(WebCore)/dom/WebKitMutationObserver.idl \ > $(WebCore)/dom/WebKitNamedFlow.idl \ > $(WebCore)/dom/WebKitTransitionEvent.idl \ > $(WebCore)/dom/WheelEvent.idl \ >@@ -1445,6 +1445,7 @@ webcore_sources += \ > Source/WebCore/bindings/js/JSMessagePortCustom.cpp \ > Source/WebCore/bindings/js/JSMessagePortCustom.h \ > Source/WebCore/bindings/js/JSMutationCallbackCustom.cpp \ >+ Source/WebCore/bindings/js/JSMutationObserverCustom.cpp \ > Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp \ > Source/WebCore/bindings/js/JSNodeCustom.cpp \ > Source/WebCore/bindings/js/JSNodeCustom.h \ >@@ -1489,7 +1490,6 @@ webcore_sources += \ > Source/WebCore/bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp \ > Source/WebCore/bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp \ > Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp \ >- Source/WebCore/bindings/js/JSWebKitMutationObserverCustom.cpp \ > Source/WebCore/bindings/js/JSWebKitPointCustom.cpp \ > Source/WebCore/bindings/js/JSWebSocketCustom.cpp \ > Source/WebCore/bindings/js/JSWorkerContextBase.cpp \ >@@ -1920,6 +1920,8 @@ webcore_sources += \ > Source/WebCore/dom/MutationCallback.h \ > Source/WebCore/dom/MutationEvent.cpp \ > Source/WebCore/dom/MutationEvent.h \ >+ Source/WebCore/dom/MutationObserver.cpp \ >+ Source/WebCore/dom/MutationObserver.h \ > Source/WebCore/dom/MutationObserverInterestGroup.cpp \ > Source/WebCore/dom/MutationObserverInterestGroup.h \ > Source/WebCore/dom/MutationObserverRegistration.cpp \ >@@ -2030,8 +2032,6 @@ webcore_sources += \ > Source/WebCore/dom/ViewportArguments.h \ > Source/WebCore/dom/WebKitAnimationEvent.cpp \ > Source/WebCore/dom/WebKitAnimationEvent.h \ >- Source/WebCore/dom/WebKitMutationObserver.cpp \ >- Source/WebCore/dom/WebKitMutationObserver.h \ > Source/WebCore/dom/WebKitNamedFlow.cpp \ > Source/WebCore/dom/WebKitNamedFlow.h \ > Source/WebCore/dom/WebKitTransitionEvent.cpp \ >diff --git a/Source/WebCore/Target.pri b/Source/WebCore/Target.pri >index 69baa929fd672c9261648f8b220f57bce67d3fd1..34e8fd0ade9990ea60ba2ac8fddd2eb325de8709 100644 >--- a/Source/WebCore/Target.pri >+++ b/Source/WebCore/Target.pri >@@ -203,6 +203,7 @@ v8 { > bindings/v8/custom/V8MessagePortCustom.cpp \ > bindings/v8/custom/V8MessageEventCustom.cpp \ > bindings/v8/custom/V8MutationCallbackCustom.cpp \ >+ bindings/v8/custom/V8MutationObserverCustom.cpp \ > bindings/v8/custom/V8NamedNodeMapCustom.cpp \ > bindings/v8/custom/V8NamedNodesCollection.cpp \ > bindings/v8/custom/V8NodeCustom.cpp \ >@@ -217,7 +218,6 @@ v8 { > bindings/v8/custom/V8StyleSheetListCustom.cpp \ > bindings/v8/custom/V8TextTrackListCustom.cpp \ > bindings/v8/custom/V8WebKitAnimationCustom.cpp \ >- bindings/v8/custom/V8WebKitMutationObserverCustom.cpp \ > bindings/v8/custom/V8WebKitPointConstructor.cpp \ > bindings/v8/custom/V8WorkerContextCustom.cpp \ > bindings/v8/custom/V8WorkerCustom.cpp \ >@@ -335,6 +335,7 @@ v8 { > bindings/js/JSMessagePortCustom.cpp \ > bindings/js/JSMessagePortCustom.h \ > bindings/js/JSMutationCallbackCustom.cpp \ >+ bindings/js/JSMutationObserverCustom.cpp \ > bindings/js/JSNamedNodeMapCustom.cpp \ > bindings/js/JSNodeCustom.cpp \ > bindings/js/JSNodeFilterCondition.cpp \ >@@ -362,7 +363,6 @@ v8 { > bindings/js/JSWebKitAnimationListCustom.cpp \ > bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp \ > bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp \ >- bindings/js/JSWebKitMutationObserverCustom.cpp \ > bindings/js/JSWebKitPointCustom.cpp \ > bindings/js/JSXMLHttpRequestCustom.cpp \ > bindings/js/JSXMLHttpRequestUploadCustom.cpp \ >@@ -576,6 +576,7 @@ SOURCES += \ > dom/MouseEvent.cpp \ > dom/MouseRelatedEvent.cpp \ > dom/MutationEvent.cpp \ >+ dom/MutationObserver.cpp \ > dom/MutationObserverInterestGroup.cpp \ > dom/MutationObserverRegistration.cpp \ > dom/MutationRecord.cpp \ >@@ -630,7 +631,6 @@ SOURCES += \ > dom/UserTypingGestureIndicator.cpp \ > dom/ViewportArguments.cpp \ > dom/WebKitAnimationEvent.cpp \ >- dom/WebKitMutationObserver.cpp \ > dom/WebKitNamedFlow.cpp \ > dom/WebKitTransitionEvent.cpp \ > dom/WheelEvent.cpp \ >@@ -1750,6 +1750,7 @@ HEADERS += \ > dom/MouseRelatedEvent.h \ > dom/MutationCallback.h \ > dom/MutationEvent.h \ >+ dom/MutationObserver.h \ > dom/MutationObserverRegistration.h \ > dom/MutationRecord.h \ > dom/NamedNodeMap.h \ >@@ -1798,7 +1799,6 @@ HEADERS += \ > dom/UserGestureIndicator.h \ > dom/ViewportArguments.h \ > dom/WebKitAnimationEvent.h \ >- dom/WebKitMutationObserver.h \ > dom/WebKitNamedFlow.h \ > dom/WebKitTransitionEvent.h \ > dom/WheelEvent.h \ >diff --git a/Source/WebCore/UseJSC.cmake b/Source/WebCore/UseJSC.cmake >index ce690efff2f3ec9b57a0aab6820bc7b2b9c6d65e..a44502f92800307d6757ce99ea4cc781feac7399 100644 >--- a/Source/WebCore/UseJSC.cmake >+++ b/Source/WebCore/UseJSC.cmake >@@ -116,6 +116,7 @@ LIST(APPEND WebCore_SOURCES > bindings/js/JSMessageEventCustom.cpp > bindings/js/JSMessagePortCustom.cpp > bindings/js/JSMutationCallbackCustom.cpp >+ bindings/js/JSMutationObserverCustom.cpp > bindings/js/JSNamedNodeMapCustom.cpp > bindings/js/JSNodeCustom.cpp > bindings/js/JSNodeFilterCondition.cpp >@@ -142,7 +143,6 @@ LIST(APPEND WebCore_SOURCES > bindings/js/JSWebKitAnimationListCustom.cpp > bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp > bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp >- bindings/js/JSWebKitMutationObserverCustom.cpp > bindings/js/JSWebKitPointCustom.cpp > bindings/js/JSXMLHttpRequestCustom.cpp > bindings/js/JSXMLHttpRequestUploadCustom.cpp >diff --git a/Source/WebCore/UseV8.cmake b/Source/WebCore/UseV8.cmake >index fffc26b135e42f336ff72749b4e4a52bd1773edf..dcbdcf41e939aeadd937560b71741063d314824a 100755 >--- a/Source/WebCore/UseV8.cmake >+++ b/Source/WebCore/UseV8.cmake >@@ -133,6 +133,7 @@ LIST(APPEND WebCore_SOURCES > bindings/v8/custom/V8MessageEventCustom.cpp > bindings/v8/custom/V8MessagePortCustom.cpp > bindings/v8/custom/V8MutationCallbackCustom.cpp >+ bindings/v8/custom/V8MutationObserverCustom.cpp > bindings/v8/custom/V8NamedNodeMapCustom.cpp > bindings/v8/custom/V8NamedNodesCollection.cpp > bindings/v8/custom/V8NodeCustom.cpp >@@ -153,7 +154,6 @@ LIST(APPEND WebCore_SOURCES > bindings/v8/custom/V8Uint8ArrayCustom.cpp > bindings/v8/custom/V8WebGLRenderingContextCustom.cpp > bindings/v8/custom/V8WebKitAnimationCustom.cpp >- bindings/v8/custom/V8WebKitMutationObserverCustom.cpp > bindings/v8/custom/V8WebKitPointConstructor.cpp > bindings/v8/custom/V8WebSocketCustom.cpp > bindings/v8/custom/V8WorkerContextCustom.cpp >diff --git a/Source/WebCore/WebCore.gypi b/Source/WebCore/WebCore.gypi >index 8d94e114310c3981a9e319a2548437a8c0b749f3..e97a97d97bcdd4599bc97286e5bfbeba27521447 100644 >--- a/Source/WebCore/WebCore.gypi >+++ b/Source/WebCore/WebCore.gypi >@@ -962,6 +962,7 @@ > 'dom/MouseEvent.idl', > 'dom/MutationCallback.idl', > 'dom/MutationEvent.idl', >+ 'dom/MutationObserver.idl', > 'dom/MutationRecord.idl', > 'dom/NamedNodeMap.idl', > 'dom/Node.idl', >@@ -987,7 +988,6 @@ > 'dom/TreeWalker.idl', > 'dom/UIEvent.idl', > 'dom/WebKitAnimationEvent.idl', >- 'dom/WebKitMutationObserver.idl', > 'dom/WebKitNamedFlow.idl', > 'dom/WebKitTransitionEvent.idl', > 'dom/WheelEvent.idl', >@@ -2006,6 +2006,7 @@ > 'bindings/js/JSMessagePortCustom.cpp', > 'bindings/js/JSMessagePortCustom.h', > 'bindings/js/JSMutationCallbackCustom.cpp', >+ 'bindings/js/JSMutationObserverCustom.cpp', > 'bindings/js/JSNamedNodeMapCustom.cpp', > 'bindings/js/JSNodeCustom.cpp', > 'bindings/js/JSNodeFilterCondition.cpp', >@@ -2048,7 +2049,6 @@ > 'bindings/js/JSWebKitAnimationListCustom.cpp', > 'bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp', > 'bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp', >- 'bindings/js/JSWebKitMutationObserverCustom.cpp', > 'bindings/js/JSWebKitPointCustom.cpp', > 'bindings/js/JSWebSocketCustom.cpp', > 'bindings/js/JSWorkerContextBase.cpp', >@@ -2320,6 +2320,7 @@ > 'bindings/v8/custom/V8MessageEventCustom.cpp', > 'bindings/v8/custom/V8MessagePortCustom.cpp', > 'bindings/v8/custom/V8MutationCallbackCustom.cpp', >+ 'bindings/v8/custom/V8MutationObserverCustom.cpp', > 'bindings/v8/custom/V8NamedNodeMapCustom.cpp', > 'bindings/v8/custom/V8NamedNodesCollection.cpp', > 'bindings/v8/custom/V8NamedNodesCollection.h', >@@ -2349,7 +2350,6 @@ > 'bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp', > 'bindings/v8/custom/V8WebGLRenderingContextCustom.cpp', > 'bindings/v8/custom/V8WebKitAnimationCustom.cpp', >- 'bindings/v8/custom/V8WebKitMutationObserverCustom.cpp', > 'bindings/v8/custom/V8WebKitPointConstructor.cpp', > 'bindings/v8/custom/V8WebSocketCustom.cpp', > 'bindings/v8/custom/V8WorkerContextCustom.cpp', >@@ -5338,6 +5338,8 @@ > 'dom/MutationCallback.h', > 'dom/MutationEvent.cpp', > 'dom/MutationEvent.h', >+ 'dom/MutationObserver.cpp', >+ 'dom/MutationObserver.h', > 'dom/MutationObserverInterestGroup.cpp', > 'dom/MutationObserverInterestGroup.h', > 'dom/MutationObserverRegistration.cpp', >@@ -5438,8 +5440,6 @@ > 'dom/ViewportArguments.cpp', > 'dom/WebKitAnimationEvent.cpp', > 'dom/WebKitAnimationEvent.h', >- 'dom/WebKitMutationObserver.cpp', >- 'dom/WebKitMutationObserver.h', > 'dom/WebKitNamedFlow.cpp', > 'dom/WebKitNamedFlow.h', > 'dom/WebKitTransitionEvent.cpp', >@@ -7718,6 +7718,8 @@ > '<(PRODUCT_DIR)/DerivedSources/WebCore/JSMutationCallback.h', > '<(PRODUCT_DIR)/DerivedSources/WebCore/JSMutationEvent.cpp', > '<(PRODUCT_DIR)/DerivedSources/WebCore/JSMutationEvent.h', >+ '<(PRODUCT_DIR)/DerivedSources/WebCore/JSMutationObserver.cpp', >+ '<(PRODUCT_DIR)/DerivedSources/WebCore/JSMutationObserver.h', > '<(PRODUCT_DIR)/DerivedSources/WebCore/JSMutationRecord.cpp', > '<(PRODUCT_DIR)/DerivedSources/WebCore/JSMutationRecord.h', > '<(PRODUCT_DIR)/DerivedSources/WebCore/JSNamedNodeMap.cpp', >@@ -8262,8 +8264,6 @@ > '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitCSSRegionRule.h', > '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitCSSTransformValue.cpp', > '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitCSSTransformValue.h', >- '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitMutationObserver.cpp', >- '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitMutationObserver.h', > '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitPoint.cpp', > '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitPoint.h', > '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebKitNamedFlow.cpp', >diff --git a/Source/WebCore/WebCore.vcproj/WebCore.vcproj b/Source/WebCore/WebCore.vcproj/WebCore.vcproj >index d06ddaaa1462d89cc51f9f3ed6d8bee489ceadec..d255188154cd57bb9b1ac6735f091d8f84831866 100755 >--- a/Source/WebCore/WebCore.vcproj/WebCore.vcproj >+++ b/Source/WebCore/WebCore.vcproj/WebCore.vcproj >@@ -11590,6 +11590,62 @@ > > > </File> > <File >+ RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMutationObserver.cpp" >+ > >+ <FileConfiguration >+ Name="Debug|Win32" >+ ExcludedFromBuild="true" >+ > >+ <Tool >+ Name="VCCLCompilerTool" >+ /> >+ </FileConfiguration> >+ <FileConfiguration >+ Name="Release|Win32" >+ ExcludedFromBuild="true" >+ > >+ <Tool >+ Name="VCCLCompilerTool" >+ /> >+ </FileConfiguration> >+ <FileConfiguration >+ Name="Debug_Cairo_CFLite|Win32" >+ ExcludedFromBuild="true" >+ > >+ <Tool >+ Name="VCCLCompilerTool" >+ /> >+ </FileConfiguration> >+ <FileConfiguration >+ Name="Release_Cairo_CFLite|Win32" >+ ExcludedFromBuild="true" >+ > >+ <Tool >+ Name="VCCLCompilerTool" >+ /> >+ </FileConfiguration> >+ <FileConfiguration >+ Name="Debug_All|Win32" >+ ExcludedFromBuild="true" >+ > >+ <Tool >+ Name="VCCLCompilerTool" >+ /> >+ </FileConfiguration> >+ <FileConfiguration >+ Name="Production|Win32" >+ ExcludedFromBuild="true" >+ > >+ <Tool >+ Name="VCCLCompilerTool" >+ /> >+ </FileConfiguration> >+ </File> >+ <File >+ RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMutationObserver.h" >+ > >+ </File> >+ <File > RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSMutationRecord.cpp" > > > <FileConfiguration >@@ -23063,62 +23119,6 @@ > > > </File> > <File >- RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSWebKitMutationObserver.cpp" >- > >- <FileConfiguration >- Name="Debug|Win32" >- ExcludedFromBuild="true" >- > >- <Tool >- Name="VCCLCompilerTool" >- /> >- </FileConfiguration> >- <FileConfiguration >- Name="Release|Win32" >- ExcludedFromBuild="true" >- > >- <Tool >- Name="VCCLCompilerTool" >- /> >- </FileConfiguration> >- <FileConfiguration >- Name="Debug_Cairo_CFLite|Win32" >- ExcludedFromBuild="true" >- > >- <Tool >- Name="VCCLCompilerTool" >- /> >- </FileConfiguration> >- <FileConfiguration >- Name="Release_Cairo_CFLite|Win32" >- ExcludedFromBuild="true" >- > >- <Tool >- Name="VCCLCompilerTool" >- /> >- </FileConfiguration> >- <FileConfiguration >- Name="Debug_All|Win32" >- ExcludedFromBuild="true" >- > >- <Tool >- Name="VCCLCompilerTool" >- /> >- </FileConfiguration> >- <FileConfiguration >- Name="Production|Win32" >- ExcludedFromBuild="true" >- > >- <Tool >- Name="VCCLCompilerTool" >- /> >- </FileConfiguration> >- </File> >- <File >- RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSWebKitMutationObserver.h" >- > >- </File> >- <File > RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSWebKitNamedFlow.cpp" > > > <FileConfiguration >@@ -51615,6 +51615,62 @@ > > > </File> > <File >+ RelativePath="..\dom\MutationObserver.cpp" >+ > >+ <FileConfiguration >+ Name="Debug|Win32" >+ ExcludedFromBuild="true" >+ > >+ <Tool >+ Name="VCCLCompilerTool" >+ /> >+ </FileConfiguration> >+ <FileConfiguration >+ Name="Release|Win32" >+ ExcludedFromBuild="true" >+ > >+ <Tool >+ Name="VCCLCompilerTool" >+ /> >+ </FileConfiguration> >+ <FileConfiguration >+ Name="Debug_Cairo_CFLite|Win32" >+ ExcludedFromBuild="true" >+ > >+ <Tool >+ Name="VCCLCompilerTool" >+ /> >+ </FileConfiguration> >+ <FileConfiguration >+ Name="Release_Cairo_CFLite|Win32" >+ ExcludedFromBuild="true" >+ > >+ <Tool >+ Name="VCCLCompilerTool" >+ /> >+ </FileConfiguration> >+ <FileConfiguration >+ Name="Debug_All|Win32" >+ ExcludedFromBuild="true" >+ > >+ <Tool >+ Name="VCCLCompilerTool" >+ /> >+ </FileConfiguration> >+ <FileConfiguration >+ Name="Production|Win32" >+ ExcludedFromBuild="true" >+ > >+ <Tool >+ Name="VCCLCompilerTool" >+ /> >+ </FileConfiguration> >+ </File> >+ <File >+ RelativePath="..\dom\MutationObserver.h" >+ > >+ </File> >+ <File > RelativePath="..\dom\MutationObserverInterestGroup.cpp" > > > <FileConfiguration >@@ -54303,62 +54359,6 @@ > > > </File> > <File >- RelativePath="..\dom\WebKitMutationObserver.cpp" >- > >- <FileConfiguration >- Name="Debug|Win32" >- ExcludedFromBuild="true" >- > >- <Tool >- Name="VCCLCompilerTool" >- /> >- </FileConfiguration> >- <FileConfiguration >- Name="Release|Win32" >- ExcludedFromBuild="true" >- > >- <Tool >- Name="VCCLCompilerTool" >- /> >- </FileConfiguration> >- <FileConfiguration >- Name="Debug_Cairo_CFLite|Win32" >- ExcludedFromBuild="true" >- > >- <Tool >- Name="VCCLCompilerTool" >- /> >- </FileConfiguration> >- <FileConfiguration >- Name="Release_Cairo_CFLite|Win32" >- ExcludedFromBuild="true" >- > >- <Tool >- Name="VCCLCompilerTool" >- /> >- </FileConfiguration> >- <FileConfiguration >- Name="Debug_All|Win32" >- ExcludedFromBuild="true" >- > >- <Tool >- Name="VCCLCompilerTool" >- /> >- </FileConfiguration> >- <FileConfiguration >- Name="Production|Win32" >- ExcludedFromBuild="true" >- > >- <Tool >- Name="VCCLCompilerTool" >- /> >- </FileConfiguration> >- </File> >- <File >- RelativePath="..\dom\WebKitMutationObserver.h" >- > >- </File> >- <File > RelativePath="..\dom\WebKitNamedFlow.cpp" > > > <FileConfiguration >@@ -68182,7 +68182,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSNamedNodeMapCustom.cpp" >+ RelativePath="..\bindings\js\JSMutationObserverCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -68234,7 +68234,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSNodeCustom.cpp" >+ RelativePath="..\bindings\js\JSNamedNodeMapCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -68286,11 +68286,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSNodeCustom.h" >- > >- </File> >- <File >- RelativePath="..\bindings\js\JSNodeFilterCondition.cpp" >+ RelativePath="..\bindings\js\JSNodeCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -68342,11 +68338,11 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSNodeFilterCondition.h" >+ RelativePath="..\bindings\js\JSNodeCustom.h" > > > </File> > <File >- RelativePath="..\bindings\js\JSNodeFilterCustom.cpp" >+ RelativePath="..\bindings\js\JSNodeFilterCondition.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -68398,7 +68394,11 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSNodeIteratorCustom.cpp" >+ RelativePath="..\bindings\js\JSNodeFilterCondition.h" >+ > >+ </File> >+ <File >+ RelativePath="..\bindings\js\JSNodeFilterCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -68450,7 +68450,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSNodeListCustom.cpp" >+ RelativePath="..\bindings\js\JSNodeIteratorCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -68502,7 +68502,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSNotificationCustom.cpp" >+ RelativePath="..\bindings\js\JSNodeListCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -68554,7 +68554,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSPluginElementFunctions.cpp" >+ RelativePath="..\bindings\js\JSNotificationCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -68606,11 +68606,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSPluginElementFunctions.h" >- > >- </File> >- <File >- RelativePath="..\bindings\js\JSProcessingInstructionCustom.cpp" >+ RelativePath="..\bindings\js\JSPluginElementFunctions.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -68662,7 +68658,11 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSRequestAnimationFrameCallbackCustom.cpp" >+ RelativePath="..\bindings\js\JSPluginElementFunctions.h" >+ > >+ </File> >+ <File >+ RelativePath="..\bindings\js\JSProcessingInstructionCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -68714,7 +68714,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSScriptProfileNodeCustom.cpp" >+ RelativePath="..\bindings\js\JSRequestAnimationFrameCallbackCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -68766,7 +68766,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSSharedWorkerCustom.cpp" >+ RelativePath="..\bindings\js\JSScriptProfileNodeCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -68818,7 +68818,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSSQLResultSetRowListCustom.cpp" >+ RelativePath="..\bindings\js\JSSharedWorkerCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -68870,7 +68870,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSSQLTransactionCustom.cpp" >+ RelativePath="..\bindings\js\JSSQLResultSetRowListCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -68922,7 +68922,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSSQLTransactionSyncCustom.cpp" >+ RelativePath="..\bindings\js\JSSQLTransactionCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -68974,7 +68974,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSStorageCustom.cpp" >+ RelativePath="..\bindings\js\JSSQLTransactionSyncCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -69026,11 +69026,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSStorageCustom.h" >- > >- </File> >- <File >- RelativePath="..\bindings\js\JSStyleSheetCustom.cpp" >+ RelativePath="..\bindings\js\JSStorageCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -69082,7 +69078,11 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSStyleSheetListCustom.cpp" >+ RelativePath="..\bindings\js\JSStorageCustom.h" >+ > >+ </File> >+ <File >+ RelativePath="..\bindings\js\JSStyleSheetCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -69134,7 +69134,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSSVGElementInstanceCustom.cpp" >+ RelativePath="..\bindings\js\JSStyleSheetListCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -69186,7 +69186,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSSVGLengthCustom.cpp" >+ RelativePath="..\bindings\js\JSSVGElementInstanceCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -69238,7 +69238,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSSVGPathSegCustom.cpp" >+ RelativePath="..\bindings\js\JSSVGLengthCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -69290,7 +69290,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSTextCustom.cpp" >+ RelativePath="..\bindings\js\JSSVGPathSegCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -69342,7 +69342,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSTreeWalkerCustom.cpp" >+ RelativePath="..\bindings\js\JSTextCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -69394,7 +69394,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSWebKitAnimationCustom.cpp" >+ RelativePath="..\bindings\js\JSTreeWalkerCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -69446,7 +69446,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSWebKitAnimationListCustom.cpp" >+ RelativePath="..\bindings\js\JSWebKitAnimationCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -69498,7 +69498,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSWebKitCSSKeyframeRuleCustom.cpp" >+ RelativePath="..\bindings\js\JSWebKitAnimationListCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -69550,7 +69550,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSWebKitCSSKeyframesRuleCustom.cpp" >+ RelativePath="..\bindings\js\JSWebKitCSSKeyframeRuleCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -69602,7 +69602,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSWebKitCSSMatrixCustom.cpp" >+ RelativePath="..\bindings\js\JSWebKitCSSKeyframesRuleCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >@@ -69654,7 +69654,7 @@ > </FileConfiguration> > </File> > <File >- RelativePath="..\bindings\js\JSWebKitMutationObserverCustom.cpp" >+ RelativePath="..\bindings\js\JSWebKitCSSMatrixCustom.cpp" > > > <FileConfiguration > Name="Debug|Win32" >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index df8d5a8625b8772da28f6cde0c282da8f142fdfc..1b7741f8ff92a7acf2ba2c774554c84ded40154f 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -5753,13 +5753,13 @@ > C6F08FC91431000D00685849 /* JSMutationRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F08FC71431000D00685849 /* JSMutationRecord.cpp */; }; > C6F08FCA1431000D00685849 /* JSMutationRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = C6F08FC81431000D00685849 /* JSMutationRecord.h */; }; > C6F0900A14327B6100685849 /* MutationCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = C6F0900114327B6100685849 /* MutationCallback.h */; }; >- C6F0900E14327B6100685849 /* WebKitMutationObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F0900514327B6100685849 /* WebKitMutationObserver.cpp */; }; >- C6F0900F14327B6100685849 /* WebKitMutationObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = C6F0900614327B6100685849 /* WebKitMutationObserver.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ C6F0900E14327B6100685849 /* MutationObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F0900514327B6100685849 /* MutationObserver.cpp */; }; >+ C6F0900F14327B6100685849 /* MutationObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = C6F0900614327B6100685849 /* MutationObserver.h */; settings = {ATTRIBUTES = (Private, ); }; }; > C6F0902814327D4F00685849 /* JSMutationCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F0902014327D4F00685849 /* JSMutationCallback.cpp */; }; > C6F0902914327D4F00685849 /* JSMutationCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = C6F0902114327D4F00685849 /* JSMutationCallback.h */; }; >- C6F0902C14327D4F00685849 /* JSWebKitMutationObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F0902414327D4F00685849 /* JSWebKitMutationObserver.cpp */; }; >- C6F0902D14327D4F00685849 /* JSWebKitMutationObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = C6F0902514327D4F00685849 /* JSWebKitMutationObserver.h */; }; >- C6F0917F143A2BB900685849 /* JSWebKitMutationObserverCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F0917E143A2BB900685849 /* JSWebKitMutationObserverCustom.cpp */; }; >+ C6F0902C14327D4F00685849 /* JSMutationObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F0902414327D4F00685849 /* JSMutationObserver.cpp */; }; >+ C6F0902D14327D4F00685849 /* JSMutationObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = C6F0902514327D4F00685849 /* JSMutationObserver.h */; }; >+ C6F0917F143A2BB900685849 /* JSMutationObserverCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F0917E143A2BB900685849 /* JSMutationObserverCustom.cpp */; }; > C6F09185143A6C3B00685849 /* JSMutationCallbackCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F09184143A6C3B00685849 /* JSMutationCallbackCustom.cpp */; }; > C6F41047130C6E8900393DE4 /* EntryBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6F41046130C6E8900393DE4 /* EntryBase.cpp */; }; > CA3BF67C10D99BAE00E6CE53 /* ScrollAnimator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CA3BF67B10D99BAE00E6CE53 /* ScrollAnimator.cpp */; }; >@@ -12944,14 +12944,14 @@ > C6F08FC81431000D00685849 /* JSMutationRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMutationRecord.h; sourceTree = "<group>"; }; > C6F0900114327B6100685849 /* MutationCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MutationCallback.h; sourceTree = "<group>"; }; > C6F0900214327B6100685849 /* MutationCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MutationCallback.idl; sourceTree = "<group>"; }; >- C6F0900514327B6100685849 /* WebKitMutationObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitMutationObserver.cpp; sourceTree = "<group>"; }; >- C6F0900614327B6100685849 /* WebKitMutationObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitMutationObserver.h; sourceTree = "<group>"; }; >- C6F0900714327B6100685849 /* WebKitMutationObserver.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitMutationObserver.idl; sourceTree = "<group>"; }; >+ C6F0900514327B6100685849 /* MutationObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MutationObserver.cpp; sourceTree = "<group>"; }; >+ C6F0900614327B6100685849 /* MutationObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MutationObserver.h; sourceTree = "<group>"; }; >+ C6F0900714327B6100685849 /* MutationObserver.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MutationObserver.idl; sourceTree = "<group>"; }; > C6F0902014327D4F00685849 /* JSMutationCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMutationCallback.cpp; sourceTree = "<group>"; }; > C6F0902114327D4F00685849 /* JSMutationCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMutationCallback.h; sourceTree = "<group>"; }; >- C6F0902414327D4F00685849 /* JSWebKitMutationObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitMutationObserver.cpp; sourceTree = "<group>"; }; >- C6F0902514327D4F00685849 /* JSWebKitMutationObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebKitMutationObserver.h; sourceTree = "<group>"; }; >- C6F0917E143A2BB900685849 /* JSWebKitMutationObserverCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitMutationObserverCustom.cpp; sourceTree = "<group>"; }; >+ C6F0902414327D4F00685849 /* JSMutationObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMutationObserver.cpp; sourceTree = "<group>"; }; >+ C6F0902514327D4F00685849 /* JSMutationObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMutationObserver.h; sourceTree = "<group>"; }; >+ C6F0917E143A2BB900685849 /* JSMutationObserverCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMutationObserverCustom.cpp; sourceTree = "<group>"; }; > C6F09184143A6C3B00685849 /* JSMutationCallbackCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMutationCallbackCustom.cpp; sourceTree = "<group>"; }; > C6F41046130C6E8900393DE4 /* EntryBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EntryBase.cpp; path = Modules/filesystem/EntryBase.cpp; sourceTree = "<group>"; }; > CA3BF67B10D99BAE00E6CE53 /* ScrollAnimator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollAnimator.cpp; sourceTree = "<group>"; }; >@@ -18624,6 +18624,8 @@ > FE80DA620E9C4703000D6F75 /* JSGeoposition.h */, > C6F0902014327D4F00685849 /* JSMutationCallback.cpp */, > C6F0902114327D4F00685849 /* JSMutationCallback.h */, >+ C6F0902414327D4F00685849 /* JSMutationObserver.cpp */, >+ C6F0902514327D4F00685849 /* JSMutationObserver.h */, > C6F08FC71431000D00685849 /* JSMutationRecord.cpp */, > C6F08FC81431000D00685849 /* JSMutationRecord.h */, > BCD9C2BC0C17B69E005C90A2 /* JSNamedNodeMap.cpp */, >@@ -18656,8 +18658,6 @@ > 75415D54129AB2D2003AD669 /* JSSpeechInputResultList.h */, > 65DF31EF09D1CC60000BE325 /* JSText.cpp */, > 65DF31F009D1CC60000BE325 /* JSText.h */, >- C6F0902414327D4F00685849 /* JSWebKitMutationObserver.cpp */, >- C6F0902514327D4F00685849 /* JSWebKitMutationObserver.h */, > D7613AC214753E5600DB8606 /* JSWebKitNamedFlow.cpp */, > D7613AC314753E5600DB8606 /* JSWebKitNamedFlow.h */, > ); >@@ -20055,6 +20055,7 @@ > E1ADED460E76B8DD004A1A5E /* JSMessagePortCustom.cpp */, > 41F584C6104652CB009CAA64 /* JSMessagePortCustom.h */, > C6F09184143A6C3B00685849 /* JSMutationCallbackCustom.cpp */, >+ C6F0917E143A2BB900685849 /* JSMutationObserverCustom.cpp */, > BCD9C25F0C17AA67005C90A2 /* JSNamedNodeMapCustom.cpp */, > BCD9C2600C17AA67005C90A2 /* JSNodeCustom.cpp */, > BC9439C2116CF4940048C750 /* JSNodeCustom.h */, >@@ -20094,7 +20095,6 @@ > 3194623113022F65004BB3F8 /* JSWebKitAnimationListCustom.cpp */, > E1AD14C41297354900ACA989 /* JSWebKitCSSKeyframeRuleCustom.cpp */, > E1AD14B4129734CA00ACA989 /* JSWebKitCSSKeyframesRuleCustom.cpp */, >- C6F0917E143A2BB900685849 /* JSWebKitMutationObserverCustom.cpp */, > BC275B7811C5D1C300C9206C /* JSWebKitPointCustom.cpp */, > 518A34C61026C8C9001B6896 /* JSWebSocketCustom.cpp */, > E18258AB0EF3CD7000933242 /* JSWorkerContextCustom.cpp */, >@@ -21389,6 +21389,9 @@ > D6E528A2149A926D00EFE1F3 /* MutationObserverInterestGroup.h */, > D6E276AD14637455001D280A /* MutationObserverRegistration.cpp */, > D6E276AE14637455001D280A /* MutationObserverRegistration.h */, >+ C6F0900514327B6100685849 /* MutationObserver.cpp */, >+ C6F0900614327B6100685849 /* MutationObserver.h */, >+ C6F0900714327B6100685849 /* MutationObserver.idl */, > C6F08FB91430FE8F00685849 /* MutationRecord.cpp */, > C6F08FBA1430FE8F00685849 /* MutationRecord.h */, > C6F08FBB1430FE8F00685849 /* MutationRecord.idl */, >@@ -21523,9 +21526,6 @@ > 31C0FF1B0E4CEB6E007D6FE5 /* WebKitAnimationEvent.cpp */, > 31C0FF1C0E4CEB6E007D6FE5 /* WebKitAnimationEvent.h */, > 31C0FF1D0E4CEB6E007D6FE5 /* WebKitAnimationEvent.idl */, >- C6F0900514327B6100685849 /* WebKitMutationObserver.cpp */, >- C6F0900614327B6100685849 /* WebKitMutationObserver.h */, >- C6F0900714327B6100685849 /* WebKitMutationObserver.idl */, > D7613A4E1474F13F00DB8606 /* WebKitNamedFlow.cpp */, > D7613A4D1474F13F00DB8606 /* WebKitNamedFlow.h */, > D7613A4A1474EE9500DB8606 /* WebKitNamedFlow.idl */, >@@ -23636,6 +23636,7 @@ > A86629D109DA2B48009633A5 /* JSMouseEvent.h in Headers */, > C6F0902914327D4F00685849 /* JSMutationCallback.h in Headers */, > 65DF31FC09D1CC60000BE325 /* JSMutationEvent.h in Headers */, >+ C6F0902D14327D4F00685849 /* JSMutationObserver.h in Headers */, > C6F08FCA1431000D00685849 /* JSMutationRecord.h in Headers */, > BCD9C2C10C17B69E005C90A2 /* JSNamedNodeMap.h in Headers */, > A9D247F80D757E3400FDF959 /* JSNavigator.h in Headers */, >@@ -23889,7 +23890,6 @@ > 498391400F1E767500C23782 /* JSWebKitCSSMatrix.h in Headers */, > 8AD0A59514C88336000D83C5 /* JSWebKitCSSRegionRule.h in Headers */, > 31611E5B0E1C4DE000F6A579 /* JSWebKitCSSTransformValue.h in Headers */, >- C6F0902D14327D4F00685849 /* JSWebKitMutationObserver.h in Headers */, > 494BD79E0F55C94C00747828 /* JSWebKitPoint.h in Headers */, > 31C0FF400E4CEFAC007D6FE5 /* JSWebKitTransitionEvent.h in Headers */, > 5DA5E0FD102B953800088CF9 /* JSWebSocket.h in Headers */, >@@ -24022,6 +24022,7 @@ > FDB1700614A2BAB200A2B5D9 /* MultiChannelResampler.h in Headers */, > C6F0900A14327B6100685849 /* MutationCallback.h in Headers */, > 85031B4A0A44EFC700F992E0 /* MutationEvent.h in Headers */, >+ C6F0900F14327B6100685849 /* MutationObserver.h in Headers */, > D6E528A4149A926D00EFE1F3 /* MutationObserverInterestGroup.h in Headers */, > D6E276B014637455001D280A /* MutationObserverRegistration.h in Headers */, > C6F08FBD1430FE8F00685849 /* MutationRecord.h in Headers */, >@@ -24976,7 +24977,6 @@ > 29CD61DE146D02890068E82A /* WebKitCSSShaderValue.h in Headers */, > BC9ADD230CC4032600098C4C /* WebKitCSSTransformValue.h in Headers */, > 89878566122CA064003AABDA /* WebKitFlags.h in Headers */, >- C6F0900F14327B6100685849 /* WebKitMutationObserver.h in Headers */, > 494BD7950F55C8EE00747828 /* WebKitPoint.h in Headers */, > 31C0FF250E4CEB6E007D6FE5 /* WebKitTransitionEvent.h in Headers */, > 0FCF332F0F2B9A25004B6795 /* WebLayer.h in Headers */, >@@ -26845,6 +26845,8 @@ > C6F0902814327D4F00685849 /* JSMutationCallback.cpp in Sources */, > C6F09185143A6C3B00685849 /* JSMutationCallbackCustom.cpp in Sources */, > 65DF31FB09D1CC60000BE325 /* JSMutationEvent.cpp in Sources */, >+ C6F0902C14327D4F00685849 /* JSMutationObserver.cpp in Sources */, >+ C6F0917F143A2BB900685849 /* JSMutationObserverCustom.cpp in Sources */, > C6F08FC91431000D00685849 /* JSMutationRecord.cpp in Sources */, > BCD9C2C00C17B69E005C90A2 /* JSNamedNodeMap.cpp in Sources */, > BCD9C2630C17AA67005C90A2 /* JSNamedNodeMapCustom.cpp in Sources */, >@@ -27135,8 +27137,6 @@ > 4983913F0F1E767500C23782 /* JSWebKitCSSMatrix.cpp in Sources */, > 8AD0A59414C88336000D83C5 /* JSWebKitCSSRegionRule.cpp in Sources */, > 31611E5A0E1C4DE000F6A579 /* JSWebKitCSSTransformValue.cpp in Sources */, >- C6F0902C14327D4F00685849 /* JSWebKitMutationObserver.cpp in Sources */, >- C6F0917F143A2BB900685849 /* JSWebKitMutationObserverCustom.cpp in Sources */, > D7613AC414753E5600DB8606 /* JSWebKitNamedFlow.cpp in Sources */, > 494BD79D0F55C94C00747828 /* JSWebKitPoint.cpp in Sources */, > BC275B7911C5D1C300C9206C /* JSWebKitPointCustom.cpp in Sources */, >@@ -27269,6 +27269,7 @@ > 93309DFB099E64920056E581 /* MoveSelectionCommand.cpp in Sources */, > FDB1700514A2BAB200A2B5D9 /* MultiChannelResampler.cpp in Sources */, > 85031B490A44EFC700F992E0 /* MutationEvent.cpp in Sources */, >+ C6F0900E14327B6100685849 /* MutationObserver.cpp in Sources */, > D6E528A3149A926D00EFE1F3 /* MutationObserverInterestGroup.cpp in Sources */, > D6E276AF14637455001D280A /* MutationObserverRegistration.cpp in Sources */, > C6F08FBC1430FE8F00685849 /* MutationRecord.cpp in Sources */, >@@ -28030,7 +28031,6 @@ > 5038BC0714711CDB0095E0D1 /* WebKitCSSShaderValue.cpp in Sources */, > BC9ADD800CC4092200098C4C /* WebKitCSSTransformValue.cpp in Sources */, > 1A1414B513A0F0500019996C /* WebKitFontFamilyNames.cpp in Sources */, >- C6F0900E14327B6100685849 /* WebKitMutationObserver.cpp in Sources */, > D7613A501474F13F00DB8606 /* WebKitNamedFlow.cpp in Sources */, > 31C0FF240E4CEB6E007D6FE5 /* WebKitTransitionEvent.cpp in Sources */, > 0FCF332E0F2B9A25004B6795 /* WebLayer.mm in Sources */, >diff --git a/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp b/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp >index 66b4a7f43184b4016de77d4a3834b894e96abc39..8b94f6497aba06aec1d3fe8800037eafee60c654 100644 >--- a/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp >+++ b/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp >@@ -120,6 +120,7 @@ > #include "JSMessageEventCustom.cpp" > #include "JSMessagePortCustom.cpp" > #include "JSMutationCallbackCustom.cpp" >+#include "JSMutationObserverCustom.cpp" > #include "JSNamedNodeMapCustom.cpp" > #include "JSNodeCustom.cpp" > #include "JSNodeFilterCondition.cpp" >@@ -158,7 +159,6 @@ > #include "JSWebKitAnimationListCustom.cpp" > #include "JSWebKitCSSKeyframeRuleCustom.cpp" > #include "JSWebKitCSSKeyframesRuleCustom.cpp" >-#include "JSWebKitMutationObserverCustom.cpp" > #include "JSWebKitPointCustom.cpp" > #include "JSWebSocketCustom.cpp" > #include "JSWorkerContextBase.cpp" >diff --git a/Source/WebCore/bindings/js/JSMainThreadExecState.cpp b/Source/WebCore/bindings/js/JSMainThreadExecState.cpp >index 00bc170d2b35236e189d233e9c943bb24985b9d6..556ca5d8d31225287fc3853e2180ba02d07604db 100644 >--- a/Source/WebCore/bindings/js/JSMainThreadExecState.cpp >+++ b/Source/WebCore/bindings/js/JSMainThreadExecState.cpp >@@ -25,7 +25,7 @@ > > #include "config.h" > #include "JSMainThreadExecState.h" >-#include "WebKitMutationObserver.h" >+#include "MutationObserver.h" > > #if ENABLE(INDEXED_DATABASE) > #include "IDBPendingTransactionMonitor.h" >@@ -42,7 +42,7 @@ void JSMainThreadExecState::didLeaveScriptContext() > #endif > > #if ENABLE(MUTATION_OBSERVERS) >- WebKitMutationObserver::deliverAllMutations(); >+ MutationObserver::deliverAllMutations(); > #endif > } > >diff --git a/Source/WebCore/bindings/js/JSMutationCallbackCustom.cpp b/Source/WebCore/bindings/js/JSMutationCallbackCustom.cpp >index 4375ce417470d5e857aa450d73c5c01430207915..2d8eef959994a44dc223ad5824cbb2c3bc727c4f 100644 >--- a/Source/WebCore/bindings/js/JSMutationCallbackCustom.cpp >+++ b/Source/WebCore/bindings/js/JSMutationCallbackCustom.cpp >@@ -34,8 +34,8 @@ > > #include "JSMutationCallback.h" > >+#include "JSMutationObserver.h" > #include "JSMutationRecord.h" >-#include "JSWebKitMutationObserver.h" > #include "ScriptExecutionContext.h" > #include <runtime/JSLock.h> > >@@ -43,7 +43,7 @@ using namespace JSC; > > namespace WebCore { > >-bool JSMutationCallback::handleEvent(MutationRecordArray* mutations, WebKitMutationObserver* observer) >+bool JSMutationCallback::handleEvent(MutationRecordArray* mutations, MutationObserver* observer) > { > if (!canInvokeCallback()) > return true; >diff --git a/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp b/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..9cc3b52470c918d4434bdd209f582a610563d3a8 >--- /dev/null >+++ b/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp >@@ -0,0 +1,122 @@ >+/* >+ * Copyright (C) 2011 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions are >+ * met: >+ * >+ * * Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * * Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following disclaimer >+ * in the documentation and/or other materials provided with the >+ * distribution. >+ * * Neither the name of Google Inc. nor the names of its >+ * contributors may be used to endorse or promote products derived from >+ * this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+ >+#if ENABLE(MUTATION_OBSERVERS) >+ >+#include "JSMutationObserver.h" >+ >+#include "ExceptionCode.h" >+#include "JSDictionary.h" >+#include "JSMutationCallback.h" >+#include "JSNode.h" >+#include "MutationObserver.h" >+#include "Node.h" >+#include <runtime/Error.h> >+#include <wtf/HashSet.h> >+#include <wtf/text/AtomicString.h> >+ >+using namespace JSC; >+ >+namespace WebCore { >+ >+EncodedJSValue JSC_HOST_CALL JSMutationObserverConstructor::constructJSMutationObserver(ExecState* exec) >+{ >+ if (exec->argumentCount() < 1) >+ return throwVMError(exec, createNotEnoughArgumentsError(exec)); >+ >+ JSObject* object = exec->argument(0).getObject(); >+ if (!object) { >+ setDOMException(exec, TYPE_MISMATCH_ERR); >+ return JSValue::encode(jsUndefined()); >+ } >+ >+ JSMutationObserverConstructor* jsConstructor = jsCast<JSMutationObserverConstructor*>(exec->callee()); >+ RefPtr<MutationCallback> callback = JSMutationCallback::create(object, jsConstructor->globalObject()); >+ return JSValue::encode(asObject(toJS(exec, jsConstructor->globalObject(), MutationObserver::create(callback.release())))); >+} >+ >+struct BooleanOption { >+ const char* name; >+ MutationObserverOptions value; >+}; >+ >+static const BooleanOption booleanOptions[] = { >+ { "childList", MutationObserver::ChildList }, >+ { "attributes", MutationObserver::Attributes }, >+ { "characterData", MutationObserver::CharacterData }, >+ { "subtree", MutationObserver::Subtree }, >+ { "attributeOldValue", MutationObserver::AttributeOldValue }, >+ { "characterDataOldValue", MutationObserver::CharacterDataOldValue } >+}; >+ >+static const size_t numBooleanOptions = sizeof(booleanOptions) / sizeof(BooleanOption); >+ >+JSValue JSMutationObserver::observe(ExecState* exec) >+{ >+ if (exec->argumentCount() < 2) >+ return throwError(exec, createNotEnoughArgumentsError(exec)); >+ Node* target = toNode(exec->argument(0)); >+ if (exec->hadException()) >+ return jsUndefined(); >+ >+ JSObject* optionsObject = exec->argument(1).getObject(); >+ if (!optionsObject) { >+ setDOMException(exec, TYPE_MISMATCH_ERR); >+ return jsUndefined(); >+ } >+ >+ JSDictionary dictionary(exec, optionsObject); >+ MutationObserverOptions options = 0; >+ for (unsigned i = 0; i < numBooleanOptions; ++i) { >+ bool option = false; >+ if (!dictionary.tryGetProperty(booleanOptions[i].name, option)) >+ return jsUndefined(); >+ if (option) >+ options |= booleanOptions[i].value; >+ } >+ >+ HashSet<AtomicString> attributeFilter; >+ if (!dictionary.tryGetProperty("attributeFilter", attributeFilter)) >+ return jsUndefined(); >+ if (!attributeFilter.isEmpty()) >+ options |= MutationObserver::AttributeFilter; >+ >+ ExceptionCode ec = 0; >+ impl()->observe(target, options, attributeFilter, ec); >+ if (ec) >+ setDOMException(exec, ec); >+ return jsUndefined(); >+} >+ >+} // namespace WebCore >+ >+#endif // ENABLE(MUTATION_OBSERVERS) >diff --git a/Source/WebCore/bindings/js/JSWebKitMutationObserverCustom.cpp b/Source/WebCore/bindings/js/JSWebKitMutationObserverCustom.cpp >deleted file mode 100644 >index 39a246a15994ba098642bf522d8d56acb7d21af9..0000000000000000000000000000000000000000 >--- a/Source/WebCore/bindings/js/JSWebKitMutationObserverCustom.cpp >+++ /dev/null >@@ -1,122 +0,0 @@ >-/* >- * Copyright (C) 2011 Google Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions are >- * met: >- * >- * * Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * * Redistributions in binary form must reproduce the above >- * copyright notice, this list of conditions and the following disclaimer >- * in the documentation and/or other materials provided with the >- * distribution. >- * * Neither the name of Google Inc. nor the names of its >- * contributors may be used to endorse or promote products derived from >- * this software without specific prior written permission. >- * >- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >- >-#if ENABLE(MUTATION_OBSERVERS) >- >-#include "JSWebKitMutationObserver.h" >- >-#include "ExceptionCode.h" >-#include "JSDictionary.h" >-#include "JSMutationCallback.h" >-#include "JSNode.h" >-#include "Node.h" >-#include "WebKitMutationObserver.h" >-#include <runtime/Error.h> >-#include <wtf/HashSet.h> >-#include <wtf/text/AtomicString.h> >- >-using namespace JSC; >- >-namespace WebCore { >- >-EncodedJSValue JSC_HOST_CALL JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver(ExecState* exec) >-{ >- if (exec->argumentCount() < 1) >- return throwVMError(exec, createNotEnoughArgumentsError(exec)); >- >- JSObject* object = exec->argument(0).getObject(); >- if (!object) { >- setDOMException(exec, TYPE_MISMATCH_ERR); >- return JSValue::encode(jsUndefined()); >- } >- >- JSWebKitMutationObserverConstructor* jsConstructor = jsCast<JSWebKitMutationObserverConstructor*>(exec->callee()); >- RefPtr<MutationCallback> callback = JSMutationCallback::create(object, jsConstructor->globalObject()); >- return JSValue::encode(asObject(toJS(exec, jsConstructor->globalObject(), WebKitMutationObserver::create(callback.release())))); >-} >- >-struct BooleanOption { >- const char* name; >- MutationObserverOptions value; >-}; >- >-static const BooleanOption booleanOptions[] = { >- { "childList", WebKitMutationObserver::ChildList }, >- { "attributes", WebKitMutationObserver::Attributes }, >- { "characterData", WebKitMutationObserver::CharacterData }, >- { "subtree", WebKitMutationObserver::Subtree }, >- { "attributeOldValue", WebKitMutationObserver::AttributeOldValue }, >- { "characterDataOldValue", WebKitMutationObserver::CharacterDataOldValue } >-}; >- >-static const size_t numBooleanOptions = sizeof(booleanOptions) / sizeof(BooleanOption); >- >-JSValue JSWebKitMutationObserver::observe(ExecState* exec) >-{ >- if (exec->argumentCount() < 2) >- return throwError(exec, createNotEnoughArgumentsError(exec)); >- Node* target = toNode(exec->argument(0)); >- if (exec->hadException()) >- return jsUndefined(); >- >- JSObject* optionsObject = exec->argument(1).getObject(); >- if (!optionsObject) { >- setDOMException(exec, TYPE_MISMATCH_ERR); >- return jsUndefined(); >- } >- >- JSDictionary dictionary(exec, optionsObject); >- MutationObserverOptions options = 0; >- for (unsigned i = 0; i < numBooleanOptions; ++i) { >- bool option = false; >- if (!dictionary.tryGetProperty(booleanOptions[i].name, option)) >- return jsUndefined(); >- if (option) >- options |= booleanOptions[i].value; >- } >- >- HashSet<AtomicString> attributeFilter; >- if (!dictionary.tryGetProperty("attributeFilter", attributeFilter)) >- return jsUndefined(); >- if (!attributeFilter.isEmpty()) >- options |= WebKitMutationObserver::AttributeFilter; >- >- ExceptionCode ec = 0; >- impl()->observe(target, options, attributeFilter, ec); >- if (ec) >- setDOMException(exec, ec); >- return jsUndefined(); >-} >- >-} // namespace WebCore >- >-#endif // ENABLE(MUTATION_OBSERVERS) >diff --git a/Source/WebCore/bindings/v8/V8RecursionScope.cpp b/Source/WebCore/bindings/v8/V8RecursionScope.cpp >index 92be720b14c69f05f6eef6a96c2682c4b3cfcf65..c5cbc9c155140778905e42280e1fdb0240203089 100644 >--- a/Source/WebCore/bindings/v8/V8RecursionScope.cpp >+++ b/Source/WebCore/bindings/v8/V8RecursionScope.cpp >@@ -32,7 +32,7 @@ > #include "V8RecursionScope.h" > > #include "IDBPendingTransactionMonitor.h" >-#include "WebKitMutationObserver.h" >+#include "MutationObserver.h" > > namespace WebCore { > >@@ -49,7 +49,7 @@ void V8RecursionScope::didLeaveScriptContext() > > #if ENABLE(MUTATION_OBSERVERS) > if (m_isDocumentContext) >- WebKitMutationObserver::deliverAllMutations(); >+ MutationObserver::deliverAllMutations(); > #endif > } > >diff --git a/Source/WebCore/bindings/v8/custom/V8MutationCallbackCustom.cpp b/Source/WebCore/bindings/v8/custom/V8MutationCallbackCustom.cpp >index bffbe7400fda2ca58d2f9b77086f6c6bbfa0527f..714fda29c9a1b23057fd4afd21d214fe95a2a5cb 100644 >--- a/Source/WebCore/bindings/v8/custom/V8MutationCallbackCustom.cpp >+++ b/Source/WebCore/bindings/v8/custom/V8MutationCallbackCustom.cpp >@@ -37,9 +37,9 @@ > #include "ScriptExecutionContext.h" > #include "V8Binding.h" > #include "V8CustomVoidCallback.h" >+#include "V8MutationObserver.h" > #include "V8MutationRecord.h" > #include "V8Proxy.h" >-#include "V8WebKitMutationObserver.h" > #include <wtf/Assertions.h> > #include <wtf/GetPtr.h> > #include <wtf/RefCounted.h> >@@ -47,7 +47,7 @@ > > namespace WebCore { > >-bool V8MutationCallback::handleEvent(MutationRecordArray* mutations, WebKitMutationObserver* observer) >+bool V8MutationCallback::handleEvent(MutationRecordArray* mutations, MutationObserver* observer) > { > ASSERT(mutations); > if (!mutations) >diff --git a/Source/WebCore/bindings/v8/custom/V8MutationObserverCustom.cpp b/Source/WebCore/bindings/v8/custom/V8MutationObserverCustom.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..4ba59d5d8d09dbebb86fc38c7f03b18b74562cb9 >--- /dev/null >+++ b/Source/WebCore/bindings/v8/custom/V8MutationObserverCustom.cpp >@@ -0,0 +1,121 @@ >+/* >+ * Copyright (C) 2011 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions are >+ * met: >+ * >+ * * Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * * Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following disclaimer >+ * in the documentation and/or other materials provided with the >+ * distribution. >+ * * Neither the name of Google Inc. nor the names of its >+ * contributors may be used to endorse or promote products derived from >+ * this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+ >+#if ENABLE(MUTATION_OBSERVERS) >+ >+#include "V8MutationObserver.h" >+ >+#include "Dictionary.h" >+#include "ExceptionCode.h" >+#include "MutationObserver.h" >+#include "V8Binding.h" >+#include "V8BindingMacros.h" >+#include "V8DOMWrapper.h" >+#include "V8MutationCallback.h" >+#include "V8Node.h" >+#include "V8Proxy.h" >+#include "V8Utilities.h" >+ >+#include <wtf/HashSet.h> >+#include <wtf/text/AtomicString.h> >+ >+namespace WebCore { >+ >+v8::Handle<v8::Value> V8MutationObserver::constructorCallback(const v8::Arguments& args) >+{ >+ INC_STATS("DOM.MutationObserver.Constructor"); >+ >+ if (!args.IsConstructCall()) >+ return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate()); >+ >+ if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) >+ return args.Holder(); >+ >+ if (args.Length() < 1) >+ return V8Proxy::throwNotEnoughArgumentsError(args.GetIsolate()); >+ >+ v8::Local<v8::Value> arg = args[0]; >+ if (!arg->IsObject()) >+ return throwError(TYPE_MISMATCH_ERR, args.GetIsolate()); >+ >+ ScriptExecutionContext* context = getScriptExecutionContext(); >+ if (!context) >+ return V8Proxy::throwError(V8Proxy::ReferenceError, "MutationObserver constructor's associated frame unavailable", args.GetIsolate()); >+ >+ RefPtr<MutationCallback> callback = V8MutationCallback::create(arg, context); >+ RefPtr<MutationObserver> observer = MutationObserver::create(callback.release()); >+ >+ V8DOMWrapper::setDOMWrapper(args.Holder(), &info, observer.get()); >+ V8DOMWrapper::setJSWrapperForDOMObject(observer.release(), v8::Persistent<v8::Object>::New(args.Holder())); >+ return args.Holder(); >+} >+ >+v8::Handle<v8::Value> V8MutationObserver::observeCallback(const v8::Arguments& args) >+{ >+ INC_STATS("DOM.MutationObserver.observe"); >+ if (args.Length() < 2) >+ return V8Proxy::throwNotEnoughArgumentsError(args.GetIsolate()); >+ MutationObserver* imp = V8MutationObserver::toNative(args.Holder()); >+ EXCEPTION_BLOCK(Node*, target, V8Node::HasInstance(args[0]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0); >+ >+ if (!args[1]->IsObject()) >+ return throwError(TYPE_MISMATCH_ERR, args.GetIsolate()); >+ >+ Dictionary optionsObject(args[1]); >+ unsigned options = 0; >+ HashSet<AtomicString> attributeFilter; >+ bool option; >+ if (optionsObject.get("childList", option) && option) >+ options |= MutationObserver::ChildList; >+ if (optionsObject.get("attributes", option) && option) >+ options |= MutationObserver::Attributes; >+ if (optionsObject.get("attributeFilter", attributeFilter)) >+ options |= MutationObserver::AttributeFilter; >+ if (optionsObject.get("characterData", option) && option) >+ options |= MutationObserver::CharacterData; >+ if (optionsObject.get("subtree", option) && option) >+ options |= MutationObserver::Subtree; >+ if (optionsObject.get("attributeOldValue", option) && option) >+ options |= MutationObserver::AttributeOldValue; >+ if (optionsObject.get("characterDataOldValue", option) && option) >+ options |= MutationObserver::CharacterDataOldValue; >+ >+ ExceptionCode ec = 0; >+ imp->observe(target, options, attributeFilter, ec); >+ if (ec) >+ return V8Proxy::setDOMException(ec, args.GetIsolate()); >+ return v8::Handle<v8::Value>(); >+} >+ >+} // namespace WebCore >+ >+#endif // ENABLE(MUTATION_OBSERVERS) >diff --git a/Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp b/Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp >deleted file mode 100644 >index b4ef5f2ecd21796404c9c3424b24f5de63909440..0000000000000000000000000000000000000000 >--- a/Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp >+++ /dev/null >@@ -1,121 +0,0 @@ >-/* >- * Copyright (C) 2011 Google Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions are >- * met: >- * >- * * Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * * Redistributions in binary form must reproduce the above >- * copyright notice, this list of conditions and the following disclaimer >- * in the documentation and/or other materials provided with the >- * distribution. >- * * Neither the name of Google Inc. nor the names of its >- * contributors may be used to endorse or promote products derived from >- * this software without specific prior written permission. >- * >- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >- >-#if ENABLE(MUTATION_OBSERVERS) >- >-#include "V8WebKitMutationObserver.h" >- >-#include "Dictionary.h" >-#include "ExceptionCode.h" >-#include "V8Binding.h" >-#include "V8BindingMacros.h" >-#include "V8DOMWrapper.h" >-#include "V8MutationCallback.h" >-#include "V8Node.h" >-#include "V8Proxy.h" >-#include "V8Utilities.h" >-#include "WebKitMutationObserver.h" >- >-#include <wtf/HashSet.h> >-#include <wtf/text/AtomicString.h> >- >-namespace WebCore { >- >-v8::Handle<v8::Value> V8WebKitMutationObserver::constructorCallback(const v8::Arguments& args) >-{ >- INC_STATS("DOM.WebKitMutationObserver.Constructor"); >- >- if (!args.IsConstructCall()) >- return V8Proxy::throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate()); >- >- if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) >- return args.Holder(); >- >- if (args.Length() < 1) >- return V8Proxy::throwNotEnoughArgumentsError(args.GetIsolate()); >- >- v8::Local<v8::Value> arg = args[0]; >- if (!arg->IsObject()) >- return throwError(TYPE_MISMATCH_ERR, args.GetIsolate()); >- >- ScriptExecutionContext* context = getScriptExecutionContext(); >- if (!context) >- return V8Proxy::throwError(V8Proxy::ReferenceError, "WebKitMutationObserver constructor's associated frame unavailable", args.GetIsolate()); >- >- RefPtr<MutationCallback> callback = V8MutationCallback::create(arg, context); >- RefPtr<WebKitMutationObserver> observer = WebKitMutationObserver::create(callback.release()); >- >- V8DOMWrapper::setDOMWrapper(args.Holder(), &info, observer.get()); >- V8DOMWrapper::setJSWrapperForDOMObject(observer.release(), v8::Persistent<v8::Object>::New(args.Holder())); >- return args.Holder(); >-} >- >-v8::Handle<v8::Value> V8WebKitMutationObserver::observeCallback(const v8::Arguments& args) >-{ >- INC_STATS("DOM.WebKitMutationObserver.observe"); >- if (args.Length() < 2) >- return V8Proxy::throwNotEnoughArgumentsError(args.GetIsolate()); >- WebKitMutationObserver* imp = V8WebKitMutationObserver::toNative(args.Holder()); >- EXCEPTION_BLOCK(Node*, target, V8Node::HasInstance(args[0]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0); >- >- if (!args[1]->IsObject()) >- return throwError(TYPE_MISMATCH_ERR, args.GetIsolate()); >- >- Dictionary optionsObject(args[1]); >- unsigned options = 0; >- HashSet<AtomicString> attributeFilter; >- bool option; >- if (optionsObject.get("childList", option) && option) >- options |= WebKitMutationObserver::ChildList; >- if (optionsObject.get("attributes", option) && option) >- options |= WebKitMutationObserver::Attributes; >- if (optionsObject.get("attributeFilter", attributeFilter)) >- options |= WebKitMutationObserver::AttributeFilter; >- if (optionsObject.get("characterData", option) && option) >- options |= WebKitMutationObserver::CharacterData; >- if (optionsObject.get("subtree", option) && option) >- options |= WebKitMutationObserver::Subtree; >- if (optionsObject.get("attributeOldValue", option) && option) >- options |= WebKitMutationObserver::AttributeOldValue; >- if (optionsObject.get("characterDataOldValue", option) && option) >- options |= WebKitMutationObserver::CharacterDataOldValue; >- >- ExceptionCode ec = 0; >- imp->observe(target, options, attributeFilter, ec); >- if (ec) >- return V8Proxy::setDOMException(ec, args.GetIsolate()); >- return v8::Handle<v8::Value>(); >-} >- >-} // namespace WebCore >- >-#endif // ENABLE(MUTATION_OBSERVERS) >diff --git a/Source/WebCore/dom/CharacterData.cpp b/Source/WebCore/dom/CharacterData.cpp >index 76198fbe5d8016f190ec8375b0058913cb3d7d79..3394038513dae991724559b813e3cddbdc3c3f8c 100644 >--- a/Source/WebCore/dom/CharacterData.cpp >+++ b/Source/WebCore/dom/CharacterData.cpp >@@ -32,7 +32,6 @@ > #include "NodeRenderingContext.h" > #include "RenderText.h" > #include "TextBreakIterator.h" >-#include "WebKitMutationObserver.h" > > using namespace std; > >diff --git a/Source/WebCore/dom/ChildListMutationScope.h b/Source/WebCore/dom/ChildListMutationScope.h >index 6dd523640b61f06f3a53ba575b5caed9237c405f..bce26751c0f4862d0c4a5390fcc5c3faed4c5002 100644 >--- a/Source/WebCore/dom/ChildListMutationScope.h >+++ b/Source/WebCore/dom/ChildListMutationScope.h >@@ -34,8 +34,8 @@ > #if ENABLE(MUTATION_OBSERVERS) > > #include "Document.h" >+#include "MutationObserver.h" > #include "Node.h" >-#include "WebKitMutationObserver.h" > #include <wtf/HashMap.h> > #include <wtf/Noncopyable.h> > #include <wtf/OwnPtr.h> >@@ -46,7 +46,7 @@ class ChildListMutationScope { > WTF_MAKE_NONCOPYABLE(ChildListMutationScope); > public: > ChildListMutationScope(Node* target) >- : m_target(target->document()->hasMutationObserversOfType(WebKitMutationObserver::ChildList) ? target : 0) >+ : m_target(target->document()->hasMutationObserversOfType(MutationObserver::ChildList) ? target : 0) > { > if (m_target) > MutationAccumulationRouter::instance()->incrementScopingLevel(m_target); >diff --git a/Source/WebCore/dom/DOMAllInOne.cpp b/Source/WebCore/dom/DOMAllInOne.cpp >index 148fc3ec982c98f6fbd249bcbbce5193bc3b79de..45df0eef982280397482f6e5ca6a7ffb36f4e254 100644 >--- a/Source/WebCore/dom/DOMAllInOne.cpp >+++ b/Source/WebCore/dom/DOMAllInOne.cpp >@@ -92,6 +92,7 @@ > #include "MouseEvent.cpp" > #include "MouseRelatedEvent.cpp" > #include "MutationEvent.cpp" >+#include "MutationObserver.cpp" > #include "MutationObserverInterestGroup.cpp" > #include "MutationObserverRegistration.cpp" > #include "MutationRecord.cpp" >@@ -142,7 +143,6 @@ > #include "UserTypingGestureIndicator.cpp" > #include "ViewportArguments.cpp" > #include "WebKitAnimationEvent.cpp" >-#include "WebKitMutationObserver.cpp" > #include "WebKitNamedFlow.cpp" > #include "WebKitTransitionEvent.cpp" > #include "WheelEvent.cpp" >diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h >index 93e30412eeffe3b6dce90366d541403a279b42a0..624898935037948f26676eba13dd21171d592872 100644 >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -38,6 +38,7 @@ > #include "InspectorCounters.h" > #include "IntRect.h" > #include "LayoutTypes.h" >+#include "MutationObserver.h" > #include "PageVisibilityState.h" > #include "PlatformScreen.h" > #include "QualifiedName.h" >@@ -47,7 +48,6 @@ > #include "Timer.h" > #include "TreeScope.h" > #include "ViewportArguments.h" >-#include "WebKitMutationObserver.h" > #include <wtf/Deque.h> > #include <wtf/FixedArray.h> > #include <wtf/OwnPtr.h> >@@ -770,7 +770,7 @@ public: > void addListenerTypeIfNeeded(const AtomicString& eventType); > > #if ENABLE(MUTATION_OBSERVERS) >- bool hasMutationObserversOfType(WebKitMutationObserver::MutationType type) const >+ bool hasMutationObserversOfType(MutationObserver::MutationType type) const > { > return m_mutationObserverTypes & type; > } >diff --git a/Source/WebCore/dom/Element.cpp b/Source/WebCore/dom/Element.cpp >index 005264ced052af69df528db65aa8c60c75d71f4d..a0e1bd88e0f733a594ce9211289b0d1ba76822ac 100644 >--- a/Source/WebCore/dom/Element.cpp >+++ b/Source/WebCore/dom/Element.cpp >@@ -66,7 +66,6 @@ > #include "StyleResolver.h" > #include "Text.h" > #include "TextIterator.h" >-#include "WebKitMutationObserver.h" > #include "WebKitAnimationList.h" > #include "XMLNSNames.h" > #include "XMLNames.h" >diff --git a/Source/WebCore/dom/MutationCallback.h b/Source/WebCore/dom/MutationCallback.h >index 80739c88ad78b1315992d8f666d90b240ae7ead9..119197abe34b1da904d422bbf8e0f1f77e776df2 100644 >--- a/Source/WebCore/dom/MutationCallback.h >+++ b/Source/WebCore/dom/MutationCallback.h >@@ -40,7 +40,7 @@ > namespace WebCore { > > class MutationRecord; >-class WebKitMutationObserver; >+class MutationObserver; > > typedef Vector<RefPtr<MutationRecord> > MutationRecordArray; > >@@ -48,7 +48,7 @@ class MutationCallback : public RefCounted<MutationCallback> { > public: > virtual ~MutationCallback() { } > >- virtual bool handleEvent(MutationRecordArray*, WebKitMutationObserver*) = 0; >+ virtual bool handleEvent(MutationRecordArray*, MutationObserver*) = 0; > }; > > } >diff --git a/Source/WebCore/dom/MutationCallback.idl b/Source/WebCore/dom/MutationCallback.idl >index 16381714c809ea7ca4784c6b3b0311b8979f8175..2aecd9be9e41de4f32e46f9d05b0ebf2ce4850e6 100644 >--- a/Source/WebCore/dom/MutationCallback.idl >+++ b/Source/WebCore/dom/MutationCallback.idl >@@ -33,6 +33,6 @@ module core { > Conditional=MUTATION_OBSERVERS, > Callback > ] MutationCallback { >- [Custom] boolean handleEvent(in MutationRecordArray mutations, in WebKitMutationObserver observer); >+ [Custom] boolean handleEvent(in MutationRecordArray mutations, in MutationObserver observer); > }; > } >diff --git a/Source/WebCore/dom/MutationObserver.cpp b/Source/WebCore/dom/MutationObserver.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..13a758dfe11f5b120a78916032f50210052c137d >--- /dev/null >+++ b/Source/WebCore/dom/MutationObserver.cpp >@@ -0,0 +1,194 @@ >+/* >+ * Copyright (C) 2011 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions are >+ * met: >+ * >+ * * Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * * Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following disclaimer >+ * in the documentation and/or other materials provided with the >+ * distribution. >+ * * Neither the name of Google Inc. nor the names of its >+ * contributors may be used to endorse or promote products derived from >+ * this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+ >+#if ENABLE(MUTATION_OBSERVERS) >+ >+#include "MutationObserver.h" >+ >+#include "Document.h" >+#include "ExceptionCode.h" >+#include "MutationCallback.h" >+#include "MutationObserverRegistration.h" >+#include "MutationRecord.h" >+#include "Node.h" >+#include <algorithm> >+#include <wtf/HashSet.h> >+#include <wtf/MainThread.h> >+#include <wtf/Vector.h> >+ >+namespace WebCore { >+ >+static unsigned s_observerPriority = 0; >+ >+struct MutationObserver::ObserverLessThan { >+ bool operator()(const RefPtr<MutationObserver>& lhs, const RefPtr<MutationObserver>& rhs) >+ { >+ return lhs->m_priority < rhs->m_priority; >+ } >+}; >+ >+PassRefPtr<MutationObserver> MutationObserver::create(PassRefPtr<MutationCallback> callback) >+{ >+ ASSERT(isMainThread()); >+ return adoptRef(new MutationObserver(callback)); >+} >+ >+MutationObserver::MutationObserver(PassRefPtr<MutationCallback> callback) >+ : m_callback(callback) >+ , m_priority(s_observerPriority++) >+{ >+} >+ >+MutationObserver::~MutationObserver() >+{ >+ ASSERT(m_registrations.isEmpty()); >+} >+ >+bool MutationObserver::validateOptions(MutationObserverOptions options) >+{ >+ return (options & (Attributes | CharacterData | ChildList)) >+ && ((options & Attributes) || !(options & AttributeOldValue)) >+ && ((options & Attributes) || !(options & AttributeFilter)) >+ && ((options & CharacterData) || !(options & CharacterDataOldValue)); >+} >+ >+void MutationObserver::observe(Node* node, MutationObserverOptions options, const HashSet<AtomicString>& attributeFilter, ExceptionCode& ec) >+{ >+ if (!node) { >+ ec = NOT_FOUND_ERR; >+ return; >+ } >+ >+ if (!validateOptions(options)) { >+ // FIXME: Revisit this once the spec specifies the exception type; SYNTAX_ERR may not be appropriate. >+ ec = SYNTAX_ERR; >+ return; >+ } >+ >+ MutationObserverRegistration* registration = node->registerMutationObserver(this); >+ registration->resetObservation(options, attributeFilter); >+ >+ node->document()->addMutationObserverTypes(registration->mutationTypes()); >+} >+ >+Vector<RefPtr<MutationRecord> > MutationObserver::takeRecords() >+{ >+ Vector<RefPtr<MutationRecord> > records; >+ records.swap(m_records); >+ return records; >+} >+ >+void MutationObserver::disconnect() >+{ >+ m_records.clear(); >+ HashSet<MutationObserverRegistration*> registrations(m_registrations); >+ for (HashSet<MutationObserverRegistration*>::iterator iter = registrations.begin(); iter != registrations.end(); ++iter) >+ (*iter)->unregister(); >+} >+ >+void MutationObserver::observationStarted(MutationObserverRegistration* registration) >+{ >+ ASSERT(!m_registrations.contains(registration)); >+ m_registrations.add(registration); >+} >+ >+void MutationObserver::observationEnded(MutationObserverRegistration* registration) >+{ >+ ASSERT(m_registrations.contains(registration)); >+ m_registrations.remove(registration); >+} >+ >+typedef HashSet<RefPtr<MutationObserver> > MutationObserverSet; >+ >+static MutationObserverSet& activeMutationObservers() >+{ >+ DEFINE_STATIC_LOCAL(MutationObserverSet, activeObservers, ()); >+ return activeObservers; >+} >+ >+void MutationObserver::enqueueMutationRecord(PassRefPtr<MutationRecord> mutation) >+{ >+ ASSERT(isMainThread()); >+ m_records.append(mutation); >+ activeMutationObservers().add(this); >+} >+ >+void MutationObserver::setHasTransientRegistration() >+{ >+ ASSERT(isMainThread()); >+ activeMutationObservers().add(this); >+} >+ >+void MutationObserver::deliver() >+{ >+ // Calling clearTransientRegistrations() can modify m_registrations, so it's necessary >+ // to make a copy of the transient registrations before operating on them. >+ Vector<MutationObserverRegistration*, 1> transientRegistrations; >+ for (HashSet<MutationObserverRegistration*>::iterator iter = m_registrations.begin(); iter != m_registrations.end(); ++iter) { >+ if ((*iter)->hasTransientRegistrations()) >+ transientRegistrations.append(*iter); >+ } >+ for (size_t i = 0; i < transientRegistrations.size(); ++i) >+ transientRegistrations[i]->clearTransientRegistrations(); >+ >+ if (m_records.isEmpty()) >+ return; >+ >+ Vector<RefPtr<MutationRecord> > records; >+ records.swap(m_records); >+ >+ m_callback->handleEvent(&records, this); >+} >+ >+void MutationObserver::deliverAllMutations() >+{ >+ ASSERT(isMainThread()); >+ static bool deliveryInProgress = false; >+ if (deliveryInProgress) >+ return; >+ deliveryInProgress = true; >+ >+ while (!activeMutationObservers().isEmpty()) { >+ Vector<RefPtr<MutationObserver> > observers; >+ copyToVector(activeMutationObservers(), observers); >+ activeMutationObservers().clear(); >+ std::sort(observers.begin(), observers.end(), ObserverLessThan()); >+ for (size_t i = 0; i < observers.size(); ++i) >+ observers[i]->deliver(); >+ } >+ >+ deliveryInProgress = false; >+} >+ >+} // namespace WebCore >+ >+#endif // ENABLE(MUTATION_OBSERVERS) >diff --git a/Source/WebCore/dom/MutationObserver.h b/Source/WebCore/dom/MutationObserver.h >new file mode 100644 >index 0000000000000000000000000000000000000000..6a665dc098c11a2c3aca1c43994d506506917119 >--- /dev/null >+++ b/Source/WebCore/dom/MutationObserver.h >@@ -0,0 +1,107 @@ >+/* >+ * Copyright (C) 2011 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions are >+ * met: >+ * >+ * * Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * * Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following disclaimer >+ * in the documentation and/or other materials provided with the >+ * distribution. >+ * * Neither the name of Google Inc. nor the names of its >+ * contributors may be used to endorse or promote products derived from >+ * this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef MutationObserver_h >+#define MutationObserver_h >+ >+#if ENABLE(MUTATION_OBSERVERS) >+ >+#include <wtf/HashMap.h> >+#include <wtf/HashSet.h> >+#include <wtf/PassRefPtr.h> >+#include <wtf/RefCounted.h> >+#include <wtf/RefPtr.h> >+#include <wtf/text/AtomicString.h> >+#include <wtf/text/AtomicStringHash.h> >+ >+namespace WebCore { >+ >+class MutationCallback; >+class MutationObserverRegistration; >+class MutationRecord; >+class Node; >+ >+typedef int ExceptionCode; >+ >+typedef unsigned char MutationObserverOptions; >+typedef unsigned char MutationRecordDeliveryOptions; >+ >+class MutationObserver : public RefCounted<MutationObserver> { >+public: >+ enum MutationType { >+ ChildList = 1 << 0, >+ Attributes = 1 << 1, >+ CharacterData = 1 << 2, >+ >+ AllMutationTypes = ChildList | Attributes | CharacterData >+ }; >+ >+ enum ObservationFlags { >+ Subtree = 1 << 3, >+ AttributeFilter = 1 << 4 >+ }; >+ >+ enum DeliveryFlags { >+ AttributeOldValue = 1 << 5, >+ CharacterDataOldValue = 1 << 6, >+ }; >+ >+ static PassRefPtr<MutationObserver> create(PassRefPtr<MutationCallback>); >+ static void deliverAllMutations(); >+ >+ ~MutationObserver(); >+ >+ void observe(Node*, MutationObserverOptions, const HashSet<AtomicString>& attributeFilter, ExceptionCode&); >+ Vector<RefPtr<MutationRecord> > takeRecords(); >+ void disconnect(); >+ void observationStarted(MutationObserverRegistration*); >+ void observationEnded(MutationObserverRegistration*); >+ void enqueueMutationRecord(PassRefPtr<MutationRecord>); >+ void setHasTransientRegistration(); >+ >+private: >+ struct ObserverLessThan; >+ >+ MutationObserver(PassRefPtr<MutationCallback>); >+ void deliver(); >+ >+ static bool validateOptions(MutationObserverOptions); >+ >+ RefPtr<MutationCallback> m_callback; >+ Vector<RefPtr<MutationRecord> > m_records; >+ HashSet<MutationObserverRegistration*> m_registrations; >+ unsigned m_priority; >+}; >+ >+} >+ >+#endif // ENABLE(MUTATION_OBSERVERS) >+ >+#endif // MutationObserver_h >diff --git a/Source/WebCore/dom/MutationObserver.idl b/Source/WebCore/dom/MutationObserver.idl >new file mode 100644 >index 0000000000000000000000000000000000000000..1c6e25cc2f8ee7acf5c64e591f054f89b15ad6e0 >--- /dev/null >+++ b/Source/WebCore/dom/MutationObserver.idl >@@ -0,0 +1,42 @@ >+/* >+ * Copyright (C) 2011 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions are >+ * met: >+ * >+ * * Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * * Redistributions in binary form must reproduce the above >+ * copyright notice, this list of conditions and the following disclaimer >+ * in the documentation and/or other materials provided with the >+ * distribution. >+ * * Neither the name of Google Inc. nor the names of its >+ * contributors may be used to endorse or promote products derived from >+ * this software without specific prior written permission. >+ * >+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+module core { >+ interface [ >+ Conditional=MUTATION_OBSERVERS, >+ CustomConstructor, >+ ConstructorParameters=1 >+ ] MutationObserver { >+ [Custom] void observe(in Node target, in MutationObserverOptions options) >+ raises(DOMException); >+ sequence<MutationRecord> takeRecords(); >+ void disconnect(); >+ }; >+} >diff --git a/Source/WebCore/dom/MutationObserverInterestGroup.cpp b/Source/WebCore/dom/MutationObserverInterestGroup.cpp >index dd0288d51393ce2f070ae740924867ab385bb79c..24c0cb586517e08bc7a8b4093f21d31e0db2d64e 100644 >--- a/Source/WebCore/dom/MutationObserverInterestGroup.cpp >+++ b/Source/WebCore/dom/MutationObserverInterestGroup.cpp >@@ -41,10 +41,10 @@ > > namespace WebCore { > >-PassOwnPtr<MutationObserverInterestGroup> MutationObserverInterestGroup::createIfNeeded(Node* target, WebKitMutationObserver::MutationType type, MutationRecordDeliveryOptions oldValueFlag, const QualifiedName* attributeName) >+PassOwnPtr<MutationObserverInterestGroup> MutationObserverInterestGroup::createIfNeeded(Node* target, MutationObserver::MutationType type, MutationRecordDeliveryOptions oldValueFlag, const QualifiedName* attributeName) > { >- ASSERT((type == WebKitMutationObserver::Attributes && attributeName) || !attributeName); >- HashMap<WebKitMutationObserver*, MutationRecordDeliveryOptions> observers; >+ ASSERT((type == MutationObserver::Attributes && attributeName) || !attributeName); >+ HashMap<MutationObserver*, MutationRecordDeliveryOptions> observers; > target->getRegisteredMutationObserversOfType(observers, type, attributeName); > if (observers.isEmpty()) > return nullptr; >@@ -52,7 +52,7 @@ PassOwnPtr<MutationObserverInterestGroup> MutationObserverInterestGroup::createI > return adoptPtr(new MutationObserverInterestGroup(observers, oldValueFlag)); > } > >-MutationObserverInterestGroup::MutationObserverInterestGroup(HashMap<WebKitMutationObserver*, MutationRecordDeliveryOptions>& observers, MutationRecordDeliveryOptions oldValueFlag) >+MutationObserverInterestGroup::MutationObserverInterestGroup(HashMap<MutationObserver*, MutationRecordDeliveryOptions>& observers, MutationRecordDeliveryOptions oldValueFlag) > : m_oldValueFlag(oldValueFlag) > { > ASSERT(!observers.isEmpty()); >@@ -61,7 +61,7 @@ MutationObserverInterestGroup::MutationObserverInterestGroup(HashMap<WebKitMutat > > bool MutationObserverInterestGroup::isOldValueRequested() > { >- for (HashMap<WebKitMutationObserver*, MutationRecordDeliveryOptions>::iterator iter = m_observers.begin(); iter != m_observers.end(); ++iter) { >+ for (HashMap<MutationObserver*, MutationRecordDeliveryOptions>::iterator iter = m_observers.begin(); iter != m_observers.end(); ++iter) { > if (hasOldValue(iter->second)) > return true; > } >@@ -72,8 +72,8 @@ void MutationObserverInterestGroup::enqueueMutationRecord(PassRefPtr<MutationRec > { > RefPtr<MutationRecord> mutation = prpMutation; > RefPtr<MutationRecord> mutationWithNullOldValue; >- for (HashMap<WebKitMutationObserver*, MutationRecordDeliveryOptions>::iterator iter = m_observers.begin(); iter != m_observers.end(); ++iter) { >- WebKitMutationObserver* observer = iter->first; >+ for (HashMap<MutationObserver*, MutationRecordDeliveryOptions>::iterator iter = m_observers.begin(); iter != m_observers.end(); ++iter) { >+ MutationObserver* observer = iter->first; > if (hasOldValue(iter->second)) { > observer->enqueueMutationRecord(mutation); > continue; >diff --git a/Source/WebCore/dom/MutationObserverInterestGroup.h b/Source/WebCore/dom/MutationObserverInterestGroup.h >index 933334a1b7f957389e5cbedee05c2677b95012db..7fde32eea9289c6a3815f92b50d6087e9fcff1d2 100644 >--- a/Source/WebCore/dom/MutationObserverInterestGroup.h >+++ b/Source/WebCore/dom/MutationObserverInterestGroup.h >@@ -34,9 +34,9 @@ > #if ENABLE(MUTATION_OBSERVERS) > > #include "Document.h" >+#include "MutationObserver.h" > #include "Node.h" > #include "QualifiedName.h" >-#include "WebKitMutationObserver.h" > #include <wtf/HashMap.h> > #include <wtf/PassOwnPtr.h> > >@@ -46,39 +46,39 @@ class MutationObserverInterestGroup { > public: > static PassOwnPtr<MutationObserverInterestGroup> createForChildListMutation(Node* target) > { >- if (!target->document()->hasMutationObserversOfType(WebKitMutationObserver::ChildList)) >+ if (!target->document()->hasMutationObserversOfType(MutationObserver::ChildList)) > return nullptr; > > MutationRecordDeliveryOptions oldValueFlag = 0; >- return createIfNeeded(target, WebKitMutationObserver::ChildList, oldValueFlag); >+ return createIfNeeded(target, MutationObserver::ChildList, oldValueFlag); > } > > static PassOwnPtr<MutationObserverInterestGroup> createForCharacterDataMutation(Node* target) > { >- if (!target->document()->hasMutationObserversOfType(WebKitMutationObserver::CharacterData)) >+ if (!target->document()->hasMutationObserversOfType(MutationObserver::CharacterData)) > return nullptr; > >- return createIfNeeded(target, WebKitMutationObserver::CharacterData, WebKitMutationObserver::CharacterDataOldValue); >+ return createIfNeeded(target, MutationObserver::CharacterData, MutationObserver::CharacterDataOldValue); > } > > static PassOwnPtr<MutationObserverInterestGroup> createForAttributesMutation(Node* target, const QualifiedName& attributeName) > { >- if (!target->document()->hasMutationObserversOfType(WebKitMutationObserver::Attributes)) >+ if (!target->document()->hasMutationObserversOfType(MutationObserver::Attributes)) > return nullptr; > >- return createIfNeeded(target, WebKitMutationObserver::Attributes, WebKitMutationObserver::AttributeOldValue, &attributeName); >+ return createIfNeeded(target, MutationObserver::Attributes, MutationObserver::AttributeOldValue, &attributeName); > } > > bool isOldValueRequested(); > void enqueueMutationRecord(PassRefPtr<MutationRecord>); > > private: >- static PassOwnPtr<MutationObserverInterestGroup> createIfNeeded(Node* target, WebKitMutationObserver::MutationType, MutationRecordDeliveryOptions oldValueFlag, const QualifiedName* attributeName = 0); >- MutationObserverInterestGroup(HashMap<WebKitMutationObserver*, MutationRecordDeliveryOptions>& observers, MutationRecordDeliveryOptions oldValueFlag); >+ static PassOwnPtr<MutationObserverInterestGroup> createIfNeeded(Node* target, MutationObserver::MutationType, MutationRecordDeliveryOptions oldValueFlag, const QualifiedName* attributeName = 0); >+ MutationObserverInterestGroup(HashMap<MutationObserver*, MutationRecordDeliveryOptions>& observers, MutationRecordDeliveryOptions oldValueFlag); > > bool hasOldValue(MutationRecordDeliveryOptions options) { return options & m_oldValueFlag; } > >- HashMap<WebKitMutationObserver*, MutationRecordDeliveryOptions> m_observers; >+ HashMap<MutationObserver*, MutationRecordDeliveryOptions> m_observers; > MutationRecordDeliveryOptions m_oldValueFlag; > }; > >diff --git a/Source/WebCore/dom/MutationObserverRegistration.cpp b/Source/WebCore/dom/MutationObserverRegistration.cpp >index 190b85bd8553adae4a0f6ce0f3a968fc6c926c97..5895ef49feaa6ac633c2d94c968329b95a9e3436 100644 >--- a/Source/WebCore/dom/MutationObserverRegistration.cpp >+++ b/Source/WebCore/dom/MutationObserverRegistration.cpp >@@ -40,12 +40,12 @@ > > namespace WebCore { > >-PassOwnPtr<MutationObserverRegistration> MutationObserverRegistration::create(PassRefPtr<WebKitMutationObserver> observer, Node* registrationNode) >+PassOwnPtr<MutationObserverRegistration> MutationObserverRegistration::create(PassRefPtr<MutationObserver> observer, Node* registrationNode) > { > return adoptPtr(new MutationObserverRegistration(observer, registrationNode)); > } > >-MutationObserverRegistration::MutationObserverRegistration(PassRefPtr<WebKitMutationObserver> observer, Node* registrationNode) >+MutationObserverRegistration::MutationObserverRegistration(PassRefPtr<MutationObserver> observer, Node* registrationNode) > : m_observer(observer) > , m_registrationNode(registrationNode) > , m_options(0) >@@ -105,16 +105,16 @@ void MutationObserverRegistration::unregister() > // The above line will cause this object to be deleted, so don't do any more in this function. > } > >-bool MutationObserverRegistration::shouldReceiveMutationFrom(Node* node, WebKitMutationObserver::MutationType type, const QualifiedName* attributeName) >+bool MutationObserverRegistration::shouldReceiveMutationFrom(Node* node, MutationObserver::MutationType type, const QualifiedName* attributeName) > { >- ASSERT((type == WebKitMutationObserver::Attributes && attributeName) || !attributeName); >+ ASSERT((type == MutationObserver::Attributes && attributeName) || !attributeName); > if (!(m_options & type)) > return false; > > if (m_registrationNode != node && !isSubtree()) > return false; > >- if (type != WebKitMutationObserver::Attributes || !(m_options & WebKitMutationObserver::AttributeFilter)) >+ if (type != MutationObserver::Attributes || !(m_options & MutationObserver::AttributeFilter)) > return true; > > if (!attributeName->namespaceURI().isNull()) >diff --git a/Source/WebCore/dom/MutationObserverRegistration.h b/Source/WebCore/dom/MutationObserverRegistration.h >index 232ee25d5ac8ef65545a94364082645af5385b73..d4914625a9dfed666df4b78a921a578e3c77755f 100644 >--- a/Source/WebCore/dom/MutationObserverRegistration.h >+++ b/Source/WebCore/dom/MutationObserverRegistration.h >@@ -33,7 +33,7 @@ > > #if ENABLE(MUTATION_OBSERVERS) > >-#include "WebKitMutationObserver.h" >+#include "MutationObserver.h" > #include <wtf/HashSet.h> > #include <wtf/text/AtomicString.h> > #include <wtf/text/AtomicStringHash.h> >@@ -45,7 +45,7 @@ class QualifiedName; > class MutationObserverRegistration { > public: > >- static PassOwnPtr<MutationObserverRegistration> create(PassRefPtr<WebKitMutationObserver>, Node*); >+ static PassOwnPtr<MutationObserverRegistration> create(PassRefPtr<MutationObserver>, Node*); > > ~MutationObserverRegistration(); > >@@ -55,19 +55,19 @@ public: > bool hasTransientRegistrations() { return m_transientRegistrationNodes && !m_transientRegistrationNodes->isEmpty(); } > void unregister(); > >- bool shouldReceiveMutationFrom(Node*, WebKitMutationObserver::MutationType, const QualifiedName* attributeName); >- bool inline isSubtree() const { return m_options & WebKitMutationObserver::Subtree; } >+ bool shouldReceiveMutationFrom(Node*, MutationObserver::MutationType, const QualifiedName* attributeName); >+ bool inline isSubtree() const { return m_options & MutationObserver::Subtree; } > >- WebKitMutationObserver* observer() { return m_observer.get(); } >- MutationRecordDeliveryOptions deliveryOptions() const { return m_options & (WebKitMutationObserver::AttributeOldValue | WebKitMutationObserver::CharacterDataOldValue); } >- MutationObserverOptions mutationTypes() const { return m_options & WebKitMutationObserver::AllMutationTypes; } >+ MutationObserver* observer() { return m_observer.get(); } >+ MutationRecordDeliveryOptions deliveryOptions() const { return m_options & (MutationObserver::AttributeOldValue | MutationObserver::CharacterDataOldValue); } >+ MutationObserverOptions mutationTypes() const { return m_options & MutationObserver::AllMutationTypes; } > > private: >- MutationObserverRegistration(PassRefPtr<WebKitMutationObserver>, Node*); >+ MutationObserverRegistration(PassRefPtr<MutationObserver>, Node*); > > const HashSet<AtomicString>& caseInsensitiveAttributeFilter(); > >- RefPtr<WebKitMutationObserver> m_observer; >+ RefPtr<MutationObserver> m_observer; > Node* m_registrationNode; > RefPtr<Node> m_registrationNodeKeepAlive; > typedef HashSet<RefPtr<Node> > NodeHashSet; >diff --git a/Source/WebCore/dom/Node.cpp b/Source/WebCore/dom/Node.cpp >index f35dc5b99038ba03448bc46a8a80045bebc6cc16..dbe07fb9fd9a010860c092a76384bb1349855ca5 100644 >--- a/Source/WebCore/dom/Node.cpp >+++ b/Source/WebCore/dom/Node.cpp >@@ -2510,16 +2510,16 @@ HashSet<MutationObserverRegistration*>* Node::transientMutationObserverRegistry( > return hasRareData() ? rareData()->transientMutationObserverRegistry() : 0; > } > >-void Node::collectMatchingObserversForMutation(HashMap<WebKitMutationObserver*, MutationRecordDeliveryOptions>& observers, Node* fromNode, WebKitMutationObserver::MutationType type, const QualifiedName* attributeName) >+void Node::collectMatchingObserversForMutation(HashMap<MutationObserver*, MutationRecordDeliveryOptions>& observers, Node* fromNode, MutationObserver::MutationType type, const QualifiedName* attributeName) > { >- ASSERT((type == WebKitMutationObserver::Attributes && attributeName) || !attributeName); >+ ASSERT((type == MutationObserver::Attributes && attributeName) || !attributeName); > if (Vector<OwnPtr<MutationObserverRegistration> >* registry = fromNode->mutationObserverRegistry()) { > const size_t size = registry->size(); > for (size_t i = 0; i < size; ++i) { > MutationObserverRegistration* registration = registry->at(i).get(); > if (registration->shouldReceiveMutationFrom(this, type, attributeName)) { > MutationRecordDeliveryOptions deliveryOptions = registration->deliveryOptions(); >- HashMap<WebKitMutationObserver*, MutationRecordDeliveryOptions>::AddResult result = observers.add(registration->observer(), deliveryOptions); >+ HashMap<MutationObserver*, MutationRecordDeliveryOptions>::AddResult result = observers.add(registration->observer(), deliveryOptions); > if (!result.isNewEntry) > result.iterator->second |= deliveryOptions; > >@@ -2532,7 +2532,7 @@ void Node::collectMatchingObserversForMutation(HashMap<WebKitMutationObserver*, > MutationObserverRegistration* registration = *iter; > if (registration->shouldReceiveMutationFrom(this, type, attributeName)) { > MutationRecordDeliveryOptions deliveryOptions = registration->deliveryOptions(); >- HashMap<WebKitMutationObserver*, MutationRecordDeliveryOptions>::AddResult result = observers.add(registration->observer(), deliveryOptions); >+ HashMap<MutationObserver*, MutationRecordDeliveryOptions>::AddResult result = observers.add(registration->observer(), deliveryOptions); > if (!result.isNewEntry) > result.iterator->second |= deliveryOptions; > } >@@ -2540,15 +2540,15 @@ void Node::collectMatchingObserversForMutation(HashMap<WebKitMutationObserver*, > } > } > >-void Node::getRegisteredMutationObserversOfType(HashMap<WebKitMutationObserver*, MutationRecordDeliveryOptions>& observers, WebKitMutationObserver::MutationType type, const QualifiedName* attributeName) >+void Node::getRegisteredMutationObserversOfType(HashMap<MutationObserver*, MutationRecordDeliveryOptions>& observers, MutationObserver::MutationType type, const QualifiedName* attributeName) > { >- ASSERT((type == WebKitMutationObserver::Attributes && attributeName) || !attributeName); >+ ASSERT((type == MutationObserver::Attributes && attributeName) || !attributeName); > collectMatchingObserversForMutation(observers, this, type, attributeName); > for (Node* node = parentNode(); node; node = node->parentNode()) > collectMatchingObserversForMutation(observers, node, type, attributeName); > } > >-MutationObserverRegistration* Node::registerMutationObserver(PassRefPtr<WebKitMutationObserver> observer) >+MutationObserverRegistration* Node::registerMutationObserver(PassRefPtr<MutationObserver> observer) > { > Vector<OwnPtr<MutationObserverRegistration> >* registry = ensureRareData()->ensureMutationObserverRegistry(); > for (size_t i = 0; i < registry->size(); ++i) { >diff --git a/Source/WebCore/dom/Node.h b/Source/WebCore/dom/Node.h >index 265912d0187a70e841f54e706c50705dc0f67485..15a151b0c4bdae080bb0b946b1f015816b95ef95 100644 >--- a/Source/WebCore/dom/Node.h >+++ b/Source/WebCore/dom/Node.h >@@ -29,10 +29,10 @@ > #include "EventTarget.h" > #include "KURLHash.h" > #include "LayoutTypes.h" >+#include "MutationObserver.h" > #include "RenderStyleConstants.h" > #include "ScriptWrappable.h" > #include "TreeShared.h" >-#include "WebKitMutationObserver.h" > #include <wtf/Forward.h> > #include <wtf/ListHashSet.h> > #include <wtf/text/AtomicString.h> >@@ -641,8 +641,8 @@ public: > #endif > > #if ENABLE(MUTATION_OBSERVERS) >- void getRegisteredMutationObserversOfType(HashMap<WebKitMutationObserver*, MutationRecordDeliveryOptions>&, WebKitMutationObserver::MutationType, const QualifiedName* attributeName); >- MutationObserverRegistration* registerMutationObserver(PassRefPtr<WebKitMutationObserver>); >+ void getRegisteredMutationObserversOfType(HashMap<MutationObserver*, MutationRecordDeliveryOptions>&, MutationObserver::MutationType, const QualifiedName* attributeName); >+ MutationObserverRegistration* registerMutationObserver(PassRefPtr<MutationObserver>); > void unregisterMutationObserver(MutationObserverRegistration*); > void registerTransientMutationObserver(MutationObserverRegistration*); > void unregisterTransientMutationObserver(MutationObserverRegistration*); >@@ -786,7 +786,7 @@ private: > #if ENABLE(MUTATION_OBSERVERS) > Vector<OwnPtr<MutationObserverRegistration> >* mutationObserverRegistry(); > HashSet<MutationObserverRegistration*>* transientMutationObserverRegistry(); >- void collectMatchingObserversForMutation(HashMap<WebKitMutationObserver*, MutationRecordDeliveryOptions>&, Node* fromNode, WebKitMutationObserver::MutationType, const QualifiedName* attributeName); >+ void collectMatchingObserversForMutation(HashMap<MutationObserver*, MutationRecordDeliveryOptions>&, Node* fromNode, MutationObserver::MutationType, const QualifiedName* attributeName); > #endif > > mutable uint32_t m_nodeFlags; >diff --git a/Source/WebCore/dom/NodeRareData.h b/Source/WebCore/dom/NodeRareData.h >index 4740d207eb2c40d1bc4482f1d13fe8e8da85e523..b0a70ffbcdc2d80e6b9aed9617f2bb696ff82a50 100644 >--- a/Source/WebCore/dom/NodeRareData.h >+++ b/Source/WebCore/dom/NodeRareData.h >@@ -26,11 +26,11 @@ > #include "ClassNodeList.h" > #include "DOMSettableTokenList.h" > #include "DynamicNodeList.h" >+#include "MutationObserver.h" > #include "MutationObserverRegistration.h" > #include "NameNodeList.h" > #include "QualifiedName.h" > #include "TagNodeList.h" >-#include "WebKitMutationObserver.h" > #include <wtf/HashSet.h> > #include <wtf/OwnPtr.h> > #include <wtf/PassOwnPtr.h> >diff --git a/Source/WebCore/dom/WebKitMutationObserver.cpp b/Source/WebCore/dom/WebKitMutationObserver.cpp >deleted file mode 100644 >index 8025b6e2a6be2ce1045a4f2068113d58e53f7af8..0000000000000000000000000000000000000000 >--- a/Source/WebCore/dom/WebKitMutationObserver.cpp >+++ /dev/null >@@ -1,194 +0,0 @@ >-/* >- * Copyright (C) 2011 Google Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions are >- * met: >- * >- * * Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * * Redistributions in binary form must reproduce the above >- * copyright notice, this list of conditions and the following disclaimer >- * in the documentation and/or other materials provided with the >- * distribution. >- * * Neither the name of Google Inc. nor the names of its >- * contributors may be used to endorse or promote products derived from >- * this software without specific prior written permission. >- * >- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >- >-#if ENABLE(MUTATION_OBSERVERS) >- >-#include "WebKitMutationObserver.h" >- >-#include "Document.h" >-#include "ExceptionCode.h" >-#include "MutationCallback.h" >-#include "MutationObserverRegistration.h" >-#include "MutationRecord.h" >-#include "Node.h" >-#include <algorithm> >-#include <wtf/HashSet.h> >-#include <wtf/MainThread.h> >-#include <wtf/Vector.h> >- >-namespace WebCore { >- >-static unsigned s_observerPriority = 0; >- >-struct WebKitMutationObserver::ObserverLessThan { >- bool operator()(const RefPtr<WebKitMutationObserver>& lhs, const RefPtr<WebKitMutationObserver>& rhs) >- { >- return lhs->m_priority < rhs->m_priority; >- } >-}; >- >-PassRefPtr<WebKitMutationObserver> WebKitMutationObserver::create(PassRefPtr<MutationCallback> callback) >-{ >- ASSERT(isMainThread()); >- return adoptRef(new WebKitMutationObserver(callback)); >-} >- >-WebKitMutationObserver::WebKitMutationObserver(PassRefPtr<MutationCallback> callback) >- : m_callback(callback) >- , m_priority(s_observerPriority++) >-{ >-} >- >-WebKitMutationObserver::~WebKitMutationObserver() >-{ >- ASSERT(m_registrations.isEmpty()); >-} >- >-bool WebKitMutationObserver::validateOptions(MutationObserverOptions options) >-{ >- return (options & (Attributes | CharacterData | ChildList)) >- && ((options & Attributes) || !(options & AttributeOldValue)) >- && ((options & Attributes) || !(options & AttributeFilter)) >- && ((options & CharacterData) || !(options & CharacterDataOldValue)); >-} >- >-void WebKitMutationObserver::observe(Node* node, MutationObserverOptions options, const HashSet<AtomicString>& attributeFilter, ExceptionCode& ec) >-{ >- if (!node) { >- ec = NOT_FOUND_ERR; >- return; >- } >- >- if (!validateOptions(options)) { >- // FIXME: Revisit this once the spec specifies the exception type; SYNTAX_ERR may not be appropriate. >- ec = SYNTAX_ERR; >- return; >- } >- >- MutationObserverRegistration* registration = node->registerMutationObserver(this); >- registration->resetObservation(options, attributeFilter); >- >- node->document()->addMutationObserverTypes(registration->mutationTypes()); >-} >- >-Vector<RefPtr<MutationRecord> > WebKitMutationObserver::takeRecords() >-{ >- Vector<RefPtr<MutationRecord> > records; >- records.swap(m_records); >- return records; >-} >- >-void WebKitMutationObserver::disconnect() >-{ >- m_records.clear(); >- HashSet<MutationObserverRegistration*> registrations(m_registrations); >- for (HashSet<MutationObserverRegistration*>::iterator iter = registrations.begin(); iter != registrations.end(); ++iter) >- (*iter)->unregister(); >-} >- >-void WebKitMutationObserver::observationStarted(MutationObserverRegistration* registration) >-{ >- ASSERT(!m_registrations.contains(registration)); >- m_registrations.add(registration); >-} >- >-void WebKitMutationObserver::observationEnded(MutationObserverRegistration* registration) >-{ >- ASSERT(m_registrations.contains(registration)); >- m_registrations.remove(registration); >-} >- >-typedef HashSet<RefPtr<WebKitMutationObserver> > MutationObserverSet; >- >-static MutationObserverSet& activeMutationObservers() >-{ >- DEFINE_STATIC_LOCAL(MutationObserverSet, activeObservers, ()); >- return activeObservers; >-} >- >-void WebKitMutationObserver::enqueueMutationRecord(PassRefPtr<MutationRecord> mutation) >-{ >- ASSERT(isMainThread()); >- m_records.append(mutation); >- activeMutationObservers().add(this); >-} >- >-void WebKitMutationObserver::setHasTransientRegistration() >-{ >- ASSERT(isMainThread()); >- activeMutationObservers().add(this); >-} >- >-void WebKitMutationObserver::deliver() >-{ >- // Calling clearTransientRegistrations() can modify m_registrations, so it's necessary >- // to make a copy of the transient registrations before operating on them. >- Vector<MutationObserverRegistration*, 1> transientRegistrations; >- for (HashSet<MutationObserverRegistration*>::iterator iter = m_registrations.begin(); iter != m_registrations.end(); ++iter) { >- if ((*iter)->hasTransientRegistrations()) >- transientRegistrations.append(*iter); >- } >- for (size_t i = 0; i < transientRegistrations.size(); ++i) >- transientRegistrations[i]->clearTransientRegistrations(); >- >- if (m_records.isEmpty()) >- return; >- >- Vector<RefPtr<MutationRecord> > records; >- records.swap(m_records); >- >- m_callback->handleEvent(&records, this); >-} >- >-void WebKitMutationObserver::deliverAllMutations() >-{ >- ASSERT(isMainThread()); >- static bool deliveryInProgress = false; >- if (deliveryInProgress) >- return; >- deliveryInProgress = true; >- >- while (!activeMutationObservers().isEmpty()) { >- Vector<RefPtr<WebKitMutationObserver> > observers; >- copyToVector(activeMutationObservers(), observers); >- activeMutationObservers().clear(); >- std::sort(observers.begin(), observers.end(), ObserverLessThan()); >- for (size_t i = 0; i < observers.size(); ++i) >- observers[i]->deliver(); >- } >- >- deliveryInProgress = false; >-} >- >-} // namespace WebCore >- >-#endif // ENABLE(MUTATION_OBSERVERS) >diff --git a/Source/WebCore/dom/WebKitMutationObserver.h b/Source/WebCore/dom/WebKitMutationObserver.h >deleted file mode 100644 >index 38af237e198be8a729aac2f000db8afe58f29739..0000000000000000000000000000000000000000 >--- a/Source/WebCore/dom/WebKitMutationObserver.h >+++ /dev/null >@@ -1,107 +0,0 @@ >-/* >- * Copyright (C) 2011 Google Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions are >- * met: >- * >- * * Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * * Redistributions in binary form must reproduce the above >- * copyright notice, this list of conditions and the following disclaimer >- * in the documentation and/or other materials provided with the >- * distribution. >- * * Neither the name of Google Inc. nor the names of its >- * contributors may be used to endorse or promote products derived from >- * this software without specific prior written permission. >- * >- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#ifndef WebKitMutationObserver_h >-#define WebKitMutationObserver_h >- >-#if ENABLE(MUTATION_OBSERVERS) >- >-#include <wtf/HashMap.h> >-#include <wtf/HashSet.h> >-#include <wtf/PassRefPtr.h> >-#include <wtf/RefCounted.h> >-#include <wtf/RefPtr.h> >-#include <wtf/text/AtomicString.h> >-#include <wtf/text/AtomicStringHash.h> >- >-namespace WebCore { >- >-class MutationCallback; >-class MutationObserverRegistration; >-class MutationRecord; >-class Node; >- >-typedef int ExceptionCode; >- >-typedef unsigned char MutationObserverOptions; >-typedef unsigned char MutationRecordDeliveryOptions; >- >-class WebKitMutationObserver : public RefCounted<WebKitMutationObserver> { >-public: >- enum MutationType { >- ChildList = 1 << 0, >- Attributes = 1 << 1, >- CharacterData = 1 << 2, >- >- AllMutationTypes = ChildList | Attributes | CharacterData >- }; >- >- enum ObservationFlags { >- Subtree = 1 << 3, >- AttributeFilter = 1 << 4 >- }; >- >- enum DeliveryFlags { >- AttributeOldValue = 1 << 5, >- CharacterDataOldValue = 1 << 6, >- }; >- >- static PassRefPtr<WebKitMutationObserver> create(PassRefPtr<MutationCallback>); >- static void deliverAllMutations(); >- >- ~WebKitMutationObserver(); >- >- void observe(Node*, MutationObserverOptions, const HashSet<AtomicString>& attributeFilter, ExceptionCode&); >- Vector<RefPtr<MutationRecord> > takeRecords(); >- void disconnect(); >- void observationStarted(MutationObserverRegistration*); >- void observationEnded(MutationObserverRegistration*); >- void enqueueMutationRecord(PassRefPtr<MutationRecord>); >- void setHasTransientRegistration(); >- >-private: >- struct ObserverLessThan; >- >- WebKitMutationObserver(PassRefPtr<MutationCallback>); >- void deliver(); >- >- static bool validateOptions(MutationObserverOptions); >- >- RefPtr<MutationCallback> m_callback; >- Vector<RefPtr<MutationRecord> > m_records; >- HashSet<MutationObserverRegistration*> m_registrations; >- unsigned m_priority; >-}; >- >-} >- >-#endif // ENABLE(MUTATION_OBSERVERS) >- >-#endif // WebKitMutationObserver_h >diff --git a/Source/WebCore/dom/WebKitMutationObserver.idl b/Source/WebCore/dom/WebKitMutationObserver.idl >deleted file mode 100644 >index e535f45bfe1b02158d748308144c89ae739777d5..0000000000000000000000000000000000000000 >--- a/Source/WebCore/dom/WebKitMutationObserver.idl >+++ /dev/null >@@ -1,42 +0,0 @@ >-/* >- * Copyright (C) 2011 Google Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions are >- * met: >- * >- * * Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * * Redistributions in binary form must reproduce the above >- * copyright notice, this list of conditions and the following disclaimer >- * in the documentation and/or other materials provided with the >- * distribution. >- * * Neither the name of Google Inc. nor the names of its >- * contributors may be used to endorse or promote products derived from >- * this software without specific prior written permission. >- * >- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR >- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT >- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, >- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY >- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-module core { >- interface [ >- Conditional=MUTATION_OBSERVERS, >- CustomConstructor, >- ConstructorParameters=1 >- ] WebKitMutationObserver { >- [Custom] void observe(in Node target, in MutationObserverOptions options) >- raises(DOMException); >- sequence<MutationRecord> takeRecords(); >- void disconnect(); >- }; >-} >diff --git a/Source/WebCore/page/DOMWindow.idl b/Source/WebCore/page/DOMWindow.idl >index b206543b15586724d9fb81e0ea19360b70394606..36ba70306e0c8c31dc5c6b6529cb68ea10fab985 100644 >--- a/Source/WebCore/page/DOMWindow.idl >+++ b/Source/WebCore/page/DOMWindow.idl >@@ -778,7 +778,8 @@ module window { > > attribute [Conditional=BLOB] DOMURLConstructor webkitURL; > >- attribute [Conditional=MUTATION_OBSERVERS] WebKitMutationObserverConstructor WebKitMutationObserver; >+ attribute [Conditional=MUTATION_OBSERVERS] MutationObserverConstructor MutationObserver; >+ attribute [Conditional=MUTATION_OBSERVERS] MutationObserverConstructor WebKitMutationObserver; > > #endif // defined(LANGUAGE_JAVASCRIPT) > >diff --git a/Source/WebKit/chromium/src/WebKit.cpp b/Source/WebKit/chromium/src/WebKit.cpp >index 6106597ae8fb15ede606b61b78424498c99d741a..1bb3b44a93dffc5fc826a1a3b60fb0c66ab7953e 100644 >--- a/Source/WebKit/chromium/src/WebKit.cpp >+++ b/Source/WebKit/chromium/src/WebKit.cpp >@@ -32,13 +32,13 @@ > #include "WebKit.h" > > #include "Logging.h" >+#include "MutationObserver.h" > #include "Page.h" > #include "RuntimeEnabledFeatures.h" > #include "Settings.h" > #include "TextEncoding.h" > #include "V8Binding.h" > #include "V8RecursionScope.h" >-#include "WebKitMutationObserver.h" > #include "WebMediaPlayerClientImpl.h" > #include "WebSocket.h" > #include "WorkerContextExecutionProxy.h" >@@ -66,7 +66,7 @@ public: > virtual void willProcessTask() { } > virtual void didProcessTask() > { >- WebCore::WebKitMutationObserver::deliverAllMutations(); >+ WebCore::MutationObserver::deliverAllMutations(); > } > }; > >diff --git a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp b/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp >index fe1f70dae1b8974c86c37d786d2a2e2b96f41da0..9a281ecd4916c3a25906a002f4aad91440fcc0b9 100644 >--- a/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp >+++ b/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp >@@ -47,6 +47,7 @@ > #include <JSElement.h> > #include <JavaScriptCore/OpaqueJSString.h> > #include <MemoryCache.h> >+#include <MutationObserver.h> > #include <PageGroup.h> > #include <PrintContext.h> > #include <RenderTreeAsText.h> >@@ -55,7 +56,6 @@ > #include <ScriptValue.h> > #include <Settings.h> > #include <TextIterator.h> >-#include <WebKitMutationObserver.h> > #include <bindings/js/GCController.h> > #include <history/HistoryItem.h> > #include <workers/WorkerThread.h> >@@ -597,7 +597,7 @@ void DumpRenderTreeSupportEfl::dumpConfigurationForViewport(Evas_Object* ewkView > void DumpRenderTreeSupportEfl::deliverAllMutationsIfNecessary() > { > #if ENABLE(MUTATION_OBSERVERS) >- WebCore::WebKitMutationObserver::deliverAllMutations(); >+ WebCore::MutationObserver::deliverAllMutations(); > #endif > } > >diff --git a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp >index f69eb87c5663e4c137f8b22f07fb060ad6e42352..5bc049d1f9cef0decdbf2a406b2b073cb29a240c 100644 >--- a/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp >+++ b/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp >@@ -50,6 +50,7 @@ > #include "JSLock.h" > #include "JSNodeList.h" > #include "JSValue.h" >+#include "MutationObserver.h" > #include "NodeList.h" > #include "PageGroup.h" > #include "PlatformString.h" >@@ -64,7 +65,6 @@ > #include "Settings.h" > #include "TextIterator.h" > #include "WebKitAccessibleWrapperAtk.h" >-#include "WebKitMutationObserver.h" > #include "WorkerThread.h" > #include "webkitglobalsprivate.h" > #include "webkitwebframe.h" >@@ -863,7 +863,7 @@ JSValueRef DumpRenderTreeSupportGtk::computedStyleIncludingVisitedInfo(JSContext > void DumpRenderTreeSupportGtk::deliverAllMutationsIfNecessary() > { > #if ENABLE(MUTATION_OBSERVERS) >- WebKitMutationObserver::deliverAllMutations(); >+ MutationObserver::deliverAllMutations(); > #endif > } > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index cac4c1cfa1c2e361ebfa753793f5914847085543..291a9efdbcb4afa86445a3d5ff998eaa9945fe4f 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,43 @@ >+2012-06-15 Adam Klein <adamk@chromium.org> >+ >+ Remove vendor prefix from DOM MutationObservers >+ https://bugs.webkit.org/show_bug.cgi?id=89231 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ All tests have been updated to reference the unprefixed name. >+ >+ * fast/mutation/callback-arguments.html: >+ * fast/mutation/clear-transient-without-delivery.html: >+ * fast/mutation/create-during-delivery.html: >+ * fast/mutation/cross-document.html: >+ * fast/mutation/database-callback-delivery.html: >+ * fast/mutation/delivery-order.html: >+ * fast/mutation/disconnect-cancel-pending-expected.txt: >+ * fast/mutation/disconnect-cancel-pending.html: >+ * fast/mutation/document-fragment-insertion.html: >+ * fast/mutation/end-of-task-delivery.html: >+ * fast/mutation/filesystem-callback-delivery.html: >+ * fast/mutation/inline-event-listener.html: >+ * fast/mutation/mutate-during-delivery.html: >+ * fast/mutation/mutation-callback-non-element-crash.html: >+ * fast/mutation/mutation-observer-constructor-expected.txt: >+ * fast/mutation/mutation-observer-constructor.html: >+ * fast/mutation/observe-attributes-expected.txt: >+ * fast/mutation/observe-attributes.html: >+ * fast/mutation/observe-characterdata-expected.txt: >+ * fast/mutation/observe-characterdata.html: >+ * fast/mutation/observe-childList-expected.txt: >+ * fast/mutation/observe-childList.html: >+ * fast/mutation/observe-exceptions-expected.txt: >+ * fast/mutation/observe-exceptions.html: >+ * fast/mutation/observe-subtree-expected.txt: >+ * fast/mutation/observe-subtree.html: >+ * fast/mutation/shadow-dom.html: >+ * fast/mutation/takeRecords-expected.txt: >+ * fast/mutation/takeRecords.html: >+ * fast/mutation/transient-gc-crash.html: >+ > 2012-06-15 Abhishek Arya <inferno@chromium.org> > > Cleanup empty anonymous block continuation. >diff --git a/LayoutTests/fast/mutation/callback-arguments.html b/LayoutTests/fast/mutation/callback-arguments.html >index f78ddd92d35a49848260d67c6e21eedad071dd63..f87672fecd7a353d404d98bd333893f5934065cc 100644 >--- a/LayoutTests/fast/mutation/callback-arguments.html >+++ b/LayoutTests/fast/mutation/callback-arguments.html >@@ -12,7 +12,7 @@ function mutationCallback(mutations, observer) { > shouldBe('argument2', 'mutationObserver'); > finishJSTest(); > } >-var mutationObserver = new WebKitMutationObserver(mutationCallback); >+var mutationObserver = new MutationObserver(mutationCallback); > var div = document.createElement('div'); > mutationObserver.observe(div, {attributes: true}); > div.setAttribute('foo', 'bar'); >diff --git a/LayoutTests/fast/mutation/clear-transient-without-delivery.html b/LayoutTests/fast/mutation/clear-transient-without-delivery.html >index e1fee81720ebcd709e80999f4a9be1272caa87e2..42a53e38bd5f56e3c3241ad34ccb67ac10494314 100644 >--- a/LayoutTests/fast/mutation/clear-transient-without-delivery.html >+++ b/LayoutTests/fast/mutation/clear-transient-without-delivery.html >@@ -7,7 +7,7 @@ var mutationsDelivered = false; > function callback(mutations) { > mutationsDelivered = true; > } >-var observer = new WebKitMutationObserver(callback); >+var observer = new MutationObserver(callback); > > var div = document.createElement('div'); > var span = div.appendChild(document.createElement('span')); >diff --git a/LayoutTests/fast/mutation/create-during-delivery.html b/LayoutTests/fast/mutation/create-during-delivery.html >index ceee24e7082cf81d5a5a549c4cd7b4d2db8e2026..4f5d07c6c01d9df8ff53145771d2ec534888c2aa 100644 >--- a/LayoutTests/fast/mutation/create-during-delivery.html >+++ b/LayoutTests/fast/mutation/create-during-delivery.html >@@ -17,17 +17,17 @@ var order = []; > var div = document.createElement('div'); > > var observer3; >-var observer1 = new WebKitMutationObserver(function(mutations) { >+var observer1 = new MutationObserver(function(mutations) { > order.push(1); > if (!observer3) { >- observer3 = new WebKitMutationObserver(function(mutations) { >+ observer3 = new MutationObserver(function(mutations) { > order.push(3); > }); > observer3.observe(div, {attributes: true}); > div.setAttribute('foo', 'baz'); > } > }); >-var observer2 = new WebKitMutationObserver(function(mutations) { >+var observer2 = new MutationObserver(function(mutations) { > order.push(2); > }); > >diff --git a/LayoutTests/fast/mutation/cross-document.html b/LayoutTests/fast/mutation/cross-document.html >index f4ee7f0cfcd874bedbf88a9fafa7aba9f1804fa1..c883da34f446fcd92e1166baed9be5b172b7b8d3 100644 >--- a/LayoutTests/fast/mutation/cross-document.html >+++ b/LayoutTests/fast/mutation/cross-document.html >@@ -18,7 +18,7 @@ function testBasic() { > > mutations = null; > div = document.createElement('div'); >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > >@@ -52,7 +52,7 @@ function testSubtree() { > mutations = null; > div = document.createElement('div'); > subDiv = div.appendChild(document.createElement('div')); >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > >@@ -89,7 +89,7 @@ function runNextTest() { > > description('Test that MutationObservers move correctly across documents'); > >-if (!window.WebKitMutationObserver) >+if (!window.MutationObserver) > testFailed('This test requires ENABLE(MUTATION_OBSERVERS)'); > else > runNextTest(); >diff --git a/LayoutTests/fast/mutation/database-callback-delivery.html b/LayoutTests/fast/mutation/database-callback-delivery.html >index c79a3fac27dd87ca9459c61c112a6c28c466f624..4038d0fe069e83f65a32bb905cfdc348c999e6ed 100644 >--- a/LayoutTests/fast/mutation/database-callback-delivery.html >+++ b/LayoutTests/fast/mutation/database-callback-delivery.html >@@ -12,7 +12,7 @@ function testDatabase() { > function start() { > mutations = null; > div = document.createElement('div'); >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -41,7 +41,7 @@ function testDatabase() { > > description('Testing mutations are delivered following Database transaction callbacks.'); > >-if (!window.WebKitMutationObserver) { >+if (!window.MutationObserver) { > testFailed('This test requires ENABLE(MUTATION_OBSERVERS)'); > finishJSTest(); > } else >diff --git a/LayoutTests/fast/mutation/delivery-order.html b/LayoutTests/fast/mutation/delivery-order.html >index 4e55c0d62b65348d9eaa3c2b5067f5fafb82b4dd..5bc2991a5b5bec822faf6aadceafbf69a4435ca1 100644 >--- a/LayoutTests/fast/mutation/delivery-order.html >+++ b/LayoutTests/fast/mutation/delivery-order.html >@@ -23,7 +23,7 @@ var order = []; > var observers = []; > > function setUpOrdering(num) { >- observers.push(new WebKitMutationObserver(function(mutations) { >+ observers.push(new MutationObserver(function(mutations) { > order.push(num); > })); > } >diff --git a/LayoutTests/fast/mutation/disconnect-cancel-pending-expected.txt b/LayoutTests/fast/mutation/disconnect-cancel-pending-expected.txt >index 3b5d97e7532d68f666ebae9fa5c0a3cad3fb1b12..736a75e191d6b51dcf7ac750e542d888ac521c4e 100644 >--- a/LayoutTests/fast/mutation/disconnect-cancel-pending-expected.txt >+++ b/LayoutTests/fast/mutation/disconnect-cancel-pending-expected.txt >@@ -1,4 +1,4 @@ >-Test that WebKitMutationObserver.disconnect cancels pending delivery >+Test that MutationObserver.disconnect cancels pending delivery > > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > >diff --git a/LayoutTests/fast/mutation/disconnect-cancel-pending.html b/LayoutTests/fast/mutation/disconnect-cancel-pending.html >index f62fd529e39c51ac7c468c99bea3713750156ad1..bd47808f4c2537a3c47d468a693c7c42da4aa791 100644 >--- a/LayoutTests/fast/mutation/disconnect-cancel-pending.html >+++ b/LayoutTests/fast/mutation/disconnect-cancel-pending.html >@@ -1,7 +1,7 @@ > <!DOCTYPE html> > <script src="../js/resources/js-test-pre.js"></script> > <script> >-description('Test that WebKitMutationObserver.disconnect cancels pending delivery'); >+description('Test that MutationObserver.disconnect cancels pending delivery'); > > window.jsTestIsAsync = true; > var mutations; >@@ -11,7 +11,7 @@ function start() { > mutations = null; > div = document.createElement('div'); > >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -36,7 +36,7 @@ function finish() { > finishJSTest(); > } > >-if (!window.WebKitMutationObserver) >+if (!window.MutationObserver) > testFailed('This test requires ENABLE(MUTATION_OBSERVERS)'); > else > start(); >diff --git a/LayoutTests/fast/mutation/document-fragment-insertion.html b/LayoutTests/fast/mutation/document-fragment-insertion.html >index cac46cff43207a9e2bf0d9fa6c3c3dec2ae5ffe4..b6466eceb44d64aff8a6f9c308f0d5f6024f86ff 100644 >--- a/LayoutTests/fast/mutation/document-fragment-insertion.html >+++ b/LayoutTests/fast/mutation/document-fragment-insertion.html >@@ -20,7 +20,7 @@ function createObservedDiv() { > function callback(mutations) { > window.mutations = mutations; > } >-var observer = new WebKitMutationObserver(callback); >+var observer = new MutationObserver(callback); > > function testAppendChild() { > debug('Testing appendChild'); >diff --git a/LayoutTests/fast/mutation/end-of-task-delivery.html b/LayoutTests/fast/mutation/end-of-task-delivery.html >index 22d36478c8972abad9e7de5208f296b38d38f96b..4c79a754be244b64ea96e6cb457aec07b6a897c4 100644 >--- a/LayoutTests/fast/mutation/end-of-task-delivery.html >+++ b/LayoutTests/fast/mutation/end-of-task-delivery.html >@@ -12,7 +12,7 @@ > var list = document.querySelector('ol'); > var p = document.querySelector('p'); > var observerRuns = 0; >- var observer = new WebKitMutationObserver(function() { ++observerRuns; }); >+ var observer = new MutationObserver(function() { ++observerRuns; }); > observer.observe(list, {childList: true}); > list.addEventListener('blur', function() { > document.body.innerHTML = observerRuns == 1 ? 'PASSED' : 'FAILED'; >diff --git a/LayoutTests/fast/mutation/filesystem-callback-delivery.html b/LayoutTests/fast/mutation/filesystem-callback-delivery.html >index ef1c56a15a8e82304c81e57f4acdc88c9db757f7..ab55b8994d381fd576c21ee16dec088737a9c62c 100644 >--- a/LayoutTests/fast/mutation/filesystem-callback-delivery.html >+++ b/LayoutTests/fast/mutation/filesystem-callback-delivery.html >@@ -12,7 +12,7 @@ function testFilesystem() { > function start() { > mutations = null; > div = document.createElement('div'); >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -56,7 +56,7 @@ function testFilesystem() { > > description('Test that Mutation Records are delivered following FileSystem callbacks.'); > >-if (!window.WebKitMutationObserver || !window.webkitRequestFileSystem) { >+if (!window.MutationObserver || !window.webkitRequestFileSystem) { > testFailed('This test requires ENABLE(MUTATION_OBSERVERS) and ENABLE(FILE_SYSTEM)'); > finishJSTest(); > } else >diff --git a/LayoutTests/fast/mutation/inline-event-listener.html b/LayoutTests/fast/mutation/inline-event-listener.html >index 30968e14fbd67981da05afb081dd893d7bbe0993..57d86b93ba82c392d9949f4cbc9b6054732b240b 100644 >--- a/LayoutTests/fast/mutation/inline-event-listener.html >+++ b/LayoutTests/fast/mutation/inline-event-listener.html >@@ -10,7 +10,7 @@ > > var list = document.querySelector('ol'); > var observerRan = false; >- var observer = new WebKitMutationObserver(function() { observerRan = true; }); >+ var observer = new MutationObserver(function() { observerRan = true; }); > observer.observe(list, {childList: true, characterData: true}); > list.focus(); > if (window.eventSender) >diff --git a/LayoutTests/fast/mutation/mutate-during-delivery.html b/LayoutTests/fast/mutation/mutate-during-delivery.html >index f9301b97e5cd18a105224cfdac4fe4f8a3937b36..c949f7e7b02e0278daf9dbf7f04f3ba7eef8386f 100644 >--- a/LayoutTests/fast/mutation/mutate-during-delivery.html >+++ b/LayoutTests/fast/mutation/mutate-during-delivery.html >@@ -15,14 +15,14 @@ function finish() { > var order = []; > var div = document.createElement('div'); > >-var observer1 = new WebKitMutationObserver(function(mutations) { >+var observer1 = new MutationObserver(function(mutations) { > order.push(1); > div.appendChild(document.createElement('span')); > }); >-var observer2 = new WebKitMutationObserver(function(mutations) { >+var observer2 = new MutationObserver(function(mutations) { > order.push(2); > }); >-var observer3 = new WebKitMutationObserver(function(mutations) { >+var observer3 = new MutationObserver(function(mutations) { > order.push(3); > }); > >diff --git a/LayoutTests/fast/mutation/mutation-callback-non-element-crash.html b/LayoutTests/fast/mutation/mutation-callback-non-element-crash.html >index 75f22ef96116a3a50796c48a36e3ed70e0850b6e..2eaa0461b710685a063bf71c8c78f43735926bf1 100755 >--- a/LayoutTests/fast/mutation/mutation-callback-non-element-crash.html >+++ b/LayoutTests/fast/mutation/mutation-callback-non-element-crash.html >@@ -9,7 +9,7 @@ function mutationCallback(mutations, observer) { > mutations[0].addedNodes[-1]; > } > >-var mutationObserver = new WebKitMutationObserver(mutationCallback); >+var mutationObserver = new MutationObserver(mutationCallback); > mutationObserver.observe(document.body, {childList: true}); > document.body.appendChild(document.createTextNode("PASS. WebKit didn't crash")); > </script> >diff --git a/LayoutTests/fast/mutation/mutation-observer-constructor-expected.txt b/LayoutTests/fast/mutation/mutation-observer-constructor-expected.txt >index 2beb3e86e70e2485a7720180776428591792749d..547f4bd483f3f0195b0ae0674c068ea7dfb59c7e 100644 >--- a/LayoutTests/fast/mutation/mutation-observer-constructor-expected.txt >+++ b/LayoutTests/fast/mutation/mutation-observer-constructor-expected.txt >@@ -1,11 +1,11 @@ >-Test the constructor of WebKitMutationObserver >+Test the constructor of MutationObserver > > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > > >-PASS window.WebKitMutationObserver is non-null. >-PASS typeof WebKitMutationObserver.prototype.observe is "function" >-PASS typeof WebKitMutationObserver.prototype.disconnect is "function" >+PASS window.MutationObserver is non-null. >+PASS typeof MutationObserver.prototype.observe is "function" >+PASS typeof MutationObserver.prototype.disconnect is "function" > PASS typeof observer.observe is "function" > PASS typeof observer.disconnect is "function" > PASS successfullyParsed is true >diff --git a/LayoutTests/fast/mutation/mutation-observer-constructor.html b/LayoutTests/fast/mutation/mutation-observer-constructor.html >index ab40f70ed7368f5385a1f49d85d39e4a60ae37cd..b8a92bb3a6fb2aaa1e43e4e44508534001fc9bce 100644 >--- a/LayoutTests/fast/mutation/mutation-observer-constructor.html >+++ b/LayoutTests/fast/mutation/mutation-observer-constructor.html >@@ -11,17 +11,17 @@ > <script> > > function runTest() { >- shouldBeNonNull('window.WebKitMutationObserver'); >- shouldBeEqualToString('typeof WebKitMutationObserver.prototype.observe', 'function'); >- shouldBeEqualToString('typeof WebKitMutationObserver.prototype.disconnect', 'function'); >- window.observer = new WebKitMutationObserver(function(mutations) { }); >+ shouldBeNonNull('window.MutationObserver'); >+ shouldBeEqualToString('typeof MutationObserver.prototype.observe', 'function'); >+ shouldBeEqualToString('typeof MutationObserver.prototype.disconnect', 'function'); >+ window.observer = new MutationObserver(function(mutations) { }); > shouldBeEqualToString('typeof observer.observe', 'function'); > shouldBeEqualToString('typeof observer.disconnect', 'function'); > } > >-description('Test the constructor of WebKitMutationObserver'); >+description('Test the constructor of MutationObserver'); > >-if (!window.WebKitMutationObserver) >+if (!window.MutationObserver) > testFailed('This test requires ENABLE(MUTATION_OBSERVERS)'); > else > runTest(); >diff --git a/LayoutTests/fast/mutation/observe-attributes-expected.txt b/LayoutTests/fast/mutation/observe-attributes-expected.txt >index 07a68c3cd9f704b8c51e151d47da140fc4f13ddc..b998c989473f9a7bfabb95639bb40626e80d719b 100644 >--- a/LayoutTests/fast/mutation/observe-attributes-expected.txt >+++ b/LayoutTests/fast/mutation/observe-attributes-expected.txt >@@ -1,4 +1,4 @@ >-Test WebKitMutationObserver.observe on attributes >+Test MutationObserver.observe on attributes > > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > >diff --git a/LayoutTests/fast/mutation/observe-attributes.html b/LayoutTests/fast/mutation/observe-attributes.html >index 421eeadf1ff71869b83a9992280760c82df4a2fd..36ea90b5103a9f125eb3603d901b761b42ebf7a7 100644 >--- a/LayoutTests/fast/mutation/observe-attributes.html >+++ b/LayoutTests/fast/mutation/observe-attributes.html >@@ -18,7 +18,7 @@ function testBasic() { > div = document.createElement('div'); > div.setAttribute('bar', 'foo'); > >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -82,7 +82,7 @@ function testWrongType() { > > mutations = null; > div = document.createElement('div'); >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -111,7 +111,7 @@ function testMultipleRegistration() { > calls = 0; > mutations = null; > div = document.createElement('div'); >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > calls++; > }); >@@ -153,10 +153,10 @@ function testMultipleObservers() { > debug('Testing that multiple observers can be registered to a given node and both receive mutations.'); > mutations = null; > div = document.createElement('div'); >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); >- observer2 = new WebKitMutationObserver(function(m) { >+ observer2 = new MutationObserver(function(m) { > mutations2 = m; > }); > observer.observe(div, { attributes: true }); >@@ -189,7 +189,7 @@ function testNamespaceURI() { > debug('Testing that "attributeNamespace" value is delivered properly.'); > mutations = null; > div = document.createElement('div'); >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -221,7 +221,7 @@ function testPropertyAccess() { > img = document.createElement('img'); > a = document.createElement('a'); > >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -262,7 +262,7 @@ function testOrderingWrtDOMSubtreeModified() { > > subDiv = div.appendChild(document.createElement('div')); > >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -305,7 +305,7 @@ function testOldValue() { > div = document.createElement('div'); > div.setAttribute('bar', 'boo'); > >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > observer.observe(div, { attributes: true, attributeOldValue: true }); >@@ -346,10 +346,10 @@ function testOldValueAsRequested() { > mutations = null; > div = document.createElement('div'); > div.setAttribute('foo', 'bar'); >- observerWithOldValue = new WebKitMutationObserver(function(mutations) { >+ observerWithOldValue = new MutationObserver(function(mutations) { > window.mutationsWithOldValue = mutations; > }); >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > observerWithOldValue.observe(div, { attributes: true, attributeOldValue: true }); >@@ -387,7 +387,7 @@ function testOldValueUnionMultipleObservations() { > div = document.createElement('div'); > span = div.appendChild(document.createElement('span')); > span.setAttribute('foo', 'bar'); >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > observer.observe(div, { attributes: true, attributeOldValue: true, subtree: true }); >@@ -417,7 +417,7 @@ function testIDLAttribute() { > debug('Testing setting an attribute via reflected IDL attribute.'); > mutations = null; > div = document.createElement('div'); >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > observer.observe(div, { attributes: true, attributeOldValue: true }); >@@ -454,7 +454,7 @@ function testAttributeFilter() { > debug('Testing that attributeFilter works as expected and observes case with HTML elements.'); > > mutations = null; >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -494,7 +494,7 @@ function testAttributeFilterSubtree() { > debug('Testing the behavior of attributeFilter when the same observer observes at multiple nodes in a subtree with different filter options.'); > > mutations = null; >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -565,7 +565,7 @@ function testAttributeFilterNonHTMLElement() { > debug('Testing that setting an attributeFilter filters out namespaced attributes.'); > > mutations = null; >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -597,7 +597,7 @@ function testAttributeFilterNonHTMLDocument() { > > svgDoc = document.implementation.createDocument('http://www.w3.org/2000/svg', 'svg', 'svg'); > mutations = null; >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -642,7 +642,7 @@ function testStyleAttributePropertyAccess() { > debug('Testing that modifying an elements style property dispatches Mutation Records.'); > > mutations = null; >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -694,7 +694,7 @@ function testStyleAttributePropertyAccessOldValue() { > debug('Testing that modifying an elements style property dispatches Mutation Records with correct oldValues.'); > > mutations = null; >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -746,7 +746,7 @@ function testStyleAttributePropertyAccessIgnoreNoop() { > debug('Testing that a no-op style property mutation does not create Mutation Records.'); > > mutations = null; >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -776,7 +776,7 @@ function testMutateThroughAttrNodeValue() { > debug('Test that mutating an attribute through an attr node delivers mutation records'); > > mutations = null; >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > >@@ -810,7 +810,7 @@ function testMutateThroughAttrNodeChild() { > debug('Test that mutating an attribute by attaching a child to an attr node delivers mutation records'); > > mutations = null; >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > >@@ -844,7 +844,7 @@ function testSetAndRemoveAttributeNode() { > debug('Test that mutating via setAttributeNode delivers mutation records'); > > mutations = null; >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > >@@ -893,7 +893,7 @@ function testMixedNodeAndElementOperations() { > debug('Test that setAttribute on an attribute with an existing Attr delivers mutation records'); > > mutations = null; >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > >@@ -929,7 +929,7 @@ function testNamedNodeMapOperations() { > debug('Test that setNamedItem and removeNamedItem deliver mutation records'); > > mutations = null; >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > >@@ -997,9 +997,9 @@ function runNextTest() { > finishJSTest(); > } > >-description('Test WebKitMutationObserver.observe on attributes'); >+description('Test MutationObserver.observe on attributes'); > >-if (!window.WebKitMutationObserver) >+if (!window.MutationObserver) > testFailed('This test requires ENABLE(MUTATION_OBSERVERS)'); > else > runNextTest(); >diff --git a/LayoutTests/fast/mutation/observe-characterdata-expected.txt b/LayoutTests/fast/mutation/observe-characterdata-expected.txt >index 1dff3b55d276cc15a6839bed7d97b382c6f7adfb..31dd574052c2fe763e88f27f0a259008fde7e40a 100644 >--- a/LayoutTests/fast/mutation/observe-characterdata-expected.txt >+++ b/LayoutTests/fast/mutation/observe-characterdata-expected.txt >@@ -1,4 +1,4 @@ >-Test WebKitMutationObserver.observe on CharacterData nodes >+Test MutationObserver.observe on CharacterData nodes > > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > >diff --git a/LayoutTests/fast/mutation/observe-characterdata.html b/LayoutTests/fast/mutation/observe-characterdata.html >index 01caea21ea4306b6fcff2e49fd0e39737a12645c..d89054a73a84431f0e98d969b342896bf6b60727 100644 >--- a/LayoutTests/fast/mutation/observe-characterdata.html >+++ b/LayoutTests/fast/mutation/observe-characterdata.html >@@ -27,7 +27,7 @@ function testBasic() { > div = document.createElement('div'); > div.textContent = 'foo'; > charDataNode = div.firstChild; >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -87,7 +87,7 @@ function testWrongType() { > div = document.createElement('div'); > div.textContent = 'hello'; > charDataNode = div.firstChild; >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -117,10 +117,10 @@ function testMultipleObservers() { > div = document.createElement('div'); > div.textContent = 'foo'; > charDataNode = div.firstChild; >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); >- observer2 = new WebKitMutationObserver(function(m) { >+ observer2 = new MutationObserver(function(m) { > mutations2 = m; > }); > observer.observe(charDataNode, {characterData: true}); >@@ -161,7 +161,7 @@ function testOrderingWrtDOMSubtreeModified() { > subDiv.textContent = 'foo'; > charDataNode = subDiv.firstChild; > >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -202,7 +202,7 @@ function testOldValue() { > div = document.createElement('div'); > div.textContent = 'foo'; > charDataNode = div.firstChild; >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > observer.observe(charDataNode, {characterData: true, characterDataOldValue: true}); >@@ -239,10 +239,10 @@ function testOldValueAsRequested() { > div = document.createElement('div'); > div.textContent = 'foo'; > charDataNode = div.firstChild; >- observerWithOldValue = new WebKitMutationObserver(function(mutations) { >+ observerWithOldValue = new MutationObserver(function(mutations) { > window.mutationsWithOldValue = mutations; > }); >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > observerWithOldValue.observe(charDataNode, {characterData: true, characterDataOldValue: true}); >@@ -277,7 +277,7 @@ function testOldValueUnionMultipleObservations() { > div = document.createElement('div'); > div.textContent = 'foo'; > charDataNode = div.firstChild; >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > observer.observe(div, {characterData: true, characterDataOldValue: true, subtree: true}); >@@ -316,9 +316,9 @@ function runNextTest() { > finishJSTest(); > } > >-description('Test WebKitMutationObserver.observe on CharacterData nodes'); >+description('Test MutationObserver.observe on CharacterData nodes'); > >-if (!window.WebKitMutationObserver) >+if (!window.MutationObserver) > testFailed('This test requires ENABLE(MUTATION_OBSERVERS)'); > else > runNextTest(); >diff --git a/LayoutTests/fast/mutation/observe-childList-expected.txt b/LayoutTests/fast/mutation/observe-childList-expected.txt >index d7bb27642f1d46befbc2d00fb1ae59d8e077d20a..c3c1f6cde5b210fc6a354208f10e63345259d8b9 100644 >--- a/LayoutTests/fast/mutation/observe-childList-expected.txt >+++ b/LayoutTests/fast/mutation/observe-childList-expected.txt >@@ -1,4 +1,4 @@ >-Test WebKitMutationObserver.observe on attributes. >+Test MutationObserver.observe on attributes. > > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > >diff --git a/LayoutTests/fast/mutation/observe-childList.html b/LayoutTests/fast/mutation/observe-childList.html >index a3a84d4438864ae72b29c6898c440e098d28d912..dc618c6af7b0529affa58f1afd0bd56c0a431f52 100644 >--- a/LayoutTests/fast/mutation/observe-childList.html >+++ b/LayoutTests/fast/mutation/observe-childList.html >@@ -24,7 +24,7 @@ function testBasic() { > > mutations = null; > div = document.createElement('div'); >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -84,7 +84,7 @@ function testWrongType() { > > mutations = null; > div = document.createElement('div'); >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -113,7 +113,7 @@ function testMultipleRegistration() { > calls = 0; > mutations = null; > div = document.createElement('div'); >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > calls++; > }); >@@ -154,10 +154,10 @@ function testMultipleObservers() { > debug('Testing that multiple observers can be registered to a given node and both receive mutations.'); > mutations = null; > div = document.createElement('div'); >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); >- observer2 = new WebKitMutationObserver(function(m) { >+ observer2 = new MutationObserver(function(m) { > mutations2 = m; > }); > observer.observe(div, { childList: true }); >@@ -192,7 +192,7 @@ function testInnerHTMLAndInnerText() { > div.innerHTML = '<span>Foo</span><div>Bar</div>'; > removedDiv1 = div.firstChild; > removedDiv2 = removedDiv1.nextSibling; >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -250,7 +250,7 @@ function testReplaceChild() { > div.innerHTML = '<span>Foo</span><div>Bar</div>'; > removedDiv1 = div.firstChild; > >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -315,7 +315,7 @@ function testInsertBefore() { > addedDiv1 = fragment.appendChild(document.createElement('div')); > addedDiv2 = fragment.appendChild(document.createElement('div')); > >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -356,7 +356,7 @@ function testAppendChild() { > addedDiv1 = fragment.appendChild(document.createElement('div')); > addedDiv2 = fragment.appendChild(document.createElement('div')); > >- observer = new WebKitMutationObserver(function(m) { >+ observer = new MutationObserver(function(m) { > mutations = m; > }); > >@@ -387,7 +387,7 @@ function testInnerHTMLEmpty() { > > var div = document.createElement('div'); > mutations = null; >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > observer.observe(div, {childList: true}); >@@ -414,9 +414,9 @@ function runNextTest() { > finishJSTest(); > } > >-description('Test WebKitMutationObserver.observe on attributes.'); >+description('Test MutationObserver.observe on attributes.'); > >-if (!window.WebKitMutationObserver) >+if (!window.MutationObserver) > testFailed('This test requires ENABLE(MUTATION_OBSERVERS)'); > else > runNextTest(); >diff --git a/LayoutTests/fast/mutation/observe-exceptions-expected.txt b/LayoutTests/fast/mutation/observe-exceptions-expected.txt >index 9f6e37a9106f063800add33d7be0e312e0d18b25..8c9b4de808ea1ed9b9043496bc4595942f4348b1 100644 >--- a/LayoutTests/fast/mutation/observe-exceptions-expected.txt >+++ b/LayoutTests/fast/mutation/observe-exceptions-expected.txt >@@ -1,4 +1,4 @@ >-Test that WebKitMutationObserver.observe throws exceptions appropriately >+Test that MutationObserver.observe throws exceptions appropriately > > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > >diff --git a/LayoutTests/fast/mutation/observe-exceptions.html b/LayoutTests/fast/mutation/observe-exceptions.html >index d4657b6dd7c2e331283e28925cdf90c5df462059..7661547b279fffcbc8327d56ba196feb3a1b5beb 100644 >--- a/LayoutTests/fast/mutation/observe-exceptions.html >+++ b/LayoutTests/fast/mutation/observe-exceptions.html >@@ -11,7 +11,7 @@ > <script> > > function runTest() { >- window.observer = new WebKitMutationObserver(function(mutations) { }); >+ window.observer = new MutationObserver(function(mutations) { }); > shouldThrow('observer.observe()'); > shouldThrow('observer.observe(null)'); > shouldThrow('observer.observe(undefined)'); >@@ -26,9 +26,9 @@ function runTest() { > shouldThrow('observer.observe(document.body, {characterData: true, attributeFilter: ["id"]})'); > } > >-description('Test that WebKitMutationObserver.observe throws exceptions appropriately'); >+description('Test that MutationObserver.observe throws exceptions appropriately'); > >-if (!window.WebKitMutationObserver) >+if (!window.MutationObserver) > testFailed('This test requires ENABLE(MUTATION_OBSERVERS)'); > else > runTest(); >diff --git a/LayoutTests/fast/mutation/observe-subtree-expected.txt b/LayoutTests/fast/mutation/observe-subtree-expected.txt >index b894dcda1b3f6d2d349bd7c4a9a4cd069a4e69ed..653c7a48221c93e19d7628aa6cf86894f2912200 100644 >--- a/LayoutTests/fast/mutation/observe-subtree-expected.txt >+++ b/LayoutTests/fast/mutation/observe-subtree-expected.txt >@@ -1,4 +1,4 @@ >-Test WebKitMutationObserver.observe on a subtree >+Test MutationObserver.observe on a subtree > > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > >diff --git a/LayoutTests/fast/mutation/observe-subtree.html b/LayoutTests/fast/mutation/observe-subtree.html >index 37e40285e2b8b71d2226fd36181da4b853a20572..9551947a4c328f5a83484c64fe9453ca02d656a2 100644 >--- a/LayoutTests/fast/mutation/observe-subtree.html >+++ b/LayoutTests/fast/mutation/observe-subtree.html >@@ -27,7 +27,7 @@ function testBasic() { > div = document.createElement('div'); > subDiv = div.appendChild(document.createElement('div')); > subDiv.innerHTML = 'hello, world'; >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > >@@ -66,10 +66,10 @@ function testMultipleObservers() { > mutations2 = null; > div = document.createElement('div'); > subDiv = div.appendChild(document.createElement('div')); >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); >- observer2 = new WebKitMutationObserver(function(mutations) { >+ observer2 = new MutationObserver(function(mutations) { > window.mutations2 = mutations; > }); > >@@ -109,7 +109,7 @@ function testMultipleObservations() { > calls = 0; > div = document.createElement('div'); > subDiv = div.appendChild(document.createElement('div')); >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > ++calls; > }); >@@ -145,7 +145,7 @@ function testTransientDetachedBasic() { > div = document.createElement('div'); > subDiv = div.appendChild(document.createElement('div')); > subDiv.innerHTML = 'hello, world'; >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > >@@ -230,7 +230,7 @@ function testTransientDetachedDetailed() { > subDiv2.innerHTML = 'hello, world'; > subDiv3 = document.createElement('div'); > >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > >@@ -296,9 +296,9 @@ function runNextTest() { > finishJSTest(); > } > >-description('Test WebKitMutationObserver.observe on a subtree'); >+description('Test MutationObserver.observe on a subtree'); > >-if (!window.WebKitMutationObserver) >+if (!window.MutationObserver) > testFailed('This test requires ENABLE(MUTATION_OBSERVERS)'); > else > runNextTest(); >diff --git a/LayoutTests/fast/mutation/shadow-dom.html b/LayoutTests/fast/mutation/shadow-dom.html >index 66c79eac00f95960a0431ce2b29522ca0756bfab..7317d7a759090a65132511ccbf4f5180a0455de2 100644 >--- a/LayoutTests/fast/mutation/shadow-dom.html >+++ b/LayoutTests/fast/mutation/shadow-dom.html >@@ -14,7 +14,7 @@ function doTest() { > } > > var shadowRoot = internals.shadowRoot(document.querySelector('input')); >- var observer = new WebKitMutationObserver(function(mutations) { >+ var observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > >diff --git a/LayoutTests/fast/mutation/takeRecords-expected.txt b/LayoutTests/fast/mutation/takeRecords-expected.txt >index ac64426ab13ae2e1c9038dfb63b7912d3a065ef7..9f332614f436e1c211f8a52d67706728aca154d3 100644 >--- a/LayoutTests/fast/mutation/takeRecords-expected.txt >+++ b/LayoutTests/fast/mutation/takeRecords-expected.txt >@@ -1,4 +1,4 @@ >-Testing WebKitMutationObserver.takeRecords >+Testing MutationObserver.takeRecords > > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > >diff --git a/LayoutTests/fast/mutation/takeRecords.html b/LayoutTests/fast/mutation/takeRecords.html >index 039a32fbd91180ba8d66c17db8572c3e4544cbc2..634180a59ce54dd3c6752e9eacbf37d09ce2200b 100644 >--- a/LayoutTests/fast/mutation/takeRecords.html >+++ b/LayoutTests/fast/mutation/takeRecords.html >@@ -23,7 +23,7 @@ function testBasic() { > div = document.createElement('div'); > subDiv = div.appendChild(document.createElement('div')); > subDiv.innerHTML = 'hello, world'; >- observer = new WebKitMutationObserver(function(mutations) { >+ observer = new MutationObserver(function(mutations) { > window.mutations = mutations; > }); > >@@ -73,9 +73,9 @@ function runNextTest() { > finishJSTest(); > } > >-description('Testing WebKitMutationObserver.takeRecords'); >+description('Testing MutationObserver.takeRecords'); > >-if (!window.WebKitMutationObserver) >+if (!window.MutationObserver) > testFailed('This test requires ENABLE(MUTATION_OBSERVERS)'); > else > runNextTest(); >diff --git a/LayoutTests/fast/mutation/transient-gc-crash.html b/LayoutTests/fast/mutation/transient-gc-crash.html >index 6c13642d768a11829bbf8ab59a1efc1209eaf513..6ce6eb8c3afeca46ac25225db2d15bf0690145b6 100644 >--- a/LayoutTests/fast/mutation/transient-gc-crash.html >+++ b/LayoutTests/fast/mutation/transient-gc-crash.html >@@ -6,7 +6,7 @@ description('Clearing transient observers after observation node is GCed should > function callback(mutations) { > window.mutations = mutations; > } >-var observer = new WebKitMutationObserver(callback); >+var observer = new MutationObserver(callback); > > var div = document.createElement('div'); > var span = div.appendChild(document.createElement('span'));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 89231
:
147857
|
147862
|
147869
|
149584
|
149587
|
150052
|
151331