- check(pref_service->GetDefaultBranch("browser.display",
- getter_AddRefs(pref_branch)));
- check(pref_branch->SetIntPref("screen_resolution", 40));
+
+ // The browser.display.screen_resolution preference sets the
+ // the nominal resolution for dimensions expressed in pixels.
+ // (They may be scaled!) In Mozilla 1.7 it also sets the
+ // assumed resolution of the display - hence pixel sizes are
+ // respected on-screen - but this is no longer the case in
+ // 1.8. Therefore it was renamed to layout.css.dpi in 1.8.1.
+ // In 1.8 we need to set the assumed screen resolution
+ // separately, but don't know how yet. Setting one to 40
+ // but not the other is *bad*, so currently we set neither.
+
+# if MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR < 8
+ check(pref_branch->SetIntPref("browser.display.screen_resolution",
+ 40));
+# endif