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.)
Created attachment 82778 [details] Patch
IIRC, Darin Fisher said he wants to know all chromium API changes.
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/
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
What is different about chromium that makes this problem happen? This doesn't seem to fix the root cause, whatever it is.
(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?
Committed r78936: <http://trac.webkit.org/changeset/78936>
Reverted r78936 for reason: Breaks chromium build Committed r78940: <http://trac.webkit.org/changeset/78940>
Committed r78967: <http://trac.webkit.org/changeset/78967>
http://trac.webkit.org/changeset/78967 might have broken GTK Linux 64-bit Debug