Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2298193002: Fragment blocks with non-visible overflow as normally when printing. (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/printing/overflow-auto-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 0dd84a95a5ef36fce829705d9844611ab5a2c578..c326481f5ba15bd0db0e278de0f2c1eb54600961 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -4265,6 +4265,12 @@ bool LayoutBox::hasUnsplittableScrollingOverflow() const
if ((isHorizontal && !scrollsOverflowY()) || (!isHorizontal && !scrollsOverflowX()))
return false;
+ // Fragmenting scrollbars is only problematic in interactive media, e.g. multicol on a
+ // screen. If we're printing, which is non-interactive media, we should allow objects with
+ // non-visible overflow to be paginated as normally.
+ if (document().printing())
+ return false;
+
// We do have overflow. We'll still be willing to paginate as long as the block
// has auto logical height, auto or undefined max-logical-height and a zero or auto min-logical-height.
// Note this is just a heuristic, and it's still possible to have overflow under these
« no previous file with comments | « third_party/WebKit/LayoutTests/printing/overflow-auto-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698