mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1839614 - patch 2 - Move the browser.display.auto_quality_min_font_size pref into StaticPrefs. r=gfx-reviewers,lsalzman
No change in behavior here; this is to prepare for offscreen-canvas workers to be able to access the pref (following patch). Depends on D181636 Differential Revision: https://phabricator.services.mozilla.com/D181637
This commit is contained in:
parent
0add7b24b0
commit
7d0978de1e
@ -83,6 +83,7 @@
|
||||
#include "mozilla/ServoStyleSet.h"
|
||||
#include "mozilla/ServoStyleSetInlines.h"
|
||||
#include "mozilla/StaticPrefs_apz.h"
|
||||
#include "mozilla/StaticPrefs_browser.h"
|
||||
#include "mozilla/StaticPrefs_dom.h"
|
||||
#include "mozilla/StaticPrefs_font.h"
|
||||
#include "mozilla/StaticPrefs_general.h"
|
||||
@ -7007,8 +7008,10 @@ nsIFrame* nsLayoutUtils::GetReferenceFrame(nsIFrame* aFrame) {
|
||||
result |= gfx::ShapedTextFlags::TEXT_OPTIMIZE_SPEED;
|
||||
break;
|
||||
case StyleTextRendering::Auto:
|
||||
if (aPresContext && aStyleFont->mFont.size.ToCSSPixels() <
|
||||
aPresContext->GetAutoQualityMinFontSize()) {
|
||||
if (aPresContext &&
|
||||
aStyleFont->mFont.size.ToCSSPixels() <
|
||||
aPresContext->DevPixelsToFloatCSSPixels(
|
||||
StaticPrefs::browser_display_auto_quality_min_font_size())) {
|
||||
result |= gfx::ShapedTextFlags::TEXT_OPTIMIZE_SPEED;
|
||||
}
|
||||
break;
|
||||
|
@ -237,7 +237,6 @@ nsPresContext::nsPresContext(dom::Document* aDocument, nsPresContextType aType)
|
||||
mFullZoom(1.0),
|
||||
mLastFontInflationScreenSize(gfxSize(-1.0, -1.0)),
|
||||
mCurAppUnitsPerDevPixel(0),
|
||||
mAutoQualityMinFontSizePixelsPref(0),
|
||||
mDynamicToolbarMaxHeight(0),
|
||||
mDynamicToolbarHeight(0),
|
||||
mPageSize(-1, -1),
|
||||
@ -424,9 +423,6 @@ void nsPresContext::GetUserPreferences() {
|
||||
return;
|
||||
}
|
||||
|
||||
mAutoQualityMinFontSizePixelsPref =
|
||||
Preferences::GetInt("browser.display.auto_quality_min_font_size");
|
||||
|
||||
PreferenceSheet::EnsureInitialized();
|
||||
|
||||
mSendAfterPaintToContent = Preferences::GetBool(
|
||||
|
@ -566,10 +566,6 @@ class nsPresContext : public nsISupports, public mozilla::SupportsWeakPtr {
|
||||
*/
|
||||
void SetColorSchemeOverride(mozilla::dom::PrefersColorSchemeOverride);
|
||||
|
||||
mozilla::CSSCoord GetAutoQualityMinFontSize() const {
|
||||
return DevPixelsToFloatCSSPixels(mAutoQualityMinFontSizePixelsPref);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the device's screen size in inches, for font size
|
||||
* inflation.
|
||||
|
@ -1133,6 +1133,12 @@
|
||||
value: 32
|
||||
mirror: always
|
||||
|
||||
# Min font device pixel size at which to turn on high quality.
|
||||
- name: browser.display.auto_quality_min_font_size
|
||||
type: RelaxedAtomicUint32
|
||||
value: 20
|
||||
mirror: always
|
||||
|
||||
- name: browser.display.background_color
|
||||
type: String
|
||||
value: "#FFFFFF"
|
||||
|
@ -168,9 +168,6 @@ pref("dom.text-recognition.enabled", true);
|
||||
// of content viewers to cache based on the amount of available memory.
|
||||
pref("browser.sessionhistory.max_total_viewers", -1);
|
||||
|
||||
// min font device pixel size at which to turn on high quality
|
||||
pref("browser.display.auto_quality_min_font_size", 20);
|
||||
|
||||
// See http://whatwg.org/specs/web-apps/current-work/#ping
|
||||
pref("browser.send_pings", false);
|
||||
pref("browser.send_pings.max_per_link", 1); // limit the number of pings that are sent per link click
|
||||
|
Loading…
Reference in New Issue
Block a user