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

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

Issue 1043643002: Switch line layout to LayoutUnit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More TestExpectations tweaks Created 5 years, 7 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/LayoutRubyBase.h ('k') | Source/core/layout/LayoutRubyText.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutRubyBase.cpp
diff --git a/Source/core/layout/LayoutRubyBase.cpp b/Source/core/layout/LayoutRubyBase.cpp
index ec3f8690906ddcdf7cafd41e7406f254f401f02e..15536ded2c2b4077b74930fe3bd06a2dfa0c0240 100644
--- a/Source/core/layout/LayoutRubyBase.cpp
+++ b/Source/core/layout/LayoutRubyBase.cpp
@@ -134,14 +134,14 @@ ETextAlign LayoutRubyBase::textAlignmentForLine(bool /* endsWithSoftBreak */) co
return JUSTIFY;
}
-void LayoutRubyBase::adjustInlineDirectionLineBounds(unsigned expansionOpportunityCount, float& logicalLeft, float& logicalWidth) const
+void LayoutRubyBase::adjustInlineDirectionLineBounds(unsigned expansionOpportunityCount, LayoutUnit& logicalLeft, LayoutUnit& logicalWidth) const
{
int maxPreferredLogicalWidth = this->maxPreferredLogicalWidth();
if (maxPreferredLogicalWidth >= logicalWidth)
return;
// Inset the ruby base by half the inter-ideograph expansion amount.
- float inset = (logicalWidth - maxPreferredLogicalWidth) / (expansionOpportunityCount + 1);
+ LayoutUnit inset = (logicalWidth - maxPreferredLogicalWidth) / (expansionOpportunityCount + 1);
logicalLeft += inset / 2;
logicalWidth -= inset;
« no previous file with comments | « Source/core/layout/LayoutRubyBase.h ('k') | Source/core/layout/LayoutRubyText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698