WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
8961
document.write() doesn't flush plain text
https://bugs.webkit.org/show_bug.cgi?id=8961
Summary
document.write() doesn't flush plain text
Krishna
Reported
2006-05-17 13:23:03 PDT
Steps To Reproduce: 1. Open Safari or S60 Web Browser 2. Load the test file 3. Click the link "Prompt" 4. Edit text in the prompt dialog 5. Select OK for prompt dialog. Expected Result: Prompt dialog closes and result page is loaded with the edited text Actual Result: Prompt dialog closes and a blank result page opened. Test source: <html> <head> <script type="text/javascript"> function message(){ var name = prompt("Please enter your name","John Wayne") if (name != null && name != "") { document.write("Hello " + name) } } </script> </head> <body> <p> Select the link "Prompt" and verify that the prompt dialog is displayed correctly. </p> <a href="javascript: message()">Prompt</a> <br/> </body> </html>
Attachments
prompt dialog test case
(408 bytes, text/html)
2006-05-17 13:24 PDT
,
Krishna
no flags
Details
automated test
(471 bytes, text/html)
2006-12-24 08:42 PST
,
Alexey Proskuryakov
no flags
Details
a slightly more evil test
(697 bytes, text/html)
2007-10-26 12:58 PDT
,
Alexey Proskuryakov
no flags
Details
This patch fixes the test cases.
(603 bytes, patch)
2008-02-11 12:39 PST
,
Dave Hyatt
no flags
Details
Formatted Diff
Diff
Patch
(12.00 KB, patch)
2010-08-13 20:21 PDT
,
Adam Barth
no flags
Details
Formatted Diff
Diff
Patch for landing
(11.99 KB, patch)
2010-08-13 20:25 PDT
,
Adam Barth
no flags
Details
Formatted Diff
Diff
Patch for landing
(11.34 KB, patch)
2010-08-13 23:24 PDT
,
Adam Barth
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Krishna
Comment 1
2006-05-17 13:24:27 PDT
Created
attachment 8372
[details]
prompt dialog test case This test page is same as the given test source in the description.
Krishna
Comment 2
2006-05-17 13:36:22 PDT
(In reply to
comment #1
)
> Created an attachment (id=8372) [edit] > prompt dialog test case > This test page is same as the given test source in the description.
The browser expects the close html tag, after the document writes are complete. The behaviour is same on both safari and S60 Web Browser. The follwoing function works ok. But can we expect the content author to write this kind of javascript function? function message(){ var name = prompt("Please enter your name","John Wayne") alert(name); if (name != null && name != "") { document.write("Hello " + name); document.write("</body></html>"); } }
Alexey Proskuryakov
Comment 3
2006-05-18 05:23:02 PDT
The text does get displayed when any HTML tag is written, though - try changing the name to "John Wayne</p>". Or to "John<p>Wayne".
Krishna
Comment 4
2006-05-30 10:36:07 PDT
TSW Error ID: EXTH-6HL4ZD
David Kilzer (:ddkilzer)
Comment 5
2006-06-26 03:19:51 PDT
***
Bug 9587
has been marked as a duplicate of this bug. ***
David Kilzer (:ddkilzer)
Comment 6
2006-06-26 03:21:49 PDT
(In reply to
comment #5
)
> ***
Bug 9587
has been marked as a duplicate of this bug. ***
Hmm...how do we want to handle this? My inclination is to change the Hardware, OS and Version settings to match "HEAD" rather than the S60 branch. Should we just keep these bugs separate instead?
Alexey Proskuryakov
Comment 7
2006-06-26 03:47:10 PDT
(In reply to
comment #6
)
> Hmm...how do we want to handle this? My inclination is to change the Hardware, > OS and Version settings to match "HEAD" rather than the S60 branch.
Indeed - I've been told before that this is how bugs still present in TOT are supposed to be handled. Changing to All/All/420+.
Joost de Valk (AlthA)
Comment 8
2006-06-26 04:49:52 PDT
I definitly agree on this, it's up to nokia to backport a patch :) .
Alexey Proskuryakov
Comment 9
2006-12-24 08:42:02 PST
Created
attachment 12004
[details]
automated test
Alexey Proskuryakov
Comment 10
2007-09-26 21:27:46 PDT
***
Bug 14709
has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
Comment 11
2007-09-26 21:28:41 PDT
Bug 14709
has some in-depth discussion of this issue.
Alexey Proskuryakov
Comment 12
2007-10-26 12:58:25 PDT
Created
attachment 16888
[details]
a slightly more evil test
Alexey Proskuryakov
Comment 13
2007-12-30 07:06:03 PST
***
Bug 7885
has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
Comment 14
2008-01-06 00:21:34 PST
***
Bug 16762
has been marked as a duplicate of this bug. ***
Dave Hyatt
Comment 15
2008-02-11 12:39:36 PST
Created
attachment 19076
[details]
This patch fixes the test cases. Nobody ever recorded which Acid3 test this affects in the bug. My score on Acid3 does not change with this patch, so either the patch isn't good enough or the test has changed to make this no longer be an Acid3 issue.
Dave Hyatt
Comment 16
2008-02-11 12:42:33 PST
Looks like this is no longer related to Acid3.
Dave Hyatt
Comment 17
2008-02-11 12:43:44 PST
Comment on
attachment 19076
[details]
This patch fixes the test cases. I will land the evil test case from the bug.
Robert Blaut
Comment 18
2008-02-11 12:48:29 PST
(In reply to
comment #15
)
> Created an attachment (id=19076) [edit] > This patch fixes the test cases. > > Nobody ever recorded which Acid3 test this affects in the bug. My score on > Acid3 does not change with this patch, so either the patch isn't good enough or > the test has changed to make this no longer be an Acid3 issue. >
Dave, look into this
bug 16762
. The bug have description about relation between Acid3 test and this bug.
Dave Hyatt
Comment 19
2008-02-11 12:49:03 PST
Comment on
attachment 19076
[details]
This patch fixes the test cases. Actually need to think about this some more.
Eric Seidel (no email)
Comment 20
2008-04-15 13:24:36 PDT
I believe this is the bug causing these Hixie tests to fail:
http://hixie.ch/tests/adhoc/dom/level0/write/007.html
http://hixie.ch/tests/adhoc/dom/level0/write/008.html
mitz
Comment 21
2008-08-28 18:35:53 PDT
***
Bug 20563
has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
Comment 22
2008-09-21 02:41:09 PDT
***
Bug 20970
has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
Comment 23
2008-11-14 11:12:46 PST
***
Bug 22234
has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
Comment 24
2008-11-28 13:28:50 PST
***
Bug 13043
has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
Comment 25
2009-06-17 01:44:36 PDT
***
Bug 26432
has been marked as a duplicate of this bug. ***
Adam Barth
Comment 26
2010-08-13 20:21:27 PDT
Created
attachment 64401
[details]
Patch
Eric Seidel (no email)
Comment 27
2010-08-13 20:23:18 PDT
Comment on
attachment 64401
[details]
Patch WebCore/ChangeLog:9 + reached the end of the input stream, but that's now how the spec now how. You mean "not" how. Yay test driven development!
Adam Barth
Comment 28
2010-08-13 20:23:23 PDT
***
Bug 14599
has been marked as a duplicate of this bug. ***
Adam Barth
Comment 29
2010-08-13 20:25:06 PDT
Created
attachment 64402
[details]
Patch for landing
WebKit Commit Bot
Comment 30
2010-08-13 22:39:41 PDT
Comment on
attachment 64402
[details]
Patch for landing Rejecting patch 64402 from commit-queue. Failed to run "[u'/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', u'--force']" exit_code: 1 Last 500 characters of output: ocument-write-evil-expected.txt patching file LayoutTests/fast/tokenizer/flush-characters-in-document-write-evil.html patching file LayoutTests/fast/tokenizer/flush-characters-in-document-write-expected.txt patching file LayoutTests/fast/tokenizer/flush-characters-in-document-write.html patching file WebCore/ChangeLog Hunk #1 FAILED at 1. 1 out of 1 hunk FAILED -- saving rejects to file WebCore/ChangeLog.rej patching file WebCore/html/HTMLTokenizer.cpp patching file WebCore/html/HTMLTokenizer.h Full output:
http://queues.webkit.org/results/3775148
Adam Barth
Comment 31
2010-08-13 23:24:30 PDT
Created
attachment 64409
[details]
Patch for landing
WebKit Commit Bot
Comment 32
2010-08-14 01:45:08 PDT
Comment on
attachment 64409
[details]
Patch for landing Rejecting patch 64409 from commit-queue. Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--wait-for-httpd', '--ignore-tests', 'compositing', '--quiet']" exit_code: 1 Running build-dumprendertree Compiling Java tests make: Nothing to be done for `default'. Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests Testing 20839 test cases. http/tests/appcache/credential-url.html -> crashed Exiting early after 1 failures. 19873 tests run. 747.73s total testing time 19872 test cases (99%) succeeded 1 test case (<1%) crashed 281 test cases (1%) had stderr output Full output:
http://queues.webkit.org/results/3768150
Eric Seidel (no email)
Comment 33
2010-08-14 08:39:05 PDT
Comment on
attachment 64409
[details]
Patch for landing Looks like a flake.
WebKit Commit Bot
Comment 34
2010-08-14 10:43:18 PDT
Comment on
attachment 64409
[details]
Patch for landing Rejecting patch 64409 from commit-queue. Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--wait-for-httpd', '--ignore-tests', 'compositing', '--quiet']" exit_code: 1 Running build-dumprendertree Compiling Java tests make: Nothing to be done for `default'. Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests Testing 20840 test cases. http/tests/appcache/credential-url.html -> crashed Exiting early after 1 failures. 19874 tests run. 738.32s total testing time 19873 test cases (99%) succeeded 1 test case (<1%) crashed 276 test cases (1%) had stderr output Full output:
http://queues.webkit.org/results/3747160
Adam Barth
Comment 35
2010-08-15 00:10:06 PDT
This patch caused an existing test to expose an existing crasher (
Bug 44024
), which we'll want to fix before landing this patch. ;)
Adam Barth
Comment 36
2010-08-15 12:24:13 PDT
Comment on
attachment 64409
[details]
Patch for landing Okiedokes. Let's give this another try.
WebKit Commit Bot
Comment 37
2010-08-15 12:43:41 PDT
Comment on
attachment 64409
[details]
Patch for landing Clearing flags on attachment: 64409 Committed
r65382
: <
http://trac.webkit.org/changeset/65382
>
WebKit Commit Bot
Comment 38
2010-08-15 12:43:50 PDT
All reviewed patches have been landed. Closing bug.
Joel Parks
Comment 39
2011-03-21 11:52:08 PDT
re-purposing InTSW keyword for use by QtWebkit team
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug