DescriptionRevert 66670 - 2010-09-01 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Adam Barth.
Support <script defer> as specified by HTML5
https://bugs.webkit.org/show_bug.cgi?id=40934
* fast/dom/HTMLScriptElement/defer-double-defer-write-expected.txt: Added.
* fast/dom/HTMLScriptElement/defer-double-defer-write.html: Added. Tests that a write of a deferred script from a deferred script will execute when the document is closed. The explicit close is necessary because this is a script created parser.
* fast/dom/HTMLScriptElement/defer-double-write-expected.txt: Added.
* fast/dom/HTMLScriptElement/defer-double-write.html: Added. Tests that a script block written from a deferred script will write into the new document.
* fast/dom/HTMLScriptElement/defer-inline-script-expected.txt: Added.
* fast/dom/HTMLScriptElement/defer-inline-script.html: Added. Tests that inline scripts are not deferred. This is consistent with HTML5 and inconsistent with IE.
* fast/dom/HTMLScriptElement/defer-onbeforeload-expected.txt: Added.
* fast/dom/HTMLScriptElement/defer-onbeforeload.html: Added. Tests that the beforeload event is fired immediately and is cancellable.
* fast/dom/HTMLScriptElement/defer-script-invalid-url-expected.txt: Added.
* fast/dom/HTMLScriptElement/defer-script-invalid-url.html: Added. Tests that deferred scripts with invalid URLs are ignored and that subsequent deferred scripts will be run.
* fast/dom/HTMLScriptElement/defer-write-expected.txt: Added.
* fast/dom/HTMLScriptElement/defer-write.html: Added. Tests that a basic write from a deferred script blows away the document.
* fast/dom/HTMLScriptElement/resources/defer.js: Added.
* fast/dom/HTMLScriptElement/resources/external.js: Added.
* fast/dom/HTMLScriptElement/resources/shouldnotexecute.js: Added.
* fast/dom/HTMLScriptElement/shouldnotexecute.js: Added.
* fast/dom/HTMLScriptElement/two-defer-writes-expected.txt: Added.
* fast/dom/HTMLScriptElement/two-defer-writes.html: Added. Tests that when a document.write from the first deferred script blows away the document, subsequent deferred scripts are not executed.
* http/tests/misc/resources/defer-script.js: Added.
* http/tests/misc/resources/external-script.js: Added.
* http/tests/misc/resources/script-debug-body-background.js: Added.
* http/tests/misc/resources/script-write-slow-stylesheet.js: Added.
* http/tests/misc/resources/slow-defer-script.cgi: Added.
* http/tests/misc/resources/slow-stylesheet.cgi: Added.
* http/tests/misc/script-defer-after-slow-stylesheet-expected.txt: Added.
* http/tests/misc/script-defer-after-slow-stylesheet.html: Added. Tests that deferred scripts respect blocking stylesheets.
* http/tests/misc/script-defer-expected.txt: Added.
* http/tests/misc/script-defer.html: Added. Tests basic ordering of deferred scripts.
2010-09-01 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Adam Barth.
Support <script defer> as specified by HTML5
https://bugs.webkit.org/show_bug.cgi?id=40934
Tests: fast/dom/HTMLScriptElement/defer-double-defer-write.html
fast/dom/HTMLScriptElement/defer-double-write.html
fast/dom/HTMLScriptElement/defer-inline-script.html
fast/dom/HTMLScriptElement/defer-onbeforeload.html
fast/dom/HTMLScriptElement/defer-script-invalid-url.html
fast/dom/HTMLScriptElement/defer-write.html
fast/dom/HTMLScriptElement/two-defer-writes.html
http/tests/misc/script-defer-after-slow-stylesheet.html
http/tests/misc/script-defer.html
* dom/Document.cpp:
(WebCore::Document::open): Allow implicit open for writes() while executing deferred scripts.
* dom/DocumentParser.cpp:
(WebCore::DocumentParser::DocumentParser):
(WebCore::DocumentParser::startParsing):
(WebCore::DocumentParser::prepareToStopParsing): If called when stopped or detached, it shouldn't reset to stopping.
(WebCore::DocumentParser::stopParsing):
(WebCore::DocumentParser::detach):
* dom/DocumentParser.h:
(WebCore::DocumentParser::isParsing):
(WebCore::DocumentParser::isActive):
(WebCore::DocumentParser::isStopping):
(WebCore::DocumentParser::isDetached):
* dom/RawDataDocumentParser.h:
(WebCore::RawDataDocumentParser::finish):
* dom/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::append):
(WebCore::XMLDocumentParser::exitText):
* dom/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::doWrite):
(WebCore::XMLDocumentParser::startElementNs):
(WebCore::XMLDocumentParser::endElementNs):
(WebCore::XMLDocumentParser::characters):
(WebCore::XMLDocumentParser::error):
(WebCore::XMLDocumentParser::processingInstruction):
(WebCore::XMLDocumentParser::cdataBlock):
(WebCore::XMLDocumentParser::comment):
(WebCore::XMLDocumentParser::internalSubset):
(WebCore::XMLDocumentParser::initializeParserContext):
(WebCore::XMLDocumentParser::doEnd):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::prepareToStopParsing):
(WebCore::HTMLDocumentParser::pumpTokenizerIfPossible):
(WebCore::HTMLDocumentParser::pumpTokenizer):
(WebCore::HTMLDocumentParser::insert):
(WebCore::HTMLDocumentParser::append):
(WebCore::HTMLDocumentParser::end):
(WebCore::HTMLDocumentParser::attemptToEnd):
(WebCore::HTMLDocumentParser::endIfDelayed):
(WebCore::HTMLDocumentParser::notifyFinished):
* html/parser/HTMLDocumentParser.h:
* html/parser/HTMLScriptRunner.cpp:
(WebCore::HTMLScriptRunner::~HTMLScriptRunner):
(WebCore::HTMLScriptRunner::executeParsingBlockingScript):
(WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
(WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
(WebCore::HTMLScriptRunner::requestDeferredScript):
(WebCore::HTMLScriptRunner::runScript):
* html/parser/HTMLScriptRunner.h:
* loader/ImageDocument.cpp:
(WebCore::ImageDocumentParser::finish):
TBR=tonyg@chromium.org
BUG=57196
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69800
Patch Set 1 #
Created: 10 years, 2 months ago
(Patch set is too large to download)
Messages
Total messages: 1 (0 generated)
|