Bug 59241 - REGRESSION (r80812): window.print();window.close() doesn't work in WebKit2
Summary: REGRESSION (r80812): window.print();window.close() doesn't work in WebKit2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Printing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords: InRadar
Depends on: 59334
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-22 14:54 PDT by Alexey Proskuryakov
Modified: 2011-04-25 10:48 PDT (History)
5 users (show)

See Also:


Attachments
proposed fix (5.85 KB, patch)
2011-04-22 15:01 PDT, Alexey Proskuryakov
mjs: review+
commit-queue: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from cr-jail-7 (216.19 KB, application/zip)
2011-04-22 22:58 PDT, WebKit Commit Bot
no flags Details
with updated test results (8.73 KB, patch)
2011-04-23 00:11 PDT, Alexey Proskuryakov
ap: commit-queue+
Details | Formatted Diff | Diff
and now with ChangeLog (9.65 KB, patch)
2011-04-23 00:28 PDT, Alexey Proskuryakov
commit-queue: commit-queue-
Details | Formatted Diff | Diff
commit-queue, it's your last chance (9.68 KB, patch)
2011-04-23 10:18 PDT, Alexey Proskuryakov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2011-04-22 14:54:24 PDT
The window manages to close before a print dialog appears. 

It would seem that this working in WK1 is more of an accident - both print() and close() are delayed on a timer, and even though timers are FIFO, there is a lot of inherent raciness here.
Comment 1 Alexey Proskuryakov 2011-04-22 14:54:40 PDT
<rdar://problem/9150861>
Comment 2 Alexey Proskuryakov 2011-04-22 15:01:13 PDT
Created attachment 90772 [details]
proposed fix
Comment 3 Maciej Stachowiak 2011-04-22 15:22:42 PDT
Comment on attachment 90772 [details]
proposed fix

r=me
Comment 4 WebKit Commit Bot 2011-04-22 22:58:30 PDT
Comment on attachment 90772 [details]
proposed fix

Rejecting attachment 90772 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-7', 'build-..." exit_code: 2

Last 500 characters of output:
sts/xmlhttprequest ................................................................................................................................................................................
http/tests/xmlhttprequest/web-apps ...............
http/tests/xmlhttprequest/workers ...........
http/tests/xmlviewer .
http/tests/xmlviewer/dumpAsText ............
730.74s total testing time

23375 test cases (99%) succeeded
4 test cases (<1%) had incorrect layout
13 test cases (<1%) had stderr output

Full output: http://queues.webkit.org/results/8498629
Comment 5 WebKit Commit Bot 2011-04-22 22:58:33 PDT
Created attachment 90845 [details]
Archive of layout-test-results from cr-jail-7

The attached test failures were seen while running run-webkit-tests on the commit-queue.
Bot: cr-jail-7  Port: Mac  Platform: Mac OS X 10.6.6
Comment 6 Alexey Proskuryakov 2011-04-23 00:11:50 PDT
Created attachment 90847 [details]
with updated test results

These are progressions. Previously, resource load error delegate calls were made at a wrong time (after frame loader's didFinishLoading), so DumpRenderTree didn't log them.
Comment 7 Alexey Proskuryakov 2011-04-23 00:28:03 PDT
Created attachment 90848 [details]
and now with ChangeLog
Comment 8 WebKit Commit Bot 2011-04-23 02:24:16 PDT
Comment on attachment 90848 [details]
and now with ChangeLog

Rejecting attachment 90848 [details] from commit-queue.

Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-7', 'land-a..." exit_code: 1

Last 500 characters of output:
ueue@webkit.org...
Fetching: https://bugs.webkit.org/attachment.cgi?id=90848&action=edit
Fetching: https://bugs.webkit.org/show_bug.cgi?id=59241&ctype=xml
Processing 1 patch from 1 bug.
Cleaning working directory
Updating working directory
Processing patch 90848 from bug 59241.
ERROR: /mnt/git/webkit-commit-queue/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).
Updating OpenSource
Current branch master is up to date.

Full output: http://queues.webkit.org/results/8493771
Comment 9 Eric Seidel (no email) 2011-04-23 08:42:55 PDT
(In reply to comment #6)
> Created an attachment (id=90847) [details]
> with updated test results
> 
> These are progressions. Previously, resource load error delegate calls were made at a wrong time (after frame loader's didFinishLoading), so DumpRenderTree didn't log them.


Your comment made me think of bug 58412.  I wonder if the previous issue you mention could be the cause of that flaky test.
Comment 10 Alexey Proskuryakov 2011-04-23 10:18:35 PDT
Created attachment 90854 [details]
commit-queue, it's your last chance

> Your comment made me think of bug 58412.  I wonder if the previous issue you mention could be the cause of that flaky test.

This patch is unlikely to fix it - it only changes the behavior when main resource load is canceled somehow.
Comment 11 WebKit Commit Bot 2011-04-23 12:14:16 PDT
Comment on attachment 90854 [details]
commit-queue, it's your last chance

Clearing flags on attachment: 90854

Committed r84742: <http://trac.webkit.org/changeset/84742>
Comment 12 WebKit Commit Bot 2011-04-23 12:14:22 PDT
All reviewed patches have been landed.  Closing bug.
Comment 13 WebKit Review Bot 2011-04-23 13:24:23 PDT
http://trac.webkit.org/changeset/84742 might have broken Qt Linux Release
The following tests are not passing:
http/tests/misc/will-send-request-returns-null-on-redirect.html
http/tests/security/XFrameOptions/x-frame-options-deny.html
http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html
Comment 14 Alexey Proskuryakov 2011-04-23 20:21:44 PDT
Fixing Qt results seems to require some improvement of DRT result printing - not sure what the strategy is, but it seems that some Mac-specific messages are being already synthesized.
Comment 15 Csaba Osztrogonác 2011-04-25 10:48:56 PDT
(In reply to comment #14)
> Fixing Qt results seems to require some improvement of DRT result printing - not sure what the strategy is, but it seems that some Mac-specific messages are being already synthesized.

New bug filed on it: https://bugs.webkit.org/show_bug.cgi?id=59334