WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
39733
Printing code should break a page only at allowed page breake positions
https://bugs.webkit.org/show_bug.cgi?id=39733
Summary
Printing code should break a page only at allowed page breake positions
Hayato Ito
Reported
2010-05-26 07:20:16 PDT
For example, suppose the height of page is 1000px and try to print the following html. <html> <body> <div id="block1" style="height:800px;border:1px solid red"></div> <div id="block2" style="height:800px;border:1px solid green"></div> </body> </html> According to CSS3's Paged Media specification (see bellow), a page break should occur between 'block1' and 'block2'. The current printing code breaks a page inside 'block2'. Breaking a page at disallowed position should be a last resort. - Opera 10.5.3 (Mac OS X 10.5) breaks a page between 'block1' and 'block2' correctly. - Firefox 3.6.2 (Mac OS X 10.5) has the same behaviour as WebKit. CSS3 PagedMedia 9.4. Allowed page breaks and Rule A, B, C and D.
http://dev.w3.org/csswg/css3-page/#allowed-pg-brk
Attachments
A patch for Bug 39733
(8.64 KB, patch)
2011-06-01 15:40 PDT
,
Stephen Chenney
no flags
Details
Formatted Diff
Diff
Patch for Bug 39733, 2nd attempt
(8.75 KB, patch)
2011-06-01 15:48 PDT
,
Stephen Chenney
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Stephen Chenney
Comment 1
2011-05-31 14:20:10 PDT
I have a fix for this under local testing.
Stephen Chenney
Comment 2
2011-05-31 14:23:48 PDT
Note that this bug is tested via the following layout tests: printing/allowed-page-breaks-expected printing/page-break-after-avoid printing/page-break-before-avoid printing/page-count-percentage-height These tests are currently expected to fail, in part due to this bug. Except page-count-percentage-height which I think has incorrect expected results right now.
Stephen Chenney
Comment 3
2011-06-01 15:40:55 PDT
Created
attachment 95677
[details]
A patch for
Bug 39733
The patch modifies the code that determines if a block may be split across a page when paginating (but not paginating for columns). The test now considers blocks with zero or 1 child as unsplittable. Some existing tests that were FAIL are now PASS.
WebKit Review Bot
Comment 4
2011-06-01 15:43:45 PDT
Attachment 95677
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/prin..." exit_code: 1 LayoutTests/ChangeLog:6: Line contains tab character. [whitespace/tab] [5] LayoutTests/ChangeLog:7: Line contains tab character. [whitespace/tab] [5] LayoutTests/ChangeLog:11: Line contains tab character. [whitespace/tab] [5] LayoutTests/ChangeLog:13: Line contains tab character. [whitespace/tab] [5] LayoutTests/ChangeLog:15: Line contains tab character. [whitespace/tab] [5] LayoutTests/ChangeLog:17: Line contains tab character. [whitespace/tab] [5] LayoutTests/ChangeLog:18: Line contains tab character. [whitespace/tab] [5] LayoutTests/ChangeLog:19: Line contains tab character. [whitespace/tab] [5] LayoutTests/ChangeLog:20: Line contains tab character. [whitespace/tab] [5] LayoutTests/ChangeLog:22: Line contains tab character. [whitespace/tab] [5] Source/WebCore/ChangeLog:6: Line contains tab character. [whitespace/tab] [5] Source/WebCore/ChangeLog:7: Line contains tab character. [whitespace/tab] [5] Source/WebCore/ChangeLog:8: Line contains tab character. [whitespace/tab] [5] Source/WebCore/ChangeLog:12: Line contains tab character. [whitespace/tab] [5] Source/WebCore/ChangeLog:14: Line contains tab character. [whitespace/tab] [5] Source/WebCore/ChangeLog:15: Line contains tab character. [whitespace/tab] [5] Source/WebCore/ChangeLog:16: Line contains tab character. [whitespace/tab] [5] Source/WebCore/ChangeLog:18: Line contains tab character. [whitespace/tab] [5] Total errors found: 18 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Stephen Chenney
Comment 5
2011-06-01 15:48:00 PDT
Created
attachment 95678
[details]
Patch for
Bug 39733
, 2nd attempt Removing tabs from ChangeLog files.
Stephen Chenney
Comment 6
2011-06-07 15:06:07 PDT
Comment on
attachment 95678
[details]
Patch for
Bug 39733
, 2nd attempt I'm withdrawing this, as I am not confident it will work in cases where there is a divisible item within the block.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug