Title: [113603] branches/subpixellayout/Source/WebCore
Revision
113603
Author
[email protected]
Date
2012-04-09 12:06:15 -0700 (Mon, 09 Apr 2012)

Log Message

Using FractionalLayoutUnit instead of LayoutUnit for overloaded functions in Length, and using static_cast's in html/ValidationMessage.cpp so the changes can be landed in trunk.

Modified Paths

Diff

Modified: branches/subpixellayout/Source/WebCore/html/ValidationMessage.cpp (113602 => 113603)


--- branches/subpixellayout/Source/WebCore/html/ValidationMessage.cpp	2012-04-09 18:58:08 UTC (rev 113602)
+++ branches/subpixellayout/Source/WebCore/html/ValidationMessage.cpp	2012-04-09 19:06:15 UTC (rev 113603)
@@ -120,12 +120,12 @@
         hostY -= containerLocation.y() + container->borderTop();
     }
 
-    bubble->setInlineStyleProperty(CSSPropertyTop, hostY + hostRect.height().toFloat(), CSSPrimitiveValue::CSS_PX);
+    bubble->setInlineStyleProperty(CSSPropertyTop, hostY + static_cast<double>(hostRect.height()), CSSPrimitiveValue::CSS_PX);
     // The 'left' value of ::-webkit-validation-bubble-arrow.
     const int bubbleArrowTopOffset = 32;
     double bubbleX = hostX;
     if (hostRect.width() / 2 < bubbleArrowTopOffset)
-        bubbleX = max(hostX + hostRect.width().toFloat() / 2 - bubbleArrowTopOffset, 0.0);
+        bubbleX = max(hostX + static_cast<double>(hostRect.width()) / 2 - bubbleArrowTopOffset, 0.0);
     bubble->setInlineStyleProperty(CSSPropertyLeft, bubbleX, CSSPrimitiveValue::CSS_PX);
 }
 

Modified: branches/subpixellayout/Source/WebCore/platform/Length.h (113602 => 113603)


--- branches/subpixellayout/Source/WebCore/platform/Length.h	2012-04-09 18:58:08 UTC (rev 113602)
+++ branches/subpixellayout/Source/WebCore/platform/Length.h	2012-04-09 19:06:15 UTC (rev 113603)
@@ -56,7 +56,7 @@
     {
     }
 
-    Length(LayoutUnit v, LengthType t, bool q = false)
+    Length(FractionalLayoutUnit v, LengthType t, bool q = false)
         : m_floatValue(v.toFloat()), m_quirk(q), m_type(t), m_isFloat(true)
     {
     }
@@ -162,7 +162,7 @@
         m_isFloat = true;    
     }
 
-    void setValue(LengthType t, LayoutUnit value)
+    void setValue(LengthType t, FractionalLayoutUnit value)
     {
         m_type = t;
         m_floatValue = value;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to