commit | 2483b517a14e40094b160086fc56779436397ec1 | [log] [tgz] |
---|---|---|
author | rniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Mon May 02 18:19:44 2016 +0000 |
committer | rniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Mon May 02 18:19:44 2016 +0000 |
tree | 670e56f0f8d585542931cfecf330d3e06ae85e35 | |
parent | 6061458827b8fa72dd8790aea3834e8ddaef2978 [diff] |
document.currentScript must be null when we're executing a script inside a shadow tree https://bugs.webkit.org/show_bug.cgi?id=157245 Reviewed by Darin Adler. Source/WebCore: Fix the bug by not setting currentScript as spec'ed in HTML5 specification: https://html.spec.whatwg.org/multipage/dom.html#dom-document-currentscript https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block as of 3dc763829ca1598427b588cf08830c1e2af5a05c New behavior matches that of Google Chrome Canary. Test: fast/shadow-dom/Document-prototype-currentScript.html * dom/CurrentScriptIncrementer.h: (WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer): (WebCore::CurrentScriptIncrementer::~CurrentScriptIncrementer): * dom/ScriptElement.cpp: (WebCore::ScriptElement::executeScript): LayoutTests: Add a W3C style testharness.js test. * fast/shadow-dom/Document-prototype-currentScript-expected.txt: Added. * fast/shadow-dom/Document-prototype-currentScript.html: Added. * fast/shadow-dom/resources/Document-prototype-currentScript-helper.js: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200327 268f45cc-cd09-0410-ab3c-d52691b4dbfc