Bug 1105104 - Fix the painting of XUL tree connector lines. r=Bas
authorJonathan Watt <jwatt@jwatt.org>
Fri, 28 Nov 2014 15:28:17 +0000
changeset 218135 781ba31f9b1193dcdaa83a2b9eac061c392ef7ea
parent 218134 f50c458f6f69b0724b6b31a5c612730b3846b825
child 218136 f8c5d91b1b3a7ce34dd8885d44c33dc0801a7267
push id27916
push usercbook@mozilla.com
push dateMon, 01 Dec 2014 10:55:11 +0000
treeherdermozilla-central@af5fc587f98b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas
bugs1105104
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1105104 - Fix the painting of XUL tree connector lines. r=Bas
layout/xul/tree/nsTreeBodyFrame.cpp
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -3215,39 +3215,39 @@ nsTreeBodyFrame::PaintCell(int32_t      
       if (srcX <= cellRect.x + cellRect.width) {
         nscoord destX = currX + twistyRect.width;
         if (destX > cellRect.x + cellRect.width)
           destX = cellRect.x + cellRect.width;
         if (isRTL) {
           srcX = currX + remainingWidth - (srcX - cellRect.x);
           destX = currX + remainingWidth - (destX - cellRect.x);
         }
-        Point p1(pc->CSSPixelsToDevPixels(srcX),
-                 pc->CSSPixelsToDevPixels(lineY + mRowHeight / 2));
-        Point p2(pc->CSSPixelsToDevPixels(destX),
-                 pc->CSSPixelsToDevPixels(lineY + mRowHeight / 2));
+        Point p1(pc->AppUnitsToGfxUnits(srcX),
+                 pc->AppUnitsToGfxUnits(lineY + mRowHeight / 2));
+        Point p2(pc->AppUnitsToGfxUnits(destX),
+                 pc->AppUnitsToGfxUnits(lineY + mRowHeight / 2));
         SnapLineToDevicePixelsForStroking(p1, p2, *drawTarget);
         drawTarget->StrokeLine(p1, p2, colorPatt, strokeOptions);
       }
 
       int32_t currentParent = aRowIndex;
       for (int32_t i = level; i > 0; i--) {
         if (srcX <= cellRect.x + cellRect.width) {
           // Paint full vertical line only if we have next sibling.
           bool hasNextSibling;
           mView->HasNextSibling(currentParent, aRowIndex, &hasNextSibling);
-          Point p1(pc->CSSPixelsToDevPixels(srcX),
-                   pc->CSSPixelsToDevPixels(lineY));
+          Point p1(pc->AppUnitsToGfxUnits(srcX),
+                   pc->AppUnitsToGfxUnits(lineY));
           Point p2;
-          p2.x = pc->CSSPixelsToDevPixels(srcX);
+          p2.x = pc->AppUnitsToGfxUnits(srcX);
 
           if (hasNextSibling)
-            p2.y = pc->CSSPixelsToDevPixels(lineY + mRowHeight);
+            p2.y = pc->AppUnitsToGfxUnits(lineY + mRowHeight);
           else if (i == level)
-            p2.y = pc->CSSPixelsToDevPixels(lineY + mRowHeight / 2);
+            p2.y = pc->AppUnitsToGfxUnits(lineY + mRowHeight / 2);
 
           SnapLineToDevicePixelsForStroking(p1, p2, *drawTarget);
           drawTarget->StrokeLine(p1, p2, colorPatt, strokeOptions);
         }
 
         int32_t parent;
         if (NS_FAILED(mView->GetParentIndex(currentParent, &parent)) || parent < 0)
           break;