Title: [115675] branches/subpixellayout/Source

Diff

Modified: branches/subpixellayout/Source/WebCore/page/SpatialNavigation.cpp (115674 => 115675)


--- branches/subpixellayout/Source/WebCore/page/SpatialNavigation.cpp	2012-04-30 21:52:30 UTC (rev 115674)
+++ branches/subpixellayout/Source/WebCore/page/SpatialNavigation.cpp	2012-04-30 22:04:59 UTC (rev 115675)
@@ -645,19 +645,19 @@
     switch (direction) {
     case FocusDirectionLeft:
         sameAxisDistance = exitPoint.x() - entryPoint.x();
-        otherAxisDistance = (exitPoint.y() - entryPoint.y()).abs();
+        otherAxisDistance = absoluteValue(exitPoint.y() - entryPoint.y());
         break;
     case FocusDirectionUp:
         sameAxisDistance = exitPoint.y() - entryPoint.y();
-        otherAxisDistance = (exitPoint.x() - entryPoint.x()).abs();
+        otherAxisDistance = absoluteValue(exitPoint.x() - entryPoint.x());
         break;
     case FocusDirectionRight:
         sameAxisDistance = entryPoint.x() - exitPoint.x();
-        otherAxisDistance = (entryPoint.y() - exitPoint.y()).abs();
+        otherAxisDistance = absoluteValue(entryPoint.y() - exitPoint.y());
         break;
     case FocusDirectionDown:
         sameAxisDistance = entryPoint.y() - exitPoint.y();
-        otherAxisDistance = (entryPoint.x() - exitPoint.x()).abs();
+        otherAxisDistance = absoluteValue(entryPoint.x() - exitPoint.x());
         break;
     default:
         ASSERT_NOT_REACHED();

Modified: branches/subpixellayout/Source/WebCore/rendering/InlineFlowBox.cpp (115674 => 115675)


--- branches/subpixellayout/Source/WebCore/rendering/InlineFlowBox.cpp	2012-04-30 21:52:30 UTC (rev 115674)
+++ branches/subpixellayout/Source/WebCore/rendering/InlineFlowBox.cpp	2012-04-30 22:04:59 UTC (rev 115675)
@@ -594,7 +594,7 @@
     bool isRootBox = isRootInlineBox();
     if (isRootBox) {
         const FontMetrics& fontMetrics = renderer()->style(isFirstLineStyle())->fontMetrics();
-        setLogicalTop((top + maxAscent - fontMetrics.ascent(baselineType)).round());
+        setLogicalTop(roundToInt(top + maxAscent - fontMetrics.ascent(baselineType)));
     }
 
     LayoutUnit adjustmentForChildrenWithSameLineHeightAndBaseline = 0;

Modified: branches/subpixellayout/Source/WebCore/rendering/LayoutTypes.h (115674 => 115675)


--- branches/subpixellayout/Source/WebCore/rendering/LayoutTypes.h	2012-04-30 21:52:30 UTC (rev 115674)
+++ branches/subpixellayout/Source/WebCore/rendering/LayoutTypes.h	2012-04-30 22:04:59 UTC (rev 115675)
@@ -56,7 +56,7 @@
 
 inline FractionalLayoutRect enclosingLayoutRect(const FloatRect& rect)
 {
-    return FractionalLayoutRect(rect);
+    return enclosingIntRect(rect);
 }
 
 inline LayoutSize roundedLayoutSize(const FloatSize& s)
@@ -130,6 +130,11 @@
 #endif
 }
 
+inline LayoutUnit absoluteValue(const LayoutUnit& value)
+{
+    return value.abs();
+}
+
 inline LayoutSize toLayoutSize(const LayoutPoint& p)
 {
     return LayoutSize(p.x(), p.y());

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderBlockLineLayout.cpp (115674 => 115675)


--- branches/subpixellayout/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2012-04-30 21:52:30 UTC (rev 115674)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2012-04-30 22:04:59 UTC (rev 115675)
@@ -1757,7 +1757,7 @@
     while (RootInlineBox* nextLine = lastLine->nextRootBox())
         lastLine = nextLine;
 
-    LayoutUnit logicalBottom = lastLine->lineBottomWithLeading() + lineDelta.abs();
+    LayoutUnit logicalBottom = lastLine->lineBottomWithLeading() + absoluteValue(lineDelta);
 
     const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     FloatingObjectSetIterator end = floatingObjectSet.end();

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (115674 => 115675)


--- branches/subpixellayout/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp	2012-04-30 21:52:30 UTC (rev 115674)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp	2012-04-30 22:04:59 UTC (rev 115675)
@@ -562,7 +562,7 @@
                             }
                         }
                     }
-                } while (groupRemainingSpace);
+                } while (absoluteValue(groupRemainingSpace) >= 1);
             }
 
             // We didn't find any children that could grow.
@@ -813,7 +813,7 @@
                             }
                         }
                     }
-                } while (groupRemainingSpace >= 1);
+                } while (absoluteValue(groupRemainingSpace) >= 1);
             }
 
             // We didn't find any children that could grow.

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderLineBoxList.cpp (115674 => 115675)


--- branches/subpixellayout/Source/WebCore/rendering/RenderLineBoxList.cpp	2012-04-30 21:52:30 UTC (rev 115674)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderLineBoxList.cpp	2012-04-30 22:04:59 UTC (rev 115675)
@@ -155,7 +155,7 @@
         block = renderer->containingBlock();
     LayoutUnit physicalStart = block->flipForWritingMode(logicalTop);
     LayoutUnit physicalEnd = block->flipForWritingMode(logicalBottom);
-    LayoutUnit physicalExtent = (physicalEnd - physicalStart).abs();
+    LayoutUnit physicalExtent = absoluteValue(physicalEnd - physicalStart);
     physicalStart = min(physicalStart, physicalEnd);
     
     if (renderer->style()->isHorizontalWritingMode()) {

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderObject.cpp (115674 => 115675)


--- branches/subpixellayout/Source/WebCore/rendering/RenderObject.cpp	2012-04-30 21:52:30 UTC (rev 115674)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderObject.cpp	2012-04-30 22:04:59 UTC (rev 115675)
@@ -1429,7 +1429,7 @@
     // two rectangles (but typically only one).
     RenderStyle* outlineStyle = outlineStyleForRepaint();
     LayoutUnit ow = outlineStyle->outlineSize();
-    LayoutUnit width = (newOutlineBox.width() - oldOutlineBox.width()).abs();
+    LayoutUnit width = absoluteValue(newOutlineBox.width() - oldOutlineBox.width());
     if (width) {
         LayoutUnit shadowLeft;
         LayoutUnit shadowRight;
@@ -1448,7 +1448,7 @@
             repaintUsingContainer(repaintContainer, rightRect);
         }
     }
-    LayoutUnit height = (newOutlineBox.height() - oldOutlineBox.height()).abs();
+    LayoutUnit height = absoluteValue(newOutlineBox.height() - oldOutlineBox.height());
     if (height) {
         LayoutUnit shadowTop;
         LayoutUnit shadowBottom;

Modified: branches/subpixellayout/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp (115674 => 115675)


--- branches/subpixellayout/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp	2012-04-30 21:52:30 UTC (rev 115674)
+++ branches/subpixellayout/Source/WebKit2/WebProcess/WebCoreSupport/WebGraphicsLayer.cpp	2012-04-30 22:04:59 UTC (rev 115675)
@@ -549,7 +549,7 @@
     // Return a projection of the visible rect (surface coordinates) onto the layer's plane (layer coordinates).
     // The resulting quad might be squewed and the visible rect is the bounding box of this quad,
     // so it might spread further than the real visible area (and then even more amplified by the cover rect multiplier).
-    return m_layerTransform.combined().inverse().clampedBoundsOfProjectedQuad(FloatQuad(FloatRect(m_webGraphicsLayerClient->visibleContentsRect())));
+    return enclosingIntRect(m_layerTransform.combined().inverse().clampedBoundsOfProjectedQuad(FloatQuad(FloatRect(m_webGraphicsLayerClient->visibleContentsRect()))));
 }
 
 Color WebGraphicsLayer::tiledBackingStoreBackgroundColor() const
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to