Title: [98371] branches/subpixellayout/Source/WebCore/rendering/RenderBlock.cpp
Revision
98371
Author
le...@chromium.org
Date
2011-10-25 12:10:33 -0700 (Tue, 25 Oct 2011)

Log Message

Fixing false assertion and correcting unrounded values for adjusting height and offset for floats.

Modified Paths

Diff

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderBlock.cpp (98370 => 98371)


--- branches/subpixellayout/Source/WebCore/rendering/RenderBlock.cpp	2011-10-25 19:05:59 UTC (rev 98370)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderBlock.cpp	2011-10-25 19:10:33 UTC (rev 98371)
@@ -3575,18 +3575,18 @@
     const FloatingObject* r = interval.data();
     if (r->type() == FloatTypeValue && interval.low() <= m_value && m_value < interval.high()) {
         // All the objects returned from the tree should be already placed.
-        ASSERT(r->isPlaced() && m_renderer->logicalTopForFloat(r) <= m_value && m_renderer->logicalBottomForFloat(r) > m_value);
+        ASSERT(r->isPlaced() && m_renderer->logicalTopForFloat(r).round() <= m_value && m_renderer->logicalBottomForFloat(r).round() > m_value);
 
         if (FloatTypeValue == FloatingObject::FloatLeft 
-            && m_renderer->logicalRightForFloat(r) > m_offset) {
-            m_offset = m_renderer->logicalRightForFloat(r);
+            && m_renderer->logicalRightForFloat(r).round() > m_offset) {
+            m_offset = m_renderer->logicalRightForFloat(r).round();
             if (m_heightRemaining)
                 *m_heightRemaining = m_renderer->logicalBottomForFloat(r) - m_value;
         }
 
         if (FloatTypeValue == FloatingObject::FloatRight
-            && m_renderer->logicalLeftForFloat(r) < m_offset) {
-            m_offset = m_renderer->logicalLeftForFloat(r);
+            && m_renderer->logicalLeftForFloat(r).round() < m_offset) {
+            m_offset = m_renderer->logicalLeftForFloat(r).round();
             if (m_heightRemaining)
                 *m_heightRemaining = m_renderer->logicalBottomForFloat(r) - m_value;
         }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to