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

Side by Side Diff: Source/core/rendering/RootInlineBox.cpp

Issue 200053007: Documents with many lines overallocated pagination info. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 bool hasAnnotationsBefore = false; 242 bool hasAnnotationsBefore = false;
243 bool hasAnnotationsAfter = false; 243 bool hasAnnotationsAfter = false;
244 placeBoxesInBlockDirection(heightOfBlock, maxHeight, maxAscent, noQuirksMode , lineTop, lineBottom, setLineTop, 244 placeBoxesInBlockDirection(heightOfBlock, maxHeight, maxAscent, noQuirksMode , lineTop, lineBottom, setLineTop,
245 lineTopIncludingMargins, lineBottomIncludingMargi ns, hasAnnotationsBefore, hasAnnotationsAfter, baselineType()); 245 lineTopIncludingMargins, lineBottomIncludingMargi ns, hasAnnotationsBefore, hasAnnotationsAfter, baselineType());
246 m_hasAnnotationsBefore = hasAnnotationsBefore; 246 m_hasAnnotationsBefore = hasAnnotationsBefore;
247 m_hasAnnotationsAfter = hasAnnotationsAfter; 247 m_hasAnnotationsAfter = hasAnnotationsAfter;
248 248
249 maxHeight = max<LayoutUnit>(0, maxHeight); // FIXME: Is this really necessar y? 249 maxHeight = max<LayoutUnit>(0, maxHeight); // FIXME: Is this really necessar y?
250 250
251 setLineTopBottomPositions(lineTop, lineBottom, heightOfBlock, heightOfBlock + maxHeight); 251 setLineTopBottomPositions(lineTop, lineBottom, heightOfBlock, heightOfBlock + maxHeight);
252 setPaginatedLineWidth(block().availableLogicalWidthForContent()); 252 bool paginated = block().view()->layoutState() && block().view()->layoutStat e()->isPaginated();
leviw_travelin_and_unemployed 2014/03/20 18:05:38 If there's no LayoutState, this logic doesn't seem
leviw_travelin_and_unemployed 2014/03/20 18:41:26 So thinking about this more, we should never be in
Daniel Bratell 2014/03/21 10:33:16 Done.
253 if (paginated)
254 setPaginatedLineWidth(block().availableLogicalWidthForContent());
253 255
254 LayoutUnit annotationsAdjustment = beforeAnnotationsAdjustment(); 256 LayoutUnit annotationsAdjustment = beforeAnnotationsAdjustment();
255 if (annotationsAdjustment) { 257 if (annotationsAdjustment) {
256 // FIXME: Need to handle pagination here. We might have to move to the n ext page/column as a result of the 258 // FIXME: Need to handle pagination here. We might have to move to the n ext page/column as a result of the
257 // ruby expansion. 259 // ruby expansion.
258 adjustBlockDirectionPosition(annotationsAdjustment.toFloat()); 260 adjustBlockDirectionPosition(annotationsAdjustment.toFloat());
259 heightOfBlock += annotationsAdjustment; 261 heightOfBlock += annotationsAdjustment;
260 } 262 }
261 263
262 return heightOfBlock + maxHeight; 264 return heightOfBlock + maxHeight;
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 } 873 }
872 874
873 #ifndef NDEBUG 875 #ifndef NDEBUG
874 const char* RootInlineBox::boxName() const 876 const char* RootInlineBox::boxName() const
875 { 877 {
876 return "RootInlineBox"; 878 return "RootInlineBox";
877 } 879 }
878 #endif 880 #endif
879 881
880 } // namespace WebCore 882 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698