-
esprehn@chromium.org authored
https://bugs.webkit.org/show_bug.cgi?id=89351 Reviewed by Eric Seidel. Source/WebCore: Generate mutation records inside the parser. This is done by using a ChildListMutationScope in the ContainerNode::parser* methods and then adding delivery before each <script> element would be processed by the parser. Test: fast/dom/MutationObserver/parser-mutations.html * dom/ContainerNode.cpp: (WebCore::ContainerNode::takeAllChildrenFrom): (WebCore::ContainerNode::parserInsertBefore): (WebCore::ContainerNode::parserRemoveChild): (WebCore::ContainerNode::parserAppendChild): * html/parser/HTMLScriptRunner.cpp: (WebCore::HTMLScriptRunner::executeParsingBlockingScript): (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent): (WebCore::HTMLScriptRunner::execute): (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad): (WebCore::HTMLScriptRunner::executeScriptsWaitingForStylesheets): (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing): (WebCore::HTMLScriptRunner::runScript): LayoutTests: Add new test mutation records in the parser and fix shadow-dom.html test since it used setTimeout and sometimes could observe parser mutations. * fast/dom/MutationObserver/parser-mutations-expected.txt: Added. * fast/dom/MutationObserver/parser-mutations.html: Added. * fast/dom/MutationObserver/shadow-dom-expected.txt: * fast/dom/MutationObserver/shadow-dom.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
bc01ebc4