RESOLVED FIXED 73868
REGRESSION (r95249): Right side is truncated when printing
https://bugs.webkit.org/show_bug.cgi?id=73868
Summary REGRESSION (r95249): Right side is truncated when printing
Alexey Proskuryakov
Reported 2011-12-05 14:50:36 PST
Right border is truncated when printing from Safari. I could reproduce this with apple.com and yahoo.com, so probably affects most/all pages. Steps to reproduce: 1. Open http://www.yahoo.com 2. Cmd+P to open print preview dialog. Results: right side of the page is truncated in preview dialog. <rdar://problem/10388115>
Attachments
A simplified test case (558 bytes, text/html)
2011-12-06 04:41 PST, Kentaro Hara
no flags
WIP patch (47.22 KB, patch)
2011-12-06 05:02 PST, Kentaro Hara
no flags
patch for review (601.54 KB, patch)
2011-12-07 00:18 PST, Kentaro Hara
no flags
Kentaro Hara
Comment 1 2011-12-05 15:21:11 PST
I'll take a look at it.
Kentaro Hara
Comment 2 2011-12-06 04:41:12 PST
Created attachment 118027 [details] A simplified test case When the attached html is printed, its right side is truncated.
Kentaro Hara
Comment 3 2011-12-06 05:02:18 PST
Created attachment 118029 [details] WIP patch
Kentaro Hara
Comment 4 2011-12-06 05:12:13 PST
ap, hyatt: I uploaded a patch but I am not sure how I can write a test for the patch. We need to test if the right sides of all lines in width-overflow.html are printed without being truncated, but how can we know if the right side is truncated or not? While layoutTestController.setPrinting() tells us the position of a bottom border of a page, it does not tell us the position of a right border (as you can see in width-overflow-expected.png). Any idea?
Kentaro Hara
Comment 5 2011-12-06 22:50:20 PST
(In reply to comment #4) > ap, hyatt: I uploaded a patch but I am not sure how I can write a test for the patch. > > We need to test if the right sides of all lines in width-overflow.html are printed without being truncated, but how can we know if the right side is truncated or not? While layoutTestController.setPrinting() tells us the position of a bottom border of a page, it does not tell us the position of a right border (as you can see in width-overflow-expected.png). Any idea? Solved. I found that the right edge of the result of setPrinting() is the right border of the page:-)
Kentaro Hara
Comment 6 2011-12-07 00:18:34 PST
Created attachment 118178 [details] patch for review
Kentaro Hara
Comment 7 2011-12-07 00:21:08 PST
ap, hyatt: Here are the setPrinting() results with/without my patch. Without my patch: http://haraken.info/a/width-overflow-expected-before.png With my patch: http://haraken.info/a/width-overflow-expected-after.png
WebKit Review Bot
Comment 8 2011-12-07 16:25:41 PST
Comment on attachment 118178 [details] patch for review Clearing flags on attachment: 118178 Committed r102281: <http://trac.webkit.org/changeset/102281>
WebKit Review Bot
Comment 9 2011-12-07 16:25:49 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.