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

Unified Diff: Source/core/rendering/InlineBox.cpp

Issue 699683002: Continue with InlineBox float->LayoutUnit migration. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nit Created 6 years, 1 month 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/rendering/InlineBox.h ('k') | Source/core/rendering/InlineFlowBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/InlineBox.cpp
diff --git a/Source/core/rendering/InlineBox.cpp b/Source/core/rendering/InlineBox.cpp
index 362384ccf7319ac7b2fe91ba36eafbd33db59226..910b0019bc40ee9bd0d995960e822d859729be54 100644
--- a/Source/core/rendering/InlineBox.cpp
+++ b/Source/core/rendering/InlineBox.cpp
@@ -123,9 +123,9 @@ FloatWillBeLayoutUnit InlineBox::logicalHeight() const
return virtualLogicalHeight();
if (renderer().isText())
- return m_bitfields.isText() ? INT_TO_LAYOUT_UNIT(renderer().style(isFirstLineStyle())->fontMetrics().height()) : ZERO_LAYOUT_UNIT;
+ return m_bitfields.isText() ? renderer().style(isFirstLineStyle())->fontMetrics().height() : 0;
if (renderer().isBox() && parent())
- return isHorizontal() ? LAYOUT_UNIT_TO_FLOAT(toRenderBox(renderer()).height()) : LAYOUT_UNIT_TO_FLOAT(toRenderBox(renderer()).width());
+ return isHorizontal() ? toRenderBox(renderer()).height().toFloat() : toRenderBox(renderer()).width().toFloat();
ASSERT(isInlineFlowBox());
RenderBoxModelObject* flowObject = boxModelObject();
@@ -296,7 +296,7 @@ FloatWillBeLayoutUnit InlineBox::placeEllipsisBox(bool, FloatWillBeLayoutUnit, F
{
// Use -1 to mean "we didn't set the position."
truncatedWidth += logicalWidth();
- return MINUS_ONE_LAYOUT_UNIT;
+ return -1;
}
void InlineBox::clearKnownToHaveNoOverflow()
« no previous file with comments | « Source/core/rendering/InlineBox.h ('k') | Source/core/rendering/InlineFlowBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698