-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=89351 Patch by Elliott Sprehn <esprehn@gmail.com> on 2013-01-15 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::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 tests for parser generated mutations. XXX: This needs a bunch more tests observing the adoption agency algorithm to catch parserInsertBefore and parserRemoveChild mutations. * fast/dom/MutationObserver/parser-mutations-expected.txt: Added. * fast/dom/MutationObserver/parser-mutations.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
a227b81c