2011-02-28 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Adam Barth.
Follow HTML5 spec for document.open() a little more closely
https://bugs.webkit.org/show_bug.cgi?id=55392
* fast/parser/double-write-from-closed-iframe-expected.txt: Added.
* fast/parser/double-write-from-closed-iframe.html: Added. Prior to this patch, the second write of 'PASS' could fail indeterminately.
* fast/parser/script-tests/double-write-from-closed-iframe.js: Added.
* fast/regex/script-tests/cross-frame-callable.js: Necessary to close late writes.
2011-02-28 Tony Gentilcore <tonyg@chromium.org>
Reviewed by Adam Barth.
Follow HTML5 spec for document.open() a little more closely
https://bugs.webkit.org/show_bug.cgi?id=55392
See: 3.5.1.4 at http://www.whatwg.org/specs/web-apps/current-work/#dom-document-open.
The second return check matches the spec. The first return check (isExecutingScript())
was left in place because without it, fast/tokenizer/write-external-script-open.html
would fail. It also possible there is a spec bug because FF4 crashes on that test and
IE9 prints "FAILURE." The isLoadingMainResource() check was removed because the main
resource is always loading while parser->isParsing().
Test: fast/parser/double-write-from-closed-iframe.html
* dom/Document.cpp:
(WebCore::Document::open):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79944 268f45cc-cd09-0410-ab3c-d52691b4dbfc
7 files changed