Bug 65005

Summary: REGRESSION: A single line is split into two pages
Product: WebKit Reporter: Kentaro Hara <haraken>
Component: PrintingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, dglazkov, dominicc, gustavo, hyatt, morrita, webkit.review.bot, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Rebased patch
none
Just see if the patch passes win
webkit.review.bot: commit-queue-
Just see if the patch passes win EWS
none
Just see if the patch passes win EWS
none
patch for review none

Description Kentaro Hara 2011-07-21 19:37:42 PDT
(1) Go to http://haraken.info/null/print.html
(2) Print the page into pdf.

What happens: The last line of each page can be split into the next page. This bug happens when the document width of a page is overflowed. Look at the page 5 or 6 of http://haraken.info/null/print.pdf

I confirmed that this happens on Linux Chromium 14.0.828.0 and Mac Safari 5.0.5 with WebKit r91443. 

I found that this is the regression caused by WebKit r88737 (https://bugs.webkit.org/show_bug.cgi?id=61256), which was the commit of mine. I would apologize for it.  WebKit r88737 tried to fix the rounding error in rendering calculations. However, I forgot to fix it for the cases where the document width gets overflowed. I am making a patch. 

See also http://code.google.com/p/chromium/issues/detail?id=87828
Comment 1 Kentaro Hara 2011-07-21 21:55:28 PDT
Created attachment 101697 [details]
Patch
Comment 2 Kentaro Hara 2011-07-25 16:36:54 PDT
Would you please take a look at the patch?
Comment 3 Kentaro Hara 2011-07-26 17:20:07 PDT
I confirmed that this problem also happens on Gtk. The problem can happen if the width of at least one line is overflowed.
Comment 4 Dominic Cooney 2011-07-31 18:41:47 PDT
Comment on attachment 101697 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=101697&action=review

What is the reason for the failure on win?

> Source/WebCore/ChangeLog:19
> +        * WebCore.exp.in: Added the signature of forceLayoutForPagination().

Added or updated?

> Source/WebCore/ChangeLog:21
> +        (WebCore::Frame::setPrinting): Added a new argument |originalPageSize|, which is an original page size before being expanded or shrinked.

shrinked → shrunk
Comment 5 Kentaro Hara 2011-08-02 00:40:15 PDT
Created attachment 102622 [details]
Patch
Comment 6 Kentaro Hara 2011-08-02 00:40:27 PDT
Comment on attachment 101697 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=101697&action=review

>> Source/WebCore/ChangeLog:19
>> +        * WebCore.exp.in: Added the signature of forceLayoutForPagination().
> 
> Added or updated?

Done.

>> Source/WebCore/ChangeLog:21
>> +        (WebCore::Frame::setPrinting): Added a new argument |originalPageSize|, which is an original page size before being expanded or shrinked.
> 
> shrinked → shrunk

Done.
Comment 7 Kentaro Hara 2011-08-19 00:37:52 PDT
Created attachment 104472 [details]
Patch
Comment 8 Gyuyoung Kim 2011-08-19 00:48:42 PDT
Comment on attachment 104472 [details]
Patch

Attachment 104472 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/9434138
Comment 9 WebKit Review Bot 2011-08-19 00:55:42 PDT
Comment on attachment 104472 [details]
Patch

Attachment 104472 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/9435160
Comment 10 Gustavo Noronha (kov) 2011-08-19 00:58:33 PDT
Comment on attachment 104472 [details]
Patch

Attachment 104472 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/9439141
Comment 11 Kentaro Hara 2011-08-19 01:58:00 PDT
Created attachment 104477 [details]
Patch
Comment 12 Early Warning System Bot 2011-08-19 02:36:20 PDT
Comment on attachment 104477 [details]
Patch

Attachment 104477 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/9433178
Comment 13 Kentaro Hara 2011-08-19 03:18:19 PDT
Created attachment 104484 [details]
Patch
Comment 14 Kentaro Hara 2011-09-02 18:21:50 PDT
Created attachment 106236 [details]
Rebased patch
Comment 15 Kentaro Hara 2011-09-12 01:11:56 PDT
Created attachment 107028 [details]
Just see if the patch passes win
Comment 16 WebKit Review Bot 2011-09-12 01:50:40 PDT
Comment on attachment 107028 [details]
Just see if the patch passes win

Attachment 107028 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/9635885

New failing tests:
svg/custom/svg-fonts-word-spacing.html
Comment 17 Kentaro Hara 2011-09-12 04:13:07 PDT
Created attachment 107038 [details]
Just see if the patch passes win EWS
Comment 18 Kentaro Hara 2011-09-12 16:50:29 PDT
Created attachment 107113 [details]
Just see if the patch passes win EWS
Comment 19 Kentaro Hara 2011-09-12 18:37:43 PDT
Created attachment 107124 [details]
patch for review
Comment 20 Dave Hyatt 2011-09-15 16:12:21 PDT
Comment on attachment 107124 [details]
patch for review

r=me
Comment 21 WebKit Review Bot 2011-09-15 18:16:46 PDT
Comment on attachment 107124 [details]
patch for review

Clearing flags on attachment: 107124

Committed r95249: <http://trac.webkit.org/changeset/95249>
Comment 22 WebKit Review Bot 2011-09-15 18:16:55 PDT
All reviewed patches have been landed.  Closing bug.