<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[164697] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/164697">164697</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2014-02-25 22:23:03 -0800 (Tue, 25 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Subpixel layout: Remove explicit static_cast&lt;LayoutUnit&gt; conversions.
https://bugs.webkit.org/show_bug.cgi?id=129359

Reviewed by Simon Fraser.

No testable change in behavior.

* css/LengthFunctions.cpp:
(WebCore::minimumValueForLength):
* page/FrameView.cpp:
(WebCore::FrameView::forceLayoutForPagination):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paintFillLayer):
* rendering/InlineFlowBox.h:
(WebCore::InlineFlowBox::logicalLeftVisualOverflow):
(WebCore::InlineFlowBox::logicalRightVisualOverflow):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::isSelected):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeColumnCountAndWidth):
(WebCore::getBPMWidth):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustForBorderFit):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::paintBoxDecorations):
* rendering/RenderTable.h:
(WebCore::RenderTable::borderSpacingInRowDirection):
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::beforeAnnotationsAdjustment):
(WebCore::RootInlineBox::ascentAndDescentForBox):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::resolveLengthAttributeForSVG):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssLengthFunctionscpp">trunk/Source/WebCore/css/LengthFunctions.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineFlowBoxcpp">trunk/Source/WebCore/rendering/InlineFlowBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineFlowBoxh">trunk/Source/WebCore/rendering/InlineFlowBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineTextBoxcpp">trunk/Source/WebCore/rendering/InlineTextBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowcpp">trunk/Source/WebCore/rendering/RenderBlockFlow.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderDeprecatedFlexibleBoxcpp">trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderFieldsetcpp">trunk/Source/WebCore/rendering/RenderFieldset.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTableh">trunk/Source/WebCore/rendering/RenderTable.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTextControlMultiLinecpp">trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTextControlSingleLinecpp">trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRootInlineBoxcpp">trunk/Source/WebCore/rendering/RootInlineBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGRootcpp">trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (164696 => 164697)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-26 06:01:23 UTC (rev 164696)
+++ trunk/Source/WebCore/ChangeLog        2014-02-26 06:23:03 UTC (rev 164697)
</span><span class="lines">@@ -1,3 +1,44 @@
</span><ins>+2014-02-25  Zalan Bujtas  &lt;zalan@apple.com&gt;
+
+        Subpixel layout: Remove explicit static_cast&lt;LayoutUnit&gt; conversions.
+        https://bugs.webkit.org/show_bug.cgi?id=129359
+
+        Reviewed by Simon Fraser.
+
+        No testable change in behavior.
+
+        * css/LengthFunctions.cpp:
+        (WebCore::minimumValueForLength):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::forceLayoutForPagination):
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::paintFillLayer):
+        * rendering/InlineFlowBox.h:
+        (WebCore::InlineFlowBox::logicalLeftVisualOverflow):
+        (WebCore::InlineFlowBox::logicalRightVisualOverflow):
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::isSelected):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::computeColumnCountAndWidth):
+        (WebCore::getBPMWidth):
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::adjustForBorderFit):
+        * rendering/RenderDeprecatedFlexibleBox.cpp:
+        (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
+        * rendering/RenderFieldset.cpp:
+        (WebCore::RenderFieldset::paintBoxDecorations):
+        * rendering/RenderTable.h:
+        (WebCore::RenderTable::borderSpacingInRowDirection):
+        * rendering/RenderTextControlMultiLine.cpp:
+        (WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
+        * rendering/RenderTextControlSingleLine.cpp:
+        (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
+        * rendering/RootInlineBox.cpp:
+        (WebCore::RootInlineBox::beforeAnnotationsAdjustment):
+        (WebCore::RootInlineBox::ascentAndDescentForBox):
+        * rendering/svg/RenderSVGRoot.cpp:
+        (WebCore::resolveLengthAttributeForSVG):
+
</ins><span class="cx"> 2014-02-25  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Build fixes.
</span></span></pre></div>
<a id="trunkSourceWebCorecssLengthFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/LengthFunctions.cpp (164696 => 164697)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/LengthFunctions.cpp        2014-02-26 06:01:23 UTC (rev 164696)
+++ trunk/Source/WebCore/css/LengthFunctions.cpp        2014-02-26 06:23:03 UTC (rev 164697)
</span><span class="lines">@@ -47,29 +47,29 @@
</span><span class="cx">         return length.value();
</span><span class="cx">     case Percent:
</span><span class="cx">         if (roundPercentages)
</span><del>-            return static_cast&lt;LayoutUnit&gt;(round(maximumValue * length.percent() / 100.0f));
</del><ins>+            return LayoutUnit(round(maximumValue * length.percent() / 100.0f));
</ins><span class="cx">         // Don't remove the extra cast to float. It is needed for rounding on 32-bit Intel machines that use the FPU stack.
</span><del>-        return static_cast&lt;LayoutUnit&gt;(static_cast&lt;float&gt;(maximumValue * length.percent() / 100.0f));
</del><ins>+        return LayoutUnit(static_cast&lt;float&gt;(maximumValue * length.percent() / 100.0f));
</ins><span class="cx">     case Calculated:
</span><span class="cx">         return length.nonNanCalculatedValue(maximumValue);
</span><span class="cx">     case ViewportPercentageWidth:
</span><span class="cx">         if (renderView)
</span><del>-            return static_cast&lt;LayoutUnit&gt;(renderView-&gt;viewportSize().width() * length.viewportPercentageLength() / 100.0f);
</del><ins>+            return LayoutUnit(renderView-&gt;viewportSize().width() * length.viewportPercentageLength() / 100.0f);
</ins><span class="cx">         return 0;
</span><span class="cx">     case ViewportPercentageHeight:
</span><span class="cx">         if (renderView)
</span><del>-            return static_cast&lt;LayoutUnit&gt;(renderView-&gt;viewportSize().height() * length.viewportPercentageLength() / 100.0f);
</del><ins>+            return LayoutUnit(renderView-&gt;viewportSize().height() * length.viewportPercentageLength() / 100.0f);
</ins><span class="cx">         return 0;
</span><span class="cx">     case ViewportPercentageMin:
</span><span class="cx">         if (renderView) {
</span><span class="cx">             IntSize viewportSize = renderView-&gt;viewportSize();
</span><del>-            return static_cast&lt;LayoutUnit&gt;(std::min(viewportSize.width(), viewportSize.height()) * length.viewportPercentageLength() / 100.0f);
</del><ins>+            return LayoutUnit(std::min(viewportSize.width(), viewportSize.height()) * length.viewportPercentageLength() / 100.0f);
</ins><span class="cx">         }
</span><span class="cx">         return 0;
</span><span class="cx">     case ViewportPercentageMax:
</span><span class="cx">         if (renderView) {
</span><span class="cx">             IntSize viewportSize = renderView-&gt;viewportSize();
</span><del>-            return static_cast&lt;LayoutUnit&gt;(std::max(viewportSize.width(), viewportSize.height()) * length.viewportPercentageLength() / 100.0f);
</del><ins>+            return LayoutUnit(std::max(viewportSize.width(), viewportSize.height()) * length.viewportPercentageLength() / 100.0f);
</ins><span class="cx">         }
</span><span class="cx">         return 0;
</span><span class="cx">     case FillAvailable:
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (164696 => 164697)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-02-26 06:01:23 UTC (rev 164696)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-02-26 06:23:03 UTC (rev 164697)
</span><span class="lines">@@ -3730,10 +3730,8 @@
</span><span class="cx">         float pageLogicalWidth = renderView-&gt;style().isHorizontalWritingMode() ? pageSize.width() : pageSize.height();
</span><span class="cx">         float pageLogicalHeight = renderView-&gt;style().isHorizontalWritingMode() ? pageSize.height() : pageSize.width();
</span><span class="cx"> 
</span><del>-        LayoutUnit flooredPageLogicalWidth = static_cast&lt;LayoutUnit&gt;(pageLogicalWidth);
-        LayoutUnit flooredPageLogicalHeight = static_cast&lt;LayoutUnit&gt;(pageLogicalHeight);
-        renderView-&gt;setLogicalWidth(flooredPageLogicalWidth);
-        renderView-&gt;setPageLogicalHeight(flooredPageLogicalHeight);
</del><ins>+        renderView-&gt;setLogicalWidth(floor(pageLogicalWidth));
+        renderView-&gt;setPageLogicalHeight(floor(pageLogicalHeight));
</ins><span class="cx">         renderView-&gt;setNeedsLayoutAndPrefWidthsRecalc();
</span><span class="cx">         forceLayout();
</span><span class="cx"> 
</span><span class="lines">@@ -3751,10 +3749,8 @@
</span><span class="cx">             pageLogicalWidth = horizontalWritingMode ? maxPageSize.width() : maxPageSize.height();
</span><span class="cx">             pageLogicalHeight = horizontalWritingMode ? maxPageSize.height() : maxPageSize.width();
</span><span class="cx"> 
</span><del>-            flooredPageLogicalWidth = static_cast&lt;LayoutUnit&gt;(pageLogicalWidth);
-            flooredPageLogicalHeight = static_cast&lt;LayoutUnit&gt;(pageLogicalHeight);
-            renderView-&gt;setLogicalWidth(flooredPageLogicalWidth);
-            renderView-&gt;setPageLogicalHeight(flooredPageLogicalHeight);
</del><ins>+            renderView-&gt;setLogicalWidth(floor(pageLogicalWidth));
+            renderView-&gt;setPageLogicalHeight(floor(pageLogicalHeight));
</ins><span class="cx">             renderView-&gt;setNeedsLayoutAndPrefWidthsRecalc();
</span><span class="cx">             forceLayout();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineFlowBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineFlowBox.cpp (164696 => 164697)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineFlowBox.cpp        2014-02-26 06:01:23 UTC (rev 164696)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.cpp        2014-02-26 06:23:03 UTC (rev 164697)
</span><span class="lines">@@ -1218,8 +1218,8 @@
</span><span class="cx">         }
</span><span class="cx">         LayoutUnit stripX = rect.x() - (isHorizontal() ? logicalOffsetOnLine : LayoutUnit());
</span><span class="cx">         LayoutUnit stripY = rect.y() - (isHorizontal() ? LayoutUnit() : logicalOffsetOnLine);
</span><del>-        LayoutUnit stripWidth = isHorizontal() ? totalLogicalWidth : static_cast&lt;LayoutUnit&gt;(width());
-        LayoutUnit stripHeight = isHorizontal() ? static_cast&lt;LayoutUnit&gt;(height()) : totalLogicalWidth;
</del><ins>+        LayoutUnit stripWidth = isHorizontal() ? totalLogicalWidth : LayoutUnit(width());
+        LayoutUnit stripHeight = isHorizontal() ? LayoutUnit(height()) : totalLogicalWidth;
</ins><span class="cx"> 
</span><span class="cx">         GraphicsContextStateSaver stateSaver(*paintInfo.context);
</span><span class="cx">         paintInfo.context-&gt;clip(LayoutRect(rect.x(), rect.y(), width(), height()));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineFlowBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineFlowBox.h (164696 => 164697)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineFlowBox.h        2014-02-26 06:01:23 UTC (rev 164696)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.h        2014-02-26 06:23:03 UTC (rev 164697)
</span><span class="lines">@@ -248,8 +248,8 @@
</span><span class="cx">     { 
</span><span class="cx">         return m_overflow ? m_overflow-&gt;visualOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
</span><span class="cx">     }
</span><del>-    LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow-&gt;visualOverflowRect().x() : m_overflow-&gt;visualOverflowRect().y()) : static_cast&lt;LayoutUnit&gt;(logicalLeft()); }
-    LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow-&gt;visualOverflowRect().maxX() : m_overflow-&gt;visualOverflowRect().maxY()) : static_cast&lt;LayoutUnit&gt;(ceilf(logicalRight())); }
</del><ins>+    LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow-&gt;visualOverflowRect().x() : m_overflow-&gt;visualOverflowRect().y()) : LayoutUnit(logicalLeft()); }
+    LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow-&gt;visualOverflowRect().maxX() : m_overflow-&gt;visualOverflowRect().maxY()) : LayoutUnit(ceilf(logicalRight())); }
</ins><span class="cx">     LayoutUnit logicalTopVisualOverflow(LayoutUnit lineTop) const
</span><span class="cx">     {
</span><span class="cx">         if (m_overflow)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (164696 => 164697)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.cpp        2014-02-26 06:01:23 UTC (rev 164696)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp        2014-02-26 06:23:03 UTC (rev 164697)
</span><span class="lines">@@ -196,8 +196,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool InlineTextBox::isSelected(int startPos, int endPos) const
</span><span class="cx"> {
</span><del>-    LayoutUnit sPos = std::max&lt;LayoutUnit&gt;(startPos - m_start, 0);
-    LayoutUnit ePos = std::min&lt;LayoutUnit&gt;(endPos - m_start, m_len);
</del><ins>+    int sPos = std::max(startPos - m_start, 0);
+    int ePos = std::min(endPos - m_start, static_cast&lt;int&gt;(m_len));
</ins><span class="cx">     return (sPos &lt; ePos);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (164696 => 164697)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-02-26 06:01:23 UTC (rev 164696)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2014-02-26 06:23:03 UTC (rev 164697)
</span><span class="lines">@@ -3496,7 +3496,7 @@
</span><span class="cx">         
</span><span class="cx">     LayoutUnit availWidth = desiredColumnWidth;
</span><span class="cx">     LayoutUnit colGap = columnGap();
</span><del>-    LayoutUnit colWidth = std::max&lt;LayoutUnit&gt;(1, LayoutUnit(style().columnWidth()));
</del><ins>+    LayoutUnit colWidth = std::max&lt;LayoutUnit&gt;(LayoutUnit::fromPixel(1), LayoutUnit(style().columnWidth()));
</ins><span class="cx">     int colCount = std::max&lt;int&gt;(1, style().columnCount());
</span><span class="cx"> 
</span><span class="cx">     if (style().hasAutoColumnWidth() &amp;&amp; !style().hasAutoColumnCount()) {
</span><span class="lines">@@ -4008,7 +4008,7 @@
</span><span class="cx"> static LayoutUnit getBPMWidth(LayoutUnit childValue, Length cssUnit)
</span><span class="cx"> {
</span><span class="cx">     if (cssUnit.type() != Auto)
</span><del>-        return (cssUnit.isFixed() ? static_cast&lt;LayoutUnit&gt;(cssUnit.value()) : childValue);
</del><ins>+        return (cssUnit.isFixed() ? LayoutUnit(cssUnit.value()) : childValue);
</ins><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (164696 => 164697)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2014-02-26 06:01:23 UTC (rev 164696)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2014-02-26 06:23:03 UTC (rev 164697)
</span><span class="lines">@@ -2719,9 +2719,9 @@
</span><span class="cx"> 
</span><span class="cx">         for (auto box = firstRootBox(); box; box = box-&gt;nextRootBox()) {
</span><span class="cx">             if (box-&gt;firstChild())
</span><del>-                left = std::min(left, x + static_cast&lt;LayoutUnit&gt;(box-&gt;firstChild()-&gt;x()));
</del><ins>+                left = std::min(left, x + LayoutUnit(box-&gt;firstChild()-&gt;x()));
</ins><span class="cx">             if (box-&gt;lastChild())
</span><del>-                right = std::max(right, x + static_cast&lt;LayoutUnit&gt;(ceilf(box-&gt;lastChild()-&gt;logicalRight())));
</del><ins>+                right = std::max(right, x + LayoutUnit(ceilf(box-&gt;lastChild()-&gt;logicalRight())));
</ins><span class="cx">         }
</span><span class="cx">     } else {
</span><span class="cx">         for (RenderBox* obj = firstChildBox(); obj; obj = obj-&gt;nextSiblingBox()) {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderDeprecatedFlexibleBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (164696 => 164697)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp        2014-02-26 06:01:23 UTC (rev 164696)
+++ trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp        2014-02-26 06:23:03 UTC (rev 164697)
</span><span class="lines">@@ -833,7 +833,7 @@
</span><span class="cx">                     for (RenderBox* child = iterator.first(); child; child = iterator.next()) {
</span><span class="cx">                         LayoutUnit allowedFlex = allowedChildFlex(child, expanding, i);
</span><span class="cx">                         if (allowedFlex) {
</span><del>-                            LayoutUnit projectedFlex = (allowedFlex == LayoutUnit::max()) ? allowedFlex : static_cast&lt;LayoutUnit&gt;(allowedFlex * (totalFlex / child-&gt;style().boxFlex()));
</del><ins>+                            LayoutUnit projectedFlex = (allowedFlex == LayoutUnit::max()) ? allowedFlex : LayoutUnit(allowedFlex * (totalFlex / child-&gt;style().boxFlex()));
</ins><span class="cx">                             spaceAvailableThisPass = expanding ? std::min(spaceAvailableThisPass, projectedFlex) : std::max(spaceAvailableThisPass, projectedFlex);
</span><span class="cx">                         }
</span><span class="cx">                     }
</span><span class="lines">@@ -848,7 +848,7 @@
</span><span class="cx">                     // Now distribute the space to objects.
</span><span class="cx">                     for (RenderBox* child = iterator.first(); child &amp;&amp; spaceAvailableThisPass &amp;&amp; totalFlex; child = iterator.next()) {
</span><span class="cx">                         if (allowedChildFlex(child, expanding, i)) {
</span><del>-                            LayoutUnit spaceAdd = static_cast&lt;LayoutUnit&gt;(spaceAvailableThisPass * (child-&gt;style().boxFlex() / totalFlex));
</del><ins>+                            LayoutUnit spaceAdd = spaceAvailableThisPass * (child-&gt;style().boxFlex() / totalFlex);
</ins><span class="cx">                             if (spaceAdd) {
</span><span class="cx">                                 child-&gt;setOverrideLogicalContentHeight(contentHeightForChild(child) + spaceAdd);
</span><span class="cx">                                 flexingChildren = true;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderFieldsetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderFieldset.cpp (164696 => 164697)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderFieldset.cpp        2014-02-26 06:01:23 UTC (rev 164696)
+++ trunk/Source/WebCore/rendering/RenderFieldset.cpp        2014-02-26 06:23:03 UTC (rev 164697)
</span><span class="lines">@@ -176,11 +176,11 @@
</span><span class="cx">     // https://bugs.webkit.org/show_bug.cgi?id=47236
</span><span class="cx">     if (style().isHorizontalWritingMode()) {
</span><span class="cx">         LayoutUnit clipTop = paintRect.y();
</span><del>-        LayoutUnit clipHeight = std::max(static_cast&lt;LayoutUnit&gt;(style().borderTopWidth()), legend-&gt;height() - ((legend-&gt;height() - borderTop()) / 2));
</del><ins>+        LayoutUnit clipHeight = std::max&lt;LayoutUnit&gt;(style().borderTopWidth(), legend-&gt;height() - ((legend-&gt;height() - borderTop()) / 2));
</ins><span class="cx">         graphicsContext-&gt;clipOut(pixelSnappedIntRect(paintRect.x() + legend-&gt;x(), clipTop, legend-&gt;width(), clipHeight));
</span><span class="cx">     } else {
</span><span class="cx">         LayoutUnit clipLeft = paintRect.x();
</span><del>-        LayoutUnit clipWidth = std::max(static_cast&lt;LayoutUnit&gt;(style().borderLeftWidth()), legend-&gt;width());
</del><ins>+        LayoutUnit clipWidth = std::max&lt;LayoutUnit&gt;(style().borderLeftWidth(), legend-&gt;width());
</ins><span class="cx">         graphicsContext-&gt;clipOut(pixelSnappedIntRect(clipLeft, paintRect.y() + legend-&gt;y(), clipWidth, legend-&gt;height()));
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTableh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTable.h (164696 => 164697)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTable.h        2014-02-26 06:01:23 UTC (rev 164696)
+++ trunk/Source/WebCore/rendering/RenderTable.h        2014-02-26 06:23:03 UTC (rev 164697)
</span><span class="lines">@@ -191,7 +191,7 @@
</span><span class="cx">     LayoutUnit borderSpacingInRowDirection() const
</span><span class="cx">     {
</span><span class="cx">         if (unsigned effectiveColumnCount = numEffCols())
</span><del>-            return static_cast&lt;LayoutUnit&gt;(effectiveColumnCount + 1) * hBorderSpacing();
</del><ins>+            return (effectiveColumnCount + 1) * hBorderSpacing();
</ins><span class="cx"> 
</span><span class="cx">         return 0;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextControlMultiLinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp (164696 => 164697)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp        2014-02-26 06:01:23 UTC (rev 164696)
+++ trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp        2014-02-26 06:23:03 UTC (rev 164697)
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx"> 
</span><span class="cx"> LayoutUnit RenderTextControlMultiLine::preferredContentLogicalWidth(float charWidth) const
</span><span class="cx"> {
</span><del>-    return static_cast&lt;LayoutUnit&gt;(ceilf(charWidth * textAreaElement().cols())) + scrollbarThickness();
</del><ins>+    return ceilf(charWidth * textAreaElement().cols()) + scrollbarThickness();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> LayoutUnit RenderTextControlMultiLine::computeControlLogicalHeight(LayoutUnit lineHeight, LayoutUnit nonContentHeight) const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextControlSingleLinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp (164696 => 164697)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp        2014-02-26 06:01:23 UTC (rev 164696)
+++ trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp        2014-02-26 06:23:03 UTC (rev 164697)
</span><span class="lines">@@ -333,7 +333,7 @@
</span><span class="cx">     if (factor &lt;= 0)
</span><span class="cx">         factor = 20;
</span><span class="cx"> 
</span><del>-    LayoutUnit result = static_cast&lt;LayoutUnit&gt;(ceiledLayoutUnit(charWidth * factor));
</del><ins>+    LayoutUnit result = ceiledLayoutUnit(charWidth * factor);
</ins><span class="cx"> 
</span><span class="cx">     float maxCharWidth = 0.f;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRootInlineBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RootInlineBox.cpp (164696 => 164697)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RootInlineBox.cpp        2014-02-26 06:01:23 UTC (rev 164696)
+++ trunk/Source/WebCore/rendering/RootInlineBox.cpp        2014-02-26 06:23:03 UTC (rev 164697)
</span><span class="lines">@@ -324,12 +324,12 @@
</span><span class="cx">             return result;
</span><span class="cx"> 
</span><span class="cx">         // Annotations over this line may push us further down.
</span><del>-        LayoutUnit highestAllowedPosition = prevRootBox() ? std::min(prevRootBox()-&gt;lineBottom(), lineTop()) + result : static_cast&lt;LayoutUnit&gt;(blockFlow().borderBefore());
</del><ins>+        LayoutUnit highestAllowedPosition = prevRootBox() ? std::min(prevRootBox()-&gt;lineBottom(), lineTop()) + result : blockFlow().borderBefore();
</ins><span class="cx">         result = computeOverAnnotationAdjustment(highestAllowedPosition);
</span><span class="cx">     } else {
</span><span class="cx">         // Annotations under this line may push us up.
</span><span class="cx">         if (hasAnnotationsBefore())
</span><del>-            result = computeUnderAnnotationAdjustment(prevRootBox() ? prevRootBox()-&gt;lineBottom() : static_cast&lt;LayoutUnit&gt;(blockFlow().borderBefore()));
</del><ins>+            result = computeUnderAnnotationAdjustment(prevRootBox() ? prevRootBox()-&gt;lineBottom() : blockFlow().borderBefore());
</ins><span class="cx"> 
</span><span class="cx">         if (!prevRootBox() || !prevRootBox()-&gt;hasAnnotationsAfter())
</span><span class="cx">             return result;
</span><span class="lines">@@ -954,7 +954,7 @@
</span><span class="cx">         else if (verticalAlign == TEXT_TOP)
</span><span class="cx">             verticalPosition += renderer-&gt;baselinePosition(baselineType(), firstLine, lineDirection) - fontMetrics.ascent(baselineType());
</span><span class="cx">         else if (verticalAlign == MIDDLE)
</span><del>-            verticalPosition = (verticalPosition - static_cast&lt;LayoutUnit&gt;(fontMetrics.xHeight() / 2) - renderer-&gt;lineHeight(firstLine, lineDirection) / 2 + renderer-&gt;baselinePosition(baselineType(), firstLine, lineDirection)).round();
</del><ins>+            verticalPosition = (verticalPosition - LayoutUnit(fontMetrics.xHeight() / 2) - renderer-&gt;lineHeight(firstLine, lineDirection) / 2 + renderer-&gt;baselinePosition(baselineType(), firstLine, lineDirection)).round();
</ins><span class="cx">         else if (verticalAlign == TEXT_BOTTOM) {
</span><span class="cx">             verticalPosition += fontMetrics.descent(baselineType());
</span><span class="cx">             // lineHeight - baselinePosition is always 0 for replaced elements (except inline blocks), so don't bother wasting time in that case.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGRootcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (164696 => 164697)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp        2014-02-26 06:01:23 UTC (rev 164696)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp        2014-02-26 06:23:03 UTC (rev 164697)
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx"> 
</span><span class="cx"> static inline LayoutUnit resolveLengthAttributeForSVG(const Length&amp; length, float scale, float maxSize, RenderView* renderView)
</span><span class="cx"> {
</span><del>-    return static_cast&lt;LayoutUnit&gt;(valueForLength(length, maxSize, renderView) * (length.isFixed() ? scale : 1));
</del><ins>+    return valueForLength(length, maxSize, renderView) * (length.isFixed() ? scale : 1);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> LayoutUnit RenderSVGRoot::computeReplacedLogicalWidth(ShouldComputePreferred shouldComputePreferred) const
</span></span></pre>
</div>
</div>

</body>
</html>