Skip to content

Commit

Permalink
Merge pull request #394 from vivliostyle/chrome_print_bug
Browse files Browse the repository at this point in the history
Workaround for Chrome printing problem
  • Loading branch information
kwkbtr authored Nov 29, 2017
2 parents 72f1d7c + 46bd8e2 commit 52e907f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions resources/vivliostyle-viewport.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@
max-height: 100%;
}

/* Workaround for Chrome printing problem */
[data-vivliostyle-page-box] {
padding-bottom: 0 !important;
overflow: visible !important;
}

/* Gecko-only hack, see https://bugzilla.mozilla.org/show_bug.cgi?id=267029#c17 */
@-moz-document regexp('.*') {
[data-vivliostyle-page-container]:nth-last-child(n+2) {
Expand Down
2 changes: 1 addition & 1 deletion src/adapt/ops.js
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ adapt.ops.StyleInstance.prototype.layoutNextPage = function(page, cp) {
/** @type {!adapt.task.Frame.<adapt.vtree.LayoutPosition>} */ var frame
= adapt.task.newFrame("layoutNextPage");
frame.loopWithFrame(function(loopFrame) {
self.layoutContainer(page, pageMaster, page.bleedBox, bleedBoxPaddingEdge, bleedBoxPaddingEdge,
self.layoutContainer(page, pageMaster, page.bleedBox, bleedBoxPaddingEdge, bleedBoxPaddingEdge+1, // Compensate 'top: -1px' on page master
[], pageFloatLayoutContext).then(function() {
if (!pageFloatLayoutContext.isInvalidated()) {
pageFloatLayoutContext.finish();
Expand Down

0 comments on commit 52e907f

Please sign in to comment.