[Webkit-unassigned] [Bug 43658] Calling window.print() before the page is loaded results in a blank printed page
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Aug 9 14:03:36 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=43658
--- Comment #9 from Lei Zhang <thestig at chromium.org> 2010-08-09 14:03:36 PST ---
(In reply to comment #8)
> Is this change compatible with what other browsers do? Is it expected that if the script calls print() multiple times while loading, printing will only happen once at most. What happens if the script has called print() while loading, and before the page is done loading, the user closes the page or navigates to another page?
I tried changing the test page to call print() multiple times. On Windows, we have the following behavior:
IE 8: prompts once always
FF 3.6: prompts once always
Chrome 5: prompts once if you hit cancel, multiple prompts if you hit ok
Safari 4: prompts multiple times always
Opera 10.60: does not prompt at all
Based on this, I'd say it's ok if the WebKit based browser match IE/FF. It doesn't make sense to me to prompt multiple times on initial load. If you know of any cases where one would want to do that, please let me know.
For the question of what happens when a script calls printing while the page is loading, but then the user navigates away, I made a simple html page that calls print(), followed by a few MBs of text. I restricted the bandwidth on the web server to 10 kbps to simulate slow rendering and found the following:
IE 8: If you navigate away before the page loads, the print prompt never shows up.
FF 3.6: If you navigate away, FF will pop up a print prompt and print out what it has loaded - which can be blank or a partial page. This behavior is also a bit weird because you could have closed the last FF window, but you'd get a lone print dialog.
There's no clear defined behavior here either. For WebKit, with my patch, we'd match IE's behavior. Since the page never finished loading, we wouldn't get a print prompt.
It appears I'd need to add a layout test to LayoutTests/printing ? I'll take a look there.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list