Remove redundant calls to ceilToFloat in RenderBlock::computeInlinePreferredLogicalWidths
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jun 2013 18:22:28 +0000 (18:22 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jun 2013 18:22:28 +0000 (18:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=117490

Reviewed by Andreas Kling.

Merge https://chromium.googlesource.com/chromium/blink/+/be336b14325b2938ff6a4fb6191073a6e717a57c.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151445 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp

index ad8c05e..26ccd15 100644 (file)
@@ -1,3 +1,15 @@
+2013-06-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Remove redundant calls to ceilToFloat in RenderBlock::computeInlinePreferredLogicalWidths
+        https://bugs.webkit.org/show_bug.cgi?id=117490
+
+        Reviewed by Andreas Kling.
+
+        Merge https://chromium.googlesource.com/chromium/blink/+/be336b14325b2938ff6a4fb6191073a6e717a57c.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
+
 2013-06-03  Robert Hogan  <robert@webkit.org>
 
         Painting collapsed borders during scrolling
index fab69a8..0fb77ad 100644 (file)
@@ -6193,11 +6193,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();
+                    LayoutUnit ceiledIndent = textIndent.ceilToFloat();
+                    childMin += cailedIndent;
+                    childMax += cailedIndent;
 
                     if (childMin < 0)
                         textIndent = adjustFloatForSubPixelLayout(childMin);