mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Inline TwipsToPixels and PixelsToTwips on nsIPresContext. Bug 229371, r+sr=dbaron.
This commit is contained in:
parent
0392624b6a
commit
66d1fdd13f
@ -183,7 +183,7 @@ inFlasher::DrawElementOutline(nsIDOMElement* aElement)
|
|||||||
mCSSUtils->AdjustRectForMargins(frame, rect);
|
mCSSUtils->AdjustRectForMargins(frame, rect);
|
||||||
|
|
||||||
float p2t;
|
float p2t;
|
||||||
presContext->GetPixelsToTwips(&p2t);
|
p2t = presContext->PixelsToTwips();
|
||||||
|
|
||||||
if (mInvert) {
|
if (mInvert) {
|
||||||
rcontext->InvertRect(rect.x, rect.y, rect.width, rect.height);
|
rcontext->InvertRect(rect.x, rect.y, rect.width, rect.height);
|
||||||
|
@ -210,7 +210,7 @@ inLayoutUtils::GetScreenOrigin(nsIDOMElement* aElement)
|
|||||||
|
|
||||||
// Get the scale from that Presentation Context
|
// Get the scale from that Presentation Context
|
||||||
float p2t;
|
float p2t;
|
||||||
presContext->GetPixelsToTwips(&p2t);
|
p2t = presContext->PixelsToTwips();
|
||||||
|
|
||||||
// Convert screen rect to twips
|
// Convert screen rect to twips
|
||||||
rect->x = NSIntPixelsToTwips(rect->x, p2t);
|
rect->x = NSIntPixelsToTwips(rect->x, p2t);
|
||||||
|
Loading…
Reference in New Issue
Block a user