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

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

Issue 15991003: Avoid redundant ceilToFloat call in RenderBlock (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: ceiledTextIndent Created 7 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index 4fb18ae38445fed58ec5701636c9a413af8f1000..bb94740f4847ddfbe12d55cb44c1d5f3d57e29af 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -6066,11 +6066,10 @@ void RenderBlock::computeInlinePreferredLogicalWidths(LayoutUnit& minLogicalWidt
}
// Add in text-indent. This is added in only once.
- LayoutUnit ti = 0;
if (!addedTextIndent && !child->isFloating()) {
- ti = textIndent;
- childMin += ti.ceilToFloat();
- childMax += ti.ceilToFloat();
+ float ceiledTextIndent = textIndent.ceilToFloat();
+ childMin += ceiledTextIndent;
+ childMax += ceiledTextIndent;
if (childMin < 0)
textIndent = adjustFloatForSubPixelLayout(childMin);
« 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