Bug 54480

Summary: REGRESSION (WebKit2): A web page remains unresponsive for a long time after printing
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: PrintingAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, darin, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.6   
Attachments:
Description Flags
naive fix darin: review+

Description Alexey Proskuryakov 2011-02-15 11:38:48 PST
I can't select, scroll etc for several seconds after dismissing print dialog, even on a small page.

Steps to reproduce:
1. Open http://www.apple.com/hotnews/
2. Cmd+P, Cancel.
3. Try to select text or drag the scroller.

Results: the page remains unresponsive for several seconds

<rdar://problem/8975229>
Comment 1 Alexey Proskuryakov 2011-02-15 11:43:57 PST
Created attachment 82492 [details]
naive fix

I don't understand how painting works between AppKit and WebKit2, and it's quite possible that the root cause lies elsewhere. This seems safe though.
Comment 2 WebKit Review Bot 2011-02-15 11:45:40 PST
Attachment 82492 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1

Source/WebKit2/ChangeLog:9:  Line contains tab character.  [whitespace/tab] [5]
Source/WebKit2/ChangeLog:10:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 2 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Darin Adler 2011-02-15 12:06:53 PST
Comment on attachment 82492 [details]
naive fix

Ideally we’d want to trigger the display timer, not immediate display. So this is a workaround for a bug not a real fix.
Comment 4 Alexey Proskuryakov 2011-02-15 12:18:37 PST
One thing that's good about displaying immediately is that we start relayout when going back to screen mode, so drawing the latest bits from before printing is better than drawing new ones after a short period of time.

What's surprising to me is that actions like selecting text on page or even scrolling don't make WebCore call invalidateContentsAndWindow().
Comment 5 Alexey Proskuryakov 2011-02-15 12:37:38 PST
Committed <http://trac.webkit.org/changeset/78603>.