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

Unified Diff: Source/core/layout/line/InlineFlowBox.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/layout/LayoutBlockFlowLine.cpp ('k') | Source/core/layout/line/InlineTextBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/line/InlineFlowBox.cpp
diff --git a/Source/core/layout/line/InlineFlowBox.cpp b/Source/core/layout/line/InlineFlowBox.cpp
index 13c8834f4809b7ce77dbb16bfc4fc0ab99431206..fed97415ee52bb4031c3147dd4cc040652c5fa66 100644
--- a/Source/core/layout/line/InlineFlowBox.cpp
+++ b/Source/core/layout/line/InlineFlowBox.cpp
@@ -537,7 +537,7 @@ void InlineFlowBox::computeLogicalBoxHeights(RootInlineBox* rootBox, LayoutUnit&
// The verticalPositionForBox function returns the distance between the child box's baseline
// and the root box's baseline. The value is negative if the child box's baseline is above the
// root box's baseline, and it is positive if the child box's baseline is below the root box's baseline.
- curr->setLogicalTop(rootBox->verticalPositionForBox(curr, verticalPositionCache).toFloat());
+ curr->setLogicalTop(rootBox->verticalPositionForBox(curr, verticalPositionCache));
int ascent = 0;
int descent = 0;
@@ -597,16 +597,16 @@ void InlineFlowBox::placeBoxesInBlockDirection(LayoutUnit top, LayoutUnit maxHei
continue; // Positioned placeholders don't affect calculations.
if (descendantsHaveSameLineHeightAndBaseline()) {
- curr->moveInBlockDirection(adjustmentForChildrenWithSameLineHeightAndBaseline.toFloat());
+ curr->moveInBlockDirection(adjustmentForChildrenWithSameLineHeightAndBaseline);
continue;
}
InlineFlowBox* inlineFlowBox = curr->isInlineFlowBox() ? toInlineFlowBox(curr) : nullptr;
bool childAffectsTopBottomPos = true;
if (curr->verticalAlign() == TOP) {
- curr->setLogicalTop(top.toFloat());
+ curr->setLogicalTop(top);
} else if (curr->verticalAlign() == BOTTOM) {
- curr->setLogicalTop((top + maxHeight - curr->lineHeight()).toFloat());
+ curr->setLogicalTop((top + maxHeight - curr->lineHeight()));
} else {
if (!strictMode && inlineFlowBox && !inlineFlowBox->hasTextChildren() && !curr->boxModelObject()->hasInlineDirectionBordersOrPadding()
&& !(inlineFlowBox->descendantsHaveSameLineHeightAndBaseline() && inlineFlowBox->hasTextDescendants()))
@@ -639,7 +639,7 @@ void InlineFlowBox::placeBoxesInBlockDirection(LayoutUnit top, LayoutUnit maxHei
boxHeightIncludingMargins += overSideMargin + underSideMargin;
}
- curr->setLogicalTop(newLogicalTop.toFloat());
+ curr->setLogicalTop(newLogicalTop);
if (childAffectsTopBottomPos) {
if (curr->layoutObject().isRubyRun()) {
« no previous file with comments | « Source/core/layout/LayoutBlockFlowLine.cpp ('k') | Source/core/layout/line/InlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698