Bug 1062735 - Part 3: Change ReduceRectToVerticalEdge to 1 css pixel instead of 1 app unit. r=roc
--- a/layout/base/SelectionCarets.cpp
+++ b/layout/base/SelectionCarets.cpp
@@ -295,26 +295,26 @@ IsRightToLeft(nsIFrame* aFrame)
MOZ_ASSERT(aFrame);
return aFrame->IsFrameOfType(nsIFrame::eLineParticipant) ?
(nsBidiPresUtils::GetFrameEmbeddingLevel(aFrame) & 1) :
aFrame->StyleVisibility()->mDirection == NS_STYLE_DIRECTION_RTL;
}
/*
- * Reduce rect to 1 app unit width along either left or right edge base on
+ * Reduce rect to 1 css pixel width along either left or right edge base on
* aToRightEdge parameter.
*/
static void
ReduceRectToVerticalEdge(nsRect& aRect, bool aToRightEdge)
{
if (aToRightEdge) {
- aRect.x = aRect.XMost() - 1;
+ aRect.x = aRect.XMost() - AppUnitsPerCSSPixel();
}
- aRect.width = 1;
+ aRect.width = AppUnitsPerCSSPixel();
}
static nsIFrame*
FindFirstNodeWithFrame(nsIDocument* aDocument,
nsRange* aRange,
nsFrameSelection* aFrameSelection,
bool aBackward,
int& aOutOffset)