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

Unified Diff: Source/core/layout/LayoutBlockFlow.cpp

Issue 1236163002: Don't paginate lines that are taller than the column / page. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | « LayoutTests/fast/multicol/tall-line-in-short-block-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBlockFlow.cpp
diff --git a/Source/core/layout/LayoutBlockFlow.cpp b/Source/core/layout/LayoutBlockFlow.cpp
index 93c4967ebe1022c2efde2c5671861a14a9fe3b98..0ed2c2616d0c3ca7231948caeebd1d6c114f6652 100644
--- a/Source/core/layout/LayoutBlockFlow.cpp
+++ b/Source/core/layout/LayoutBlockFlow.cpp
@@ -778,6 +778,13 @@ void LayoutBlockFlow::adjustLinePositionForPagination(RootInlineBox& lineBox, La
LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset);
if (!pageLogicalHeight)
return;
+ if (lineHeight > pageLogicalHeight) {
+ // Too tall to fit in one page / column. Give up. Don't push to the next page / column.
+ // TODO(mstensho): Get rid of this. This is just utter weirdness, but the other browsers
+ // also do something slightly similar, although in much more specific cases than we do here,
+ // and printing Google Docs depends on it.
+ return;
+ }
LayoutUnit remainingLogicalHeight = pageRemainingLogicalHeightForOffset(logicalOffset, ExcludePageBoundary);
int lineIndex = lineCount(&lineBox);
« no previous file with comments | « LayoutTests/fast/multicol/tall-line-in-short-block-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698