Bug 100053 - page-break-inside gives descendant table cell extra height
Summary: page-break-inside gives descendant table cell extra height
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Printing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-22 16:43 PDT by ahochhaus
Modified: 2012-10-29 18:27 PDT (History)
3 users (show)

See Also:


Attachments
minimal test case html file demonstrating extra table cell height issue when printing (920 bytes, text/html)
2012-10-22 16:43 PDT, ahochhaus
no flags Details
example PDF showing extra table cell height (saved from Safari 6 print dialog) (21.55 KB, application/pdf)
2012-10-22 16:44 PDT, ahochhaus
no flags Details
image marking extra table cell height in red from previous PDF example (63.06 KB, image/png)
2012-10-22 16:45 PDT, ahochhaus
no flags Details
RenderBlock patch which avoids boosting the height of table cells. (635 bytes, text/plain)
2012-10-23 13:18 PDT, ahochhaus
no flags Details
Fix style - avoid braces for single line if statement (625 bytes, text/plain)
2012-10-23 13:24 PDT, ahochhaus
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description ahochhaus 2012-10-22 16:43:10 PDT
Created attachment 170020 [details]
minimal test case html file demonstrating extra table cell height issue when printing

When using "page-break-inside: avoid" in conjunction with a table, the table cells can be given extra height when the table lands on a page break boundary. See the attached html example for a full minimal test case which demonstrates the problem in WebKit nightly on Windows (r131444), Safari 6 Mac OS 10.7 and Chrome 22 on Debian Linux.
Comment 1 ahochhaus 2012-10-22 16:44:49 PDT
Created attachment 170022 [details]
example PDF showing extra table cell height (saved from Safari 6 print dialog)
Comment 2 ahochhaus 2012-10-22 16:45:58 PDT
Created attachment 170025 [details]
image marking extra table cell height in red from previous PDF example
Comment 3 ahochhaus 2012-10-23 13:18:15 PDT
Created attachment 170214 [details]
RenderBlock patch which avoids boosting the height of table cells.
Comment 4 WebKit Review Bot 2012-10-23 13:21:34 PDT
Attachment 170214 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/rendering/RenderBlock.cpp']" exit_code: 1
Source/WebCore/rendering/RenderBlock.cpp:7214:  One line control clauses should not use braces.  [whitespace/braces] [4]
Total errors found: 1 in 1 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 ahochhaus 2012-10-23 13:24:50 PDT
Created attachment 170217 [details]
Fix style - avoid braces for single line if statement
Comment 6 ahochhaus 2012-10-29 18:26:05 PDT
Comment on attachment 170214 [details]
RenderBlock patch which avoids boosting the height of table cells.

Does not work.
Comment 7 ahochhaus 2012-10-29 18:27:37 PDT
Comment on attachment 170217 [details]
Fix style - avoid braces for single line if statement

Does not work. I think the correct solution is to do add pagination struts to tables as Dave Hyatt suggests in https://bugs.webkit.org/show_bug.cgi?id=82617#c9.