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

Side by Side Diff: Source/core/layout/line/RootInlineBox.cpp

Issue 1228633002: Remove unnecessary LayoutUnit -> float -> LayoutUnit conversions. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/line/InlineTextBox.cpp ('k') | 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 m_hasAnnotationsAfter = hasAnnotationsAfter; 228 m_hasAnnotationsAfter = hasAnnotationsAfter;
229 229
230 maxHeight = std::max<LayoutUnit>(0, maxHeight); // FIXME: Is this really nec essary? 230 maxHeight = std::max<LayoutUnit>(0, maxHeight); // FIXME: Is this really nec essary?
231 231
232 setLineTopBottomPositions(lineTop, lineBottom, heightOfBlock, heightOfBlock + maxHeight, selectionBottom); 232 setLineTopBottomPositions(lineTop, lineBottom, heightOfBlock, heightOfBlock + maxHeight, selectionBottom);
233 233
234 LayoutUnit annotationsAdjustment = beforeAnnotationsAdjustment(); 234 LayoutUnit annotationsAdjustment = beforeAnnotationsAdjustment();
235 if (annotationsAdjustment) { 235 if (annotationsAdjustment) {
236 // FIXME: Need to handle pagination here. We might have to move to the n ext page/column as a result of the 236 // FIXME: Need to handle pagination here. We might have to move to the n ext page/column as a result of the
237 // ruby expansion. 237 // ruby expansion.
238 moveInBlockDirection(annotationsAdjustment.toFloat()); 238 moveInBlockDirection(annotationsAdjustment);
239 heightOfBlock += annotationsAdjustment; 239 heightOfBlock += annotationsAdjustment;
240 } 240 }
241 241
242 return heightOfBlock + maxHeight; 242 return heightOfBlock + maxHeight;
243 } 243 }
244 244
245 LayoutUnit RootInlineBox::maxLogicalTop() const 245 LayoutUnit RootInlineBox::maxLogicalTop() const
246 { 246 {
247 LayoutUnit maxLogicalTop; 247 LayoutUnit maxLogicalTop;
248 computeMaxLogicalTop(maxLogicalTop); 248 computeMaxLogicalTop(maxLogicalTop);
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 endBox = nullptr; 848 endBox = nullptr;
849 return nullptr; 849 return nullptr;
850 } 850 }
851 851
852 const char* RootInlineBox::boxName() const 852 const char* RootInlineBox::boxName() const
853 { 853 {
854 return "RootInlineBox"; 854 return "RootInlineBox";
855 } 855 }
856 856
857 } // namespace blink 857 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/line/InlineTextBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698