xulrunner/mozilla-dpi.patch
2008-04-13 05:20:11 +00:00

29 lines
1.4 KiB
Diff

https://bugzilla.mozilla.org/show_bug.cgi?id=394103
Index: gfx/src/thebes/nsThebesDeviceContext.cpp
===================================================================
RCS file: /cvsroot/mozilla/gfx/src/thebes/nsThebesDeviceContext.cpp,v
retrieving revision 1.68
diff -u -8 -p -r1.68 nsThebesDeviceContext.cpp
--- a/gfx/src/thebes/nsThebesDeviceContext.cpp 17 Feb 2008 21:23:37 -0000 1.68
+++ b/gfx/src/thebes/nsThebesDeviceContext.cpp 25 Feb 2008 10:35:19 -0000
@@ -232,18 +232,17 @@ nsThebesDeviceContext::SetDPI()
NS_ASSERTION(dpi != -1, "no dpi set");
if (dotsArePixels) {
// First figure out the closest multiple of 96, which is the number of
// dev pixels per CSS pixel. Then, divide that into AppUnitsPerCSSPixel()
// to get the number of app units per dev pixel. The PR_MAXes are to
// make sure we don't end up dividing by zero.
mAppUnitsPerDevNotScaledPixel = PR_MAX(1, AppUnitsPerCSSPixel() /
- PR_MAX(1, (dpi + 48) / 96));
-
+ PR_MAX(1, dpi / 96));
} else {
/* set mAppUnitsPerDevPixel so we're using exactly 72 dpi, even
* though that means we have a non-integer number of device "pixels"
* per CSS pixel
*/
mAppUnitsPerDevNotScaledPixel = (AppUnitsPerCSSPixel() * 96) / dpi;
}