Changeset 63165 in webkit
- Timestamp:
- Jul 12, 2010 8:41:11 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r63163 r63165 1 2010-07-12 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 HTML5 Parser: document.write after onload blows away document 6 https://bugs.webkit.org/show_bug.cgi?id=40745 7 8 Update test to expect new behavior. 9 10 * http/tests/misc/write-while-waiting.html: 11 1 12 2010-07-12 Maciej Stachowiak <mjs@apple.com> 2 13 -
trunk/LayoutTests/http/tests/misc/write-while-waiting.html
r61286 r63165 1 1 <html> 2 2 <body> 3 FAIL 3 PASS 4 4 <script> 5 5 if (window.layoutTestController) 6 6 layoutTestController.dumpAsText(); 7 7 8 setTimeout("document.write(' PASS');document.close();", 100);8 setTimeout("document.write('FAIL');document.close();", 100); 9 9 </script> 10 10 <script src="resources/script-slow1.pl"></script> -
trunk/WebCore/ChangeLog
r63162 r63165 1 2010-07-12 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 HTML5 Parser: document.write after onload blows away document 6 https://bugs.webkit.org/show_bug.cgi?id=40745 7 8 Rather than blowing away the document when we get a document.write call 9 after the document is closed, we new ignore the write. This 10 technically violates the spec (which requires us to blow away the 11 document), but blowing away the document breaks too many web sites. 12 13 Rather than this patch, we could go back to our old behavior (which was 14 to append the bytes just before EOF), but implementing this approach 15 (suggested by Henri) will let us gather data about whether his approach 16 is workable. 17 18 See also: http://www.w3.org/Bugs/Public/show_bug.cgi?id=9767 19 20 * dom/Document.cpp: 21 (WebCore::Document::write): 22 * html/HTMLDocumentParser.cpp: 23 (WebCore::HTMLDocumentParser::insert): 24 1 25 2010-07-12 Tony Gentilcore <tonyg@chromium.org> 2 26 -
trunk/WebCore/dom/Document.cpp
r62876 r63165 2017 2017 #endif 2018 2018 2019 if (!m_parser || m_parser->finishWasCalled())2019 if (!m_parser) 2020 2020 open(ownerDocument); 2021 2021 -
trunk/WebCore/html/HTMLDocumentParser.cpp
r63154 r63165 219 219 return; 220 220 221 if (m_scriptRunner && !m_scriptRunner->inScriptExecution() && m_input.haveSeenEndOfFile()) { 222 // document.write was called without a current insertion point. 223 // According to the spec, we're supposed to implicitly open the 224 // document. Unfortunately, that behavior isn't sufficiently compatible 225 // with the web. The working group is mulling over what exactly to 226 // do. In the meantime, we're going to try one of the potential 227 // solutions, which is to ignore the write. 228 // http://www.w3.org/Bugs/Public/show_bug.cgi?id=9767 229 return; 230 } 231 221 232 { 222 233 NestingLevelIncrementer nestingLevelIncrementer(m_writeNestingLevel);
Note: See TracChangeset
for help on using the changeset viewer.