RESOLVED FIXED 54632
[chromium] Printing causes view to scroll
https://bugs.webkit.org/show_bug.cgi?id=54632
Summary [chromium] Printing causes view to scroll
Yuzo Fujishima
Reported 2011-02-17 03:11:44 PST
Forked from https://bugs.webkit.org/show_bug.cgi?id=52552 to track Chromium-specific part of the issue. Steps to reproduce: 1. Open https://bug-52552-attachments.webkit.org/attachment.cgi?id=79128 2. Resize the window small enough such that vertical scrollbar appears. 3. Scroll to the bottom. 4. File > Print... > Cancel 5. Observe the scrollbar has moved upward. (For Safari, the upward scroll is observed only for very small (around 400 x 300) window, and the amount of scroll is smaller. The scroll doesn't manifest itself until the window is clicked after printing.)
Attachments
Patch (2.78 KB, patch)
2011-02-17 03:23 PST, Yuzo Fujishima
hamaji: review+
Yuzo Fujishima
Comment 1 2011-02-17 03:23:29 PST
Shinichiro Hamaji
Comment 2 2011-02-17 04:03:04 PST
IIRC, Darin Fisher said he wants to know all chromium API changes.
Shinichiro Hamaji
Comment 3 2011-02-17 04:04:44 PST
Comment on attachment 82778 [details] Patch ... and this change looks good to me. I think it's nice to have a link how this API will be used: http://codereview.chromium.org/6539011/
Darin Fisher (:fishd, Google)
Comment 4 2011-02-17 08:53:48 PST
Comment on attachment 82778 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=82778&action=review > Source/WebKit/chromium/public/WebFrame.h:146 > + virtual void setScrollOffset(const WebSize&) = 0; LGTM
Alexey Proskuryakov
Comment 5 2011-02-17 09:19:08 PST
What is different about chromium that makes this problem happen? This doesn't seem to fix the root cause, whatever it is.
Yuzo Fujishima
Comment 6 2011-02-17 17:15:06 PST
(In reply to comment #5) > What is different about chromium that makes this problem happen? This doesn't seem to fix the root cause, whatever it is. Chromium resizes WebView to paper size before printing and then to original on-screen size after printing. The scroll position is lost during the resizing. The intention of this patch is to allow Chromium to save the on-screen scroll position before resizing and restore it after. I'm not sure how Safari does it differently. Perhaps there is an alternative way of resizing WebView, which maintains the scroll position?
Yuzo Fujishima
Comment 7 2011-02-17 18:01:33 PST
Andrew Wilson
Comment 8 2011-02-17 19:18:52 PST
Reverted r78936 for reason: Breaks chromium build Committed r78940: <http://trac.webkit.org/changeset/78940>
Yuzo Fujishima
Comment 9 2011-02-17 23:44:11 PST
WebKit Review Bot
Comment 10 2011-02-18 01:06:03 PST
http://trac.webkit.org/changeset/78967 might have broken GTK Linux 64-bit Debug
Note You need to log in before you can comment on or make changes to this bug.