Title: [109438] branches/subpixellayout/Source/WebCore/rendering
Revision
109438
Author
[email protected]
Date
2012-03-01 14:58:26 -0800 (Thu, 01 Mar 2012)

Log Message

Cleaning up some InlineFlowBox cruft and using static casts instead of explicit wrapping.

Modified Paths

Diff

Modified: branches/subpixellayout/Source/WebCore/rendering/InlineFlowBox.cpp (109437 => 109438)


--- branches/subpixellayout/Source/WebCore/rendering/InlineFlowBox.cpp	2012-03-01 22:57:34 UTC (rev 109437)
+++ branches/subpixellayout/Source/WebCore/rendering/InlineFlowBox.cpp	2012-03-01 22:58:26 UTC (rev 109438)
@@ -587,8 +587,7 @@
     bool isRootBox = isRootInlineBox();
     if (isRootBox) {
         const FontMetrics& fontMetrics = renderer()->style(m_firstLine)->fontMetrics();
-        LayoutUnit textTop = top + maxAscent - fontMetrics.ascent(baselineType);
-        setLogicalTop(textTop.toInt());
+        setLogicalTop(top + maxAscent - fontMetrics.ascent(baselineType));
     }
 
     LayoutUnit adjustmentForChildrenWithSameLineHeightAndBaseline = 0;
@@ -1119,8 +1118,8 @@
         }
         LayoutUnit stripX = rect.x() - (isHorizontal() ? logicalOffsetOnLine : zeroLayoutUnit);
         LayoutUnit stripY = rect.y() - (isHorizontal() ? zeroLayoutUnit : logicalOffsetOnLine);
-        LayoutUnit stripWidth = isHorizontal() ? totalLogicalWidth : LayoutUnit(width());
-        LayoutUnit stripHeight = isHorizontal() ? LayoutUnit(height()) : totalLogicalWidth;
+        LayoutUnit stripWidth = isHorizontal() ? totalLogicalWidth : static_cast<LayoutUnit>(width());
+        LayoutUnit stripHeight = isHorizontal() ? static_cast<LayoutUnit>(height()) : totalLogicalWidth;
 
         GraphicsContextStateSaver stateSaver(*paintInfo.context);
         paintInfo.context->clip(LayoutRect(rect.x(), rect.y(), width(), height()));

Modified: branches/subpixellayout/Source/WebCore/rendering/InlineFlowBox.h (109437 => 109438)


--- branches/subpixellayout/Source/WebCore/rendering/InlineFlowBox.h	2012-03-01 22:57:34 UTC (rev 109437)
+++ branches/subpixellayout/Source/WebCore/rendering/InlineFlowBox.h	2012-03-01 22:58:26 UTC (rev 109438)
@@ -207,8 +207,8 @@
     { 
         return m_overflow ? m_overflow->layoutOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
     }
-    LayoutUnit logicalLeftLayoutOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->minXLayoutOverflow() : m_overflow->minYLayoutOverflow()).toFloat() : logicalLeft(); }
-    LayoutUnit logicalRightLayoutOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->maxXLayoutOverflow() : m_overflow->maxYLayoutOverflow()).toFloat() : ceilf(logicalRight()); }
+    LayoutUnit logicalLeftLayoutOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->minXLayoutOverflow() : m_overflow->minYLayoutOverflow()) : static_cast<LayoutUnit>(logicalLeft()); }
+    LayoutUnit logicalRightLayoutOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->maxXLayoutOverflow() : m_overflow->maxYLayoutOverflow()) : static_cast<LayoutUnit>(ceilf(logicalRight())); }
     LayoutUnit logicalTopLayoutOverflow(LayoutUnit lineTop) const
     {
         if (m_overflow)
@@ -233,8 +233,8 @@
     { 
         return m_overflow ? m_overflow->visualOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
     }
-    LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->minXVisualOverflow() : m_overflow->minYVisualOverflow()).toFloat() : logicalLeft(); }
-    LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->maxXVisualOverflow() : m_overflow->maxYVisualOverflow()).toFloat() : ceilf(logicalRight()); }
+    LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->minXVisualOverflow() : m_overflow->minYVisualOverflow()) : static_cast<LayoutUnit>(logicalLeft()); }
+    LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->maxXVisualOverflow() : m_overflow->maxYVisualOverflow()) : static_cast<LayoutUnit>(ceilf(logicalRight())); }
     LayoutUnit logicalTopVisualOverflow(LayoutUnit lineTop) const
     {
         if (m_overflow)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to