Title: [113403] branches/subpixellayout/Source/WebCore

Diff

Modified: branches/subpixellayout/Source/WebCore/editing/Editor.cpp (113402 => 113403)


--- branches/subpixellayout/Source/WebCore/editing/Editor.cpp	2012-04-06 01:25:17 UTC (rev 113402)
+++ branches/subpixellayout/Source/WebCore/editing/Editor.cpp	2012-04-06 01:29:16 UTC (rev 113403)
@@ -2556,12 +2556,12 @@
     ASSERT(range->startContainer());
     ASSERT(range->endContainer());
 
-    LayoutRect startCaretRect = RenderedPosition(VisiblePosition(range->startPosition()).deepEquivalent(), DOWNSTREAM).absoluteRect(extraWidthToEndOfLine);
-    if (startCaretRect == LayoutRect())
+    IntRect startCaretRect = pixelSnappedIntRect(RenderedPosition(VisiblePosition(range->startPosition()).deepEquivalent(), DOWNSTREAM).absoluteRect(extraWidthToEndOfLine));
+    if (startCaretRect == IntRect())
         return IntRect();
 
-    LayoutRect endCaretRect = RenderedPosition(VisiblePosition(range->endPosition()).deepEquivalent(), UPSTREAM).absoluteRect();
-    if (endCaretRect == LayoutRect())
+    IntRect endCaretRect = pixelSnappedIntRect(RenderedPosition(VisiblePosition(range->endPosition()).deepEquivalent(), UPSTREAM).absoluteRect());
+    if (endCaretRect == IntRect())
         return IntRect();
 
     if (startCaretRect.y() == endCaretRect.y()) {

Modified: branches/subpixellayout/Source/WebCore/page/SpatialNavigation.cpp (113402 => 113403)


--- branches/subpixellayout/Source/WebCore/page/SpatialNavigation.cpp	2012-04-06 01:25:17 UTC (rev 113402)
+++ branches/subpixellayout/Source/WebCore/page/SpatialNavigation.cpp	2012-04-06 01:29:16 UTC (rev 113403)
@@ -645,19 +645,19 @@
     switch (direction) {
     case FocusDirectionLeft:
         sameAxisDistance = exitPoint.x() - entryPoint.x();
-        otherAxisDistance = abs(exitPoint.y() - entryPoint.y());
+        otherAxisDistance = (exitPoint.y() - entryPoint.y()).abs();
         break;
     case FocusDirectionUp:
         sameAxisDistance = exitPoint.y() - entryPoint.y();
-        otherAxisDistance = abs(exitPoint.x() - entryPoint.x());
+        otherAxisDistance = (exitPoint.x() - entryPoint.x()).abs();
         break;
     case FocusDirectionRight:
         sameAxisDistance = entryPoint.x() - exitPoint.x();
-        otherAxisDistance = abs(entryPoint.y() - exitPoint.y());
+        otherAxisDistance = (entryPoint.y() - exitPoint.y()).abs();
         break;
     case FocusDirectionDown:
         sameAxisDistance = entryPoint.y() - exitPoint.y();
-        otherAxisDistance = abs(entryPoint.x() - exitPoint.x());
+        otherAxisDistance = (entryPoint.x() - exitPoint.x()).abs();
         break;
     default:
         ASSERT_NOT_REACHED();

Modified: branches/subpixellayout/Source/WebCore/platform/FractionalLayoutUnit.h (113402 => 113403)


--- branches/subpixellayout/Source/WebCore/platform/FractionalLayoutUnit.h	2012-04-06 01:25:17 UTC (rev 113402)
+++ branches/subpixellayout/Source/WebCore/platform/FractionalLayoutUnit.h	2012-04-06 01:29:16 UTC (rev 113403)
@@ -532,11 +532,6 @@
     return (location + size).round() - location.round();
 }
 
-inline FractionalLayoutUnit abs(const FractionalLayoutUnit& a)
-{
-    return a.abs();
-}
-
 } // namespace WebCore
 
 namespace std {

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderBlockLineLayout.cpp (113402 => 113403)


--- branches/subpixellayout/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2012-04-06 01:25:17 UTC (rev 113402)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2012-04-06 01:29:16 UTC (rev 113403)
@@ -1757,7 +1757,7 @@
     while (RootInlineBox* nextLine = lastLine->nextRootBox())
         lastLine = nextLine;
 
-    LayoutUnit logicalBottom = lastLine->lineBottomWithLeading() + abs(lineDelta);
+    LayoutUnit logicalBottom = lastLine->lineBottomWithLeading() + lineDelta.abs();
 
     const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
     FloatingObjectSetIterator end = floatingObjectSet.end();

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderLineBoxList.cpp (113402 => 113403)


--- branches/subpixellayout/Source/WebCore/rendering/RenderLineBoxList.cpp	2012-04-06 01:25:17 UTC (rev 113402)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderLineBoxList.cpp	2012-04-06 01:29:16 UTC (rev 113403)
@@ -155,7 +155,7 @@
         block = renderer->containingBlock();
     LayoutUnit physicalStart = block->flipForWritingMode(logicalTop);
     LayoutUnit physicalEnd = block->flipForWritingMode(logicalBottom);
-    LayoutUnit physicalExtent = abs(physicalEnd - physicalStart);
+    LayoutUnit physicalExtent = (physicalEnd - physicalStart).abs();
     physicalStart = min(physicalStart, physicalEnd);
     
     if (renderer->style()->isHorizontalWritingMode()) {

Modified: branches/subpixellayout/Source/WebCore/rendering/RenderObject.cpp (113402 => 113403)


--- branches/subpixellayout/Source/WebCore/rendering/RenderObject.cpp	2012-04-06 01:25:17 UTC (rev 113402)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderObject.cpp	2012-04-06 01:29:16 UTC (rev 113403)
@@ -1439,7 +1439,7 @@
     // two rectangles (but typically only one).
     RenderStyle* outlineStyle = outlineStyleForRepaint();
     LayoutUnit ow = outlineStyle->outlineSize();
-    LayoutUnit width = abs(newOutlineBox.width() - oldOutlineBox.width());
+    LayoutUnit width = (newOutlineBox.width() - oldOutlineBox.width()).abs();
     if (width) {
         LayoutUnit shadowLeft;
         LayoutUnit shadowRight;
@@ -1458,7 +1458,7 @@
             repaintUsingContainer(repaintContainer, rightRect);
         }
     }
-    LayoutUnit height = abs(newOutlineBox.height() - oldOutlineBox.height());
+    LayoutUnit height = (newOutlineBox.height() - oldOutlineBox.height()).abs();
     if (height) {
         LayoutUnit shadowTop;
         LayoutUnit shadowBottom;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to