Backed out changeset 3fc6728e81a8 because of Windows 7 orange

This commit is contained in:
Ehsan Akhgari 2011-01-19 16:09:50 -05:00
parent 7786023907
commit c42496f47f
5 changed files with 4 additions and 31 deletions

View File

@ -260,10 +260,10 @@ nsCaret::Metrics nsCaret::ComputeMetrics(nsIFrame* aFrame, PRInt32 aOffset, nsco
// Round them to device pixels. Always round down, except that anything
// between 0 and 1 goes up to 1 so we don't let the caret disappear.
PRUint32 tpp = aFrame->PresContext()->AppUnitsPerDevPixel();
Metrics result;
result.mAppPerDev = aFrame->PresContext()->AppUnitsPerDevPixel();
result.mCaretWidth = NS_ROUND_BORDER_TO_PIXELS(caretWidth, result.mAppPerDev);
result.mBidiIndicatorSize = NS_ROUND_BORDER_TO_PIXELS(bidiIndicatorSize, result.mAppPerDev);
result.mCaretWidth = NS_ROUND_BORDER_TO_PIXELS(caretWidth, tpp);
result.mBidiIndicatorSize = NS_ROUND_BORDER_TO_PIXELS(bidiIndicatorSize, tpp);
return result;
}
@ -383,13 +383,8 @@ nsCaret::GetGeometryForFrame(nsIFrame* aFrame,
// then snap it back, put it as close to the edge as it can.
nscoord overflow = caretInScroll.XMost() -
scrolled->GetVisualOverflowRectRelativeToSelf().width;
if (overflow > 0) {
if (overflow > 0)
aRect->x -= overflow;
// Make sure that the caret falls on a device pixel boundary so that
// it doesn't fall outside of the view. We round the X coordinate
// down to the nearest device pixel unit.
aRect->x = floor(double(aRect->x) / caretMetrics.mAppPerDev) * caretMetrics.mAppPerDev;
}
}
if (aBidiIndicatorSize)

View File

@ -215,7 +215,6 @@ protected:
struct Metrics {
nscoord mBidiIndicatorSize; // width and height of bidi indicator
nscoord mCaretWidth; // full caret width including bidi indicator
PRUint32 mAppPerDev; // App units per device units metric
};
Metrics ComputeMetrics(nsIFrame* aFrame, PRInt32 aOffset, nscoord aCaretHeight);
nsresult GetGeometryForFrame(nsIFrame* aFrame,

View File

@ -1,6 +0,0 @@
<!DOCTYPE html>
<html>
<body>
<input autofocus style="text-align: right">
</body>
</html>

View File

@ -1,14 +0,0 @@
<!DOCTYPE html>
<html>
<body onload="focusInput()">
<input value=" ">
<script>
function focusInput() {
var i = document.querySelector("input");
var len = i.value.length;
i.setSelectionRange(len, len);
i.focus();
}
</script>
</body>
</html>

View File

@ -47,4 +47,3 @@ asserts(1) == passwd-4.html passwd-ref.html # bug 596901
== caret_after_reframe.html caret_after_reframe-ref.html
== nobogusnode-1.html nobogusnode-ref.html
== nobogusnode-2.html nobogusnode-ref.html
== caret_on_input_edge.html caret_on_input_edge-ref.html