зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1448225 - Convert StylePrefs to StaticPrefs. r=emilio
The new StaticPrefs machinery means that StylePrefs can be removed. Note that this approach mirrors all static prefs into Rust, but I have only updated structs.rs for the prefs that Stylo uses. On a CLOSED TREE, since a sheriff closed the tree while I was about to land this via autoland. MozReview-Commit-ID: G1SY0987WJ7
This commit is contained in:
Родитель
04568ff65e
Коммит
94289ab246
|
@ -78,7 +78,7 @@ add_task(async function startup() {
|
|||
max: 350,
|
||||
},
|
||||
"layout.css.prefixes.webkit": {
|
||||
min: 140,
|
||||
min: 135,
|
||||
max: 150,
|
||||
},
|
||||
"browser.search.log": {
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "mozilla/PresShell.h"
|
||||
#include "mozilla/ServoBindings.h"
|
||||
#include "mozilla/ServoStyleSetInlines.h"
|
||||
#include "mozilla/StaticPrefs.h"
|
||||
#include "nsAbsoluteContainingBlock.h"
|
||||
#include "nsCSSPseudoElements.h"
|
||||
#include "nsAtom.h"
|
||||
|
@ -89,7 +90,6 @@
|
|||
#include "nsPageContentFrame.h"
|
||||
#include "mozilla/RestyleManager.h"
|
||||
#include "mozilla/RestyleManagerInlines.h"
|
||||
#include "mozilla/StylePrefs.h"
|
||||
#include "StickyScrollContainer.h"
|
||||
#include "nsFieldSetFrame.h"
|
||||
#include "nsInlineFrame.h"
|
||||
|
@ -2558,7 +2558,7 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle
|
|||
NS_ASSERTION(frameItems.OnlyChild(), "multiple root element frames");
|
||||
} else if (display->mDisplay == StyleDisplay::Flex ||
|
||||
display->mDisplay == StyleDisplay::WebkitBox ||
|
||||
(StylePrefs::sEmulateMozBoxWithFlex &&
|
||||
(StaticPrefs::layout_css_emulate_moz_box_with_flex() &&
|
||||
display->mDisplay == StyleDisplay::MozBox)) {
|
||||
contentFrame = NS_NewFlexContainerFrame(mPresShell, computedStyle);
|
||||
InitAndRestoreFrame(state, aDocElement, mDocElementContainingBlock,
|
||||
|
@ -4250,7 +4250,7 @@ static
|
|||
bool IsXULDisplayType(const nsStyleDisplay* aDisplay)
|
||||
{
|
||||
// -moz-{inline-}box is XUL, unless we're emulating it with flexbox.
|
||||
if (!StylePrefs::sEmulateMozBoxWithFlex &&
|
||||
if (!StaticPrefs::layout_css_emulate_moz_box_with_flex() &&
|
||||
(aDisplay->mDisplay == StyleDisplay::MozInlineBox ||
|
||||
aDisplay->mDisplay == StyleDisplay::MozBox)) {
|
||||
return true;
|
||||
|
@ -4521,7 +4521,7 @@ nsCSSFrameConstructor::FindXULDisplayData(const nsStyleDisplay* aDisplay,
|
|||
// return null (except for scrollcorners which have to be XUL becuase their
|
||||
// parent reflows them with BoxReflow() which means they have to get
|
||||
// actual-XUL frames).
|
||||
if (StylePrefs::sEmulateMozBoxWithFlex &&
|
||||
if (StaticPrefs::layout_css_emulate_moz_box_with_flex() &&
|
||||
aElement && !aElement->IsXULElement(nsGkAtoms::scrollcorner) &&
|
||||
(aDisplay->mDisplay == StyleDisplay::MozBox ||
|
||||
aDisplay->mDisplay == StyleDisplay::MozInlineBox)) {
|
||||
|
@ -4749,7 +4749,7 @@ nsCSSFrameConstructor::FindDisplayData(const nsStyleDisplay* aDisplay,
|
|||
if (propagatedScrollToViewport && aDisplay->IsScrollableOverflow()) {
|
||||
if (aDisplay->mDisplay == StyleDisplay::Flex ||
|
||||
aDisplay->mDisplay == StyleDisplay::WebkitBox ||
|
||||
(StylePrefs::sEmulateMozBoxWithFlex &&
|
||||
(StaticPrefs::layout_css_emulate_moz_box_with_flex() &&
|
||||
aDisplay->mDisplay == StyleDisplay::MozBox)) {
|
||||
static const FrameConstructionData sNonScrollableFlexData =
|
||||
FCDATA_DECL(0, NS_NewFlexContainerFrame);
|
||||
|
@ -4850,7 +4850,7 @@ nsCSSFrameConstructor::FindDisplayData(const nsStyleDisplay* aDisplay,
|
|||
};
|
||||
static_assert(ArrayLength(sDisplayData) == size_t(StyleDisplay::MozInlineBox) + 1,
|
||||
"Be sure to update sDisplayData if you touch StyleDisplay");
|
||||
MOZ_ASSERT(StylePrefs::sEmulateMozBoxWithFlex ||
|
||||
MOZ_ASSERT(StaticPrefs::layout_css_emulate_moz_box_with_flex() ||
|
||||
(aDisplay->mDisplay != StyleDisplay::MozBox &&
|
||||
aDisplay->mDisplay != StyleDisplay::MozInlineBox),
|
||||
"-moz-{inline-}box as XUL should have already been handled");
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/StaticPrefs.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "nsCharTraits.h"
|
||||
#include "nsDocument.h"
|
||||
|
@ -128,7 +129,6 @@
|
|||
#include "DisplayListChecker.h"
|
||||
#include "TextDrawTarget.h"
|
||||
#include "nsDeckFrame.h"
|
||||
#include "mozilla/StylePrefs.h"
|
||||
#include "mozilla/dom/InspectorFontFace.h"
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
|
@ -10131,7 +10131,7 @@ nsLayoutUtils::ComputeOffsetToUserSpace(nsDisplayListBuilder* aBuilder,
|
|||
/* static */ uint8_t
|
||||
nsLayoutUtils::ControlCharVisibilityDefault()
|
||||
{
|
||||
return StylePrefs::sControlCharVisibility
|
||||
return StaticPrefs::layout_css_control_characters_visible()
|
||||
? NS_STYLE_CONTROL_CHARACTER_VISIBILITY_VISIBLE
|
||||
: NS_STYLE_CONTROL_CHARACTER_VISIBILITY_HIDDEN;
|
||||
}
|
||||
|
|
|
@ -109,7 +109,6 @@
|
|||
#include "MediaPrefs.h"
|
||||
#include "mozilla/ServoBindings.h"
|
||||
#include "mozilla/StaticPresData.h"
|
||||
#include "mozilla/StylePrefs.h"
|
||||
#include "mozilla/dom/WebIDLGlobalNameHash.h"
|
||||
#include "mozilla/dom/ipc/IPCBlobInputStreamStorage.h"
|
||||
#include "mozilla/dom/U2FTokenManager.h"
|
||||
|
@ -219,8 +218,6 @@ nsLayoutStatics::Initialize()
|
|||
return rv;
|
||||
}
|
||||
|
||||
StylePrefs::Init();
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
rv = nsXULPopupManager::Init();
|
||||
if (NS_FAILED(rv)) {
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
#include "mozilla/ServoCSSParser.h"
|
||||
#include "mozilla/ServoStyleSet.h"
|
||||
#include "mozilla/ServoUtils.h"
|
||||
#include "mozilla/StaticPrefs.h"
|
||||
#include "nsCSSFontFaceRule.h"
|
||||
#include "nsCSSParser.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsStyleUtil.h"
|
||||
#include "StylePrefs.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -598,7 +598,7 @@ FontFace::SetDescriptors(const nsAString& aFamily,
|
|||
!ParseDescriptor(eCSSFontDesc_FontFeatureSettings,
|
||||
aDescriptors.mFeatureSettings,
|
||||
mDescriptors->mFontFeatureSettings) ||
|
||||
(StylePrefs::sFontVariationsEnabled &&
|
||||
(StaticPrefs::layout_css_font_variations_enabled() &&
|
||||
!ParseDescriptor(eCSSFontDesc_FontVariationSettings,
|
||||
aDescriptors.mVariationSettings,
|
||||
mDescriptors->mFontVariationSettings)) ||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "mozilla/ServoStyleSet.h"
|
||||
#include "mozilla/ServoUtils.h"
|
||||
#include "mozilla/Sprintf.h"
|
||||
#include "mozilla/StaticPrefs.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/LoadInfo.h"
|
||||
#include "nsAutoPtr.h"
|
||||
|
@ -50,7 +51,6 @@
|
|||
#include "nsPrintfCString.h"
|
||||
#include "nsUTF8Utils.h"
|
||||
#include "nsDOMNavigationTiming.h"
|
||||
#include "StylePrefs.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::css;
|
||||
|
@ -1142,17 +1142,17 @@ FontFaceSet::FindOrCreateUserFontEntryFromFontFace(const nsAString& aFamilyName,
|
|||
face->mFormatFlags |= gfxUserFontSet::FLAG_FORMAT_EOT;
|
||||
} else if (valueString.LowerCaseEqualsASCII("svg")) {
|
||||
face->mFormatFlags |= gfxUserFontSet::FLAG_FORMAT_SVG;
|
||||
} else if (StylePrefs::sFontVariationsEnabled &&
|
||||
} else if (StaticPrefs::layout_css_font_variations_enabled() &&
|
||||
valueString.LowerCaseEqualsASCII("woff-variations")) {
|
||||
face->mFormatFlags |= gfxUserFontSet::FLAG_FORMAT_WOFF_VARIATIONS;
|
||||
} else if (StylePrefs::sFontVariationsEnabled &&
|
||||
} else if (StaticPrefs::layout_css_font_variations_enabled() &&
|
||||
Preferences::GetBool(GFX_PREF_WOFF2_ENABLED) &&
|
||||
valueString.LowerCaseEqualsASCII("woff2-variations")) {
|
||||
face->mFormatFlags |= gfxUserFontSet::FLAG_FORMAT_WOFF2_VARIATIONS;
|
||||
} else if (StylePrefs::sFontVariationsEnabled &&
|
||||
} else if (StaticPrefs::layout_css_font_variations_enabled() &&
|
||||
valueString.LowerCaseEqualsASCII("opentype-variations")) {
|
||||
face->mFormatFlags |= gfxUserFontSet::FLAG_FORMAT_OPENTYPE_VARIATIONS;
|
||||
} else if (StylePrefs::sFontVariationsEnabled &&
|
||||
} else if (StaticPrefs::layout_css_font_variations_enabled() &&
|
||||
valueString.LowerCaseEqualsASCII("truetype-variations")) {
|
||||
face->mFormatFlags |= gfxUserFontSet::FLAG_FORMAT_TRUETYPE_VARIATIONS;
|
||||
} else {
|
||||
|
|
|
@ -71,7 +71,7 @@ headers = [
|
|||
"mozilla/dom/ChildIterator.h",
|
||||
"mozilla/dom/NameSpaceConstants.h",
|
||||
"mozilla/LookAndFeel.h",
|
||||
"mozilla/StylePrefs.h",
|
||||
"mozilla/StaticPrefs.h",
|
||||
"mozilla/ServoBindings.h",
|
||||
"mozilla/ServoMediaList.h",
|
||||
"mozilla/ComputedStyle.h",
|
||||
|
@ -243,7 +243,7 @@ whitelist-types = [
|
|||
"mozilla::OriginFlags",
|
||||
"mozilla::PropertyStyleAnimationValuePair",
|
||||
"mozilla::ServoTraversalFlags",
|
||||
"mozilla::StylePrefs",
|
||||
"mozilla::StaticPrefs",
|
||||
"mozilla::StyleShapeRadius",
|
||||
"mozilla::StyleGrid.*",
|
||||
"mozilla::UpdateAnimationsTasks",
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/StylePrefs.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
bool StylePrefs::sFontDisplayEnabled;
|
||||
bool StylePrefs::sOpentypeSVGEnabled;
|
||||
bool StylePrefs::sWebkitPrefixedAliasesEnabled;
|
||||
bool StylePrefs::sWebkitDevicePixelRatioEnabled;
|
||||
bool StylePrefs::sMozGradientsEnabled;
|
||||
bool StylePrefs::sControlCharVisibility;
|
||||
bool StylePrefs::sFramesTimingFunctionEnabled;
|
||||
bool StylePrefs::sUnprefixedFullscreenApiEnabled;
|
||||
bool StylePrefs::sVisitedLinksEnabled;
|
||||
bool StylePrefs::sMozDocumentEnabledInContent;
|
||||
bool StylePrefs::sMozDocumentURLPrefixHackEnabled;
|
||||
bool StylePrefs::sGridTemplateSubgridValueEnabled;
|
||||
bool StylePrefs::sFontVariationsEnabled;
|
||||
bool StylePrefs::sEmulateMozBoxWithFlex;
|
||||
|
||||
/* static */ void
|
||||
StylePrefs::Init()
|
||||
{
|
||||
Preferences::AddBoolVarCache(&sFontDisplayEnabled,
|
||||
"layout.css.font-display.enabled");
|
||||
Preferences::AddBoolVarCache(&sOpentypeSVGEnabled,
|
||||
"gfx.font_rendering.opentype_svg.enabled");
|
||||
Preferences::AddBoolVarCache(&sWebkitPrefixedAliasesEnabled,
|
||||
"layout.css.prefixes.webkit");
|
||||
Preferences::AddBoolVarCache(&sWebkitDevicePixelRatioEnabled,
|
||||
"layout.css.prefixes.device-pixel-ratio-webkit");
|
||||
Preferences::AddBoolVarCache(&sMozGradientsEnabled,
|
||||
"layout.css.prefixes.gradients");
|
||||
Preferences::AddBoolVarCache(&sControlCharVisibility,
|
||||
"layout.css.control-characters.visible");
|
||||
Preferences::AddBoolVarCache(&sFramesTimingFunctionEnabled,
|
||||
"layout.css.frames-timing.enabled");
|
||||
Preferences::AddBoolVarCache(&sUnprefixedFullscreenApiEnabled,
|
||||
"full-screen-api.unprefix.enabled");
|
||||
Preferences::AddBoolVarCache(&sVisitedLinksEnabled,
|
||||
"layout.css.visited_links_enabled");
|
||||
Preferences::AddBoolVarCache(&sMozDocumentEnabledInContent,
|
||||
"layout.css.moz-document.content.enabled");
|
||||
Preferences::AddBoolVarCache(&sMozDocumentURLPrefixHackEnabled,
|
||||
"layout.css.moz-document.url-prefix-hack.enabled");
|
||||
Preferences::AddBoolVarCache(&sGridTemplateSubgridValueEnabled,
|
||||
"layout.css.grid-template-subgrid-value.enabled");
|
||||
Preferences::AddBoolVarCache(&sFontVariationsEnabled,
|
||||
"layout.css.font-variations.enabled");
|
||||
|
||||
// Only honor layout.css.emulate-moz-box-with-flex in prerelease builds.
|
||||
// (In release builds, sEmulateMozBoxWithFlex will be implicitly false.)
|
||||
#ifndef RELEASE_OR_BETA
|
||||
Preferences::AddBoolVarCache(&sEmulateMozBoxWithFlex,
|
||||
"layout.css.emulate-moz-box-with-flex");
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
|
@ -1,36 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* A namespace class for style system prefs */
|
||||
|
||||
#ifndef mozilla_StylePrefs_h
|
||||
#define mozilla_StylePrefs_h
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
struct StylePrefs
|
||||
{
|
||||
static bool sFontDisplayEnabled;
|
||||
static bool sOpentypeSVGEnabled;
|
||||
static bool sWebkitPrefixedAliasesEnabled;
|
||||
static bool sWebkitDevicePixelRatioEnabled;
|
||||
static bool sMozGradientsEnabled;
|
||||
static bool sControlCharVisibility;
|
||||
static bool sFramesTimingFunctionEnabled;
|
||||
static bool sUnprefixedFullscreenApiEnabled;
|
||||
static bool sVisitedLinksEnabled;
|
||||
static bool sMozDocumentEnabledInContent;
|
||||
static bool sMozDocumentURLPrefixHackEnabled;
|
||||
static bool sGridTemplateSubgridValueEnabled;
|
||||
static bool sFontVariationsEnabled;
|
||||
static bool sEmulateMozBoxWithFlex;
|
||||
|
||||
static void Init();
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_StylePrefs_h
|
|
@ -111,7 +111,6 @@ EXPORTS.mozilla += [
|
|||
'SheetType.h',
|
||||
'StyleAnimationValue.h',
|
||||
'StyleComplexColor.h',
|
||||
'StylePrefs.h',
|
||||
'StyleSheet.h',
|
||||
'StyleSheetInfo.h',
|
||||
'StyleSheetInlines.h',
|
||||
|
@ -228,7 +227,6 @@ UNIFIED_SOURCES += [
|
|||
'ServoSupportsRule.cpp',
|
||||
'StreamLoader.cpp',
|
||||
'StyleAnimationValue.cpp',
|
||||
'StylePrefs.cpp',
|
||||
'StyleSheet.cpp',
|
||||
'URLExtraData.cpp',
|
||||
]
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "nsStaticNameTable.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/StylePrefs.h"
|
||||
#include "mozilla/StaticPrefs.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
@ -367,7 +367,8 @@ nsCSSProps::LookupFontDesc(const nsAString& aFontDesc)
|
|||
MOZ_ASSERT(gFontDescTable, "no lookup table, needs addref");
|
||||
nsCSSFontDesc which = nsCSSFontDesc(gFontDescTable->Lookup(aFontDesc));
|
||||
|
||||
if (which == eCSSFontDesc_Display && !StylePrefs::sFontDisplayEnabled) {
|
||||
if (which == eCSSFontDesc_Display &&
|
||||
!StaticPrefs::layout_css_font_display_enabled()) {
|
||||
which = eCSSFontDesc_UNKNOWN;
|
||||
}
|
||||
return which;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "nsError.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/StylePrefs.h"
|
||||
#include "mozilla/StaticPrefs.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "FontFaceSet.h"
|
||||
|
@ -338,7 +338,7 @@ uint8_t
|
|||
nsFontFaceLoader::GetFontDisplay()
|
||||
{
|
||||
uint8_t fontDisplay = NS_FONT_DISPLAY_AUTO;
|
||||
if (StylePrefs::sFontDisplayEnabled) {
|
||||
if (StaticPrefs::layout_css_font_display_enabled()) {
|
||||
fontDisplay = mUserFontEntry->GetFontDisplay();
|
||||
}
|
||||
return fontDisplay;
|
||||
|
|
|
@ -77,6 +77,32 @@
|
|||
|
||||
// clang-format off
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Full-screen prefs
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#ifdef RELEASE_OR_BETA
|
||||
# define PREF_VALUE false
|
||||
#else
|
||||
# define PREF_VALUE true
|
||||
#endif
|
||||
VARCACHE_PREF(
|
||||
"full-screen-api.unprefix.enabled",
|
||||
full_screen_api_unprefix_enabled,
|
||||
bool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Graphics prefs
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
VARCACHE_PREF(
|
||||
"gfx.font_rendering.opentype_svg.enabled",
|
||||
gfx_font_rendering_opentype_svg_enabled,
|
||||
bool, true
|
||||
)
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// HTML5 parser prefs
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -105,6 +131,115 @@ VARCACHE_PREF(
|
|||
int32_t, 120
|
||||
)
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Layout prefs
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// Is support for the font-display @font-face descriptor enabled?
|
||||
VARCACHE_PREF(
|
||||
"layout.css.font-display.enabled",
|
||||
layout_css_font_display_enabled,
|
||||
bool, true
|
||||
)
|
||||
|
||||
// Are webkit-prefixed properties & property-values supported?
|
||||
VARCACHE_PREF(
|
||||
"layout.css.prefixes.webkit",
|
||||
layout_css_prefixes_webkit,
|
||||
bool, true
|
||||
)
|
||||
|
||||
// Are "-webkit-{min|max}-device-pixel-ratio" media queries supported? (Note:
|
||||
// this pref has no effect if the master 'layout.css.prefixes.webkit' pref is
|
||||
// set to false.)
|
||||
VARCACHE_PREF(
|
||||
"layout.css.prefixes.device-pixel-ratio-webkit",
|
||||
layout_css_prefixes_device_pixel_ratio_webkit,
|
||||
bool, false
|
||||
)
|
||||
|
||||
// Is -moz-prefixed gradient functions enabled?
|
||||
VARCACHE_PREF(
|
||||
"layout.css.prefixes.gradients",
|
||||
layout_css_prefixes_gradients,
|
||||
bool, true
|
||||
)
|
||||
|
||||
// Should stray control characters be rendered visibly?
|
||||
#ifdef RELEASE_OR_BETA
|
||||
# define PREF_VALUE false
|
||||
#else
|
||||
# define PREF_VALUE true
|
||||
#endif
|
||||
VARCACHE_PREF(
|
||||
"layout.css.control-characters.visible",
|
||||
layout_css_control_characters_visible,
|
||||
bool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
|
||||
// Is support for the frames() timing function enabled?
|
||||
#ifdef RELEASE_OR_BETA
|
||||
# define PREF_VALUE false
|
||||
#else
|
||||
# define PREF_VALUE true
|
||||
#endif
|
||||
VARCACHE_PREF(
|
||||
"layout.css.frames-timing.enabled",
|
||||
layout_css_frames_timing_enabled,
|
||||
bool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
|
||||
// Should the :visited selector ever match (otherwise :link matches instead)?
|
||||
VARCACHE_PREF(
|
||||
"layout.css.visited_links_enabled",
|
||||
layout_css_visited_links_enabled,
|
||||
bool, true
|
||||
)
|
||||
|
||||
// Pref to control whether @-moz-document rules are enabled in content pages.
|
||||
VARCACHE_PREF(
|
||||
"layout.css.moz-document.content.enabled",
|
||||
layout_css_moz_document_content_enabled,
|
||||
bool, false
|
||||
)
|
||||
|
||||
// Pref to control whether @-moz-document url-prefix() is parsed in content
|
||||
// pages. Only effective when layout.css.moz-document.content.enabled is false.
|
||||
#ifdef EARLY_BETA_OR_EARLIER
|
||||
#define PREF_VALUE false
|
||||
#else
|
||||
#define PREF_VALUE true
|
||||
#endif
|
||||
VARCACHE_PREF(
|
||||
"layout.css.moz-document.url-prefix-hack.enabled",
|
||||
layout_css_moz_document_url_prefix_hack_enabled,
|
||||
bool, PREF_VALUE
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
|
||||
// Is support for CSS "grid-template-{columns,rows}: subgrid X" enabled?
|
||||
VARCACHE_PREF(
|
||||
"layout.css.grid-template-subgrid-value.enabled",
|
||||
layout_css_grid_template_subgrid_value_enabled,
|
||||
bool, false
|
||||
)
|
||||
|
||||
// Is support for variation fonts enabled?
|
||||
VARCACHE_PREF(
|
||||
"layout.css.font-variations.enabled",
|
||||
layout_css_font_variations_enabled,
|
||||
bool, true
|
||||
)
|
||||
|
||||
// Are we emulating -moz-{inline}-box layout using CSS flexbox?
|
||||
VARCACHE_PREF(
|
||||
"layout.css.emulate-moz-box-with-flex",
|
||||
layout_css_emulate_moz_box_with_flex,
|
||||
bool, false
|
||||
)
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Network prefs
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -874,8 +874,6 @@ pref("gfx.font_rendering.graphite.enabled", true);
|
|||
pref("gfx.font_rendering.directwrite.use_gdi_table_loading", true);
|
||||
#endif
|
||||
|
||||
pref("gfx.font_rendering.opentype_svg.enabled", true);
|
||||
|
||||
#ifdef XP_WIN
|
||||
// comma separated list of backends to use in order of preference
|
||||
// e.g., pref("gfx.canvas.azure.backends", "direct2d,skia,cairo");
|
||||
|
@ -2929,20 +2927,6 @@ pref("layout.selection.caret_style", 0);
|
|||
// pref to report CSS errors to the error console
|
||||
pref("layout.css.report_errors", true);
|
||||
|
||||
// Should the :visited selector ever match (otherwise :link matches instead)?
|
||||
pref("layout.css.visited_links_enabled", true);
|
||||
|
||||
// Pref to control whether @-moz-document rules are enabled in content pages.
|
||||
pref("layout.css.moz-document.content.enabled", false);
|
||||
|
||||
// Pref to control whether @-moz-document url-prefix() is parsed in content
|
||||
// pages. Only effective when layout.css.moz-document.content.enabled is false.
|
||||
#ifdef EARLY_BETA_OR_EARLIER
|
||||
pref("layout.css.moz-document.url-prefix-hack.enabled", false);
|
||||
#else
|
||||
pref("layout.css.moz-document.url-prefix-hack.enabled", true);
|
||||
#endif
|
||||
|
||||
#ifdef NIGHTLY_BUILD
|
||||
pref("layout.css.getPropertyCSSValue.enabled", false);
|
||||
#else
|
||||
|
@ -3026,26 +3010,6 @@ pref("layout.css.float-logical-values.enabled", true);
|
|||
// Is support for the CSS4 image-orientation property enabled?
|
||||
pref("layout.css.image-orientation.enabled", true);
|
||||
|
||||
// Is support for the font-display @font-face descriptor enabled?
|
||||
pref("layout.css.font-display.enabled", true);
|
||||
|
||||
// Is support for variation fonts enabled?
|
||||
pref("layout.css.font-variations.enabled", true);
|
||||
|
||||
// Is support for the frames() timing function enabled?
|
||||
#ifdef RELEASE_OR_BETA
|
||||
pref("layout.css.frames-timing.enabled", false);
|
||||
#else
|
||||
pref("layout.css.frames-timing.enabled", true);
|
||||
#endif
|
||||
|
||||
// Are we emulating -moz-{inline}-box layout using CSS flexbox?
|
||||
// (This pref only takes effect in prerelease builds, so we only
|
||||
// bother specifying a default in prerelease builds as well.)
|
||||
#ifndef RELEASE_OR_BETA
|
||||
pref("layout.css.emulate-moz-box-with-flex", false);
|
||||
#endif
|
||||
|
||||
// Is the paint-order property supported for HTML text?
|
||||
// (It is always supported for SVG.)
|
||||
pref("layout.css.paint-order.enabled", true);
|
||||
|
@ -3058,17 +3022,6 @@ pref("layout.css.prefixes.animations", true);
|
|||
pref("layout.css.prefixes.box-sizing", true);
|
||||
pref("layout.css.prefixes.font-features", true);
|
||||
|
||||
// Is -moz-prefixed gradient functions enabled?
|
||||
pref("layout.css.prefixes.gradients", true);
|
||||
|
||||
// Are webkit-prefixed properties & property-values supported?
|
||||
pref("layout.css.prefixes.webkit", true);
|
||||
|
||||
// Are "-webkit-{min|max}-device-pixel-ratio" media queries supported?
|
||||
// (Note: this pref has no effect if the master 'layout.css.prefixes.webkit'
|
||||
// pref is set to false.)
|
||||
pref("layout.css.prefixes.device-pixel-ratio-webkit", false);
|
||||
|
||||
// Is support for background-blend-mode enabled?
|
||||
pref("layout.css.background-blend-mode.enabled", true);
|
||||
|
||||
|
@ -3094,9 +3047,6 @@ pref("layout.css.all-shorthand.enabled", true);
|
|||
// Is support for CSS overflow-clip-box enabled for non-UA sheets?
|
||||
pref("layout.css.overflow-clip-box.enabled", false);
|
||||
|
||||
// Is support for CSS "grid-template-{columns,rows}: subgrid X" enabled?
|
||||
pref("layout.css.grid-template-subgrid-value.enabled", false);
|
||||
|
||||
// Is support for CSS contain enabled?
|
||||
pref("layout.css.contain.enabled", false);
|
||||
|
||||
|
@ -3137,13 +3087,6 @@ pref("layout.css.shape-outside.enabled", false);
|
|||
// Is support for document.fonts enabled?
|
||||
pref("layout.css.font-loading-api.enabled", true);
|
||||
|
||||
// Should stray control characters be rendered visibly?
|
||||
#ifdef RELEASE_OR_BETA
|
||||
pref("layout.css.control-characters.visible", false);
|
||||
#else
|
||||
pref("layout.css.control-characters.visible", true);
|
||||
#endif
|
||||
|
||||
// Is support for column-span enabled?
|
||||
pref("layout.css.column-span.enabled", false);
|
||||
|
||||
|
@ -5128,11 +5071,6 @@ pref("alerts.useSystemBackend", true);
|
|||
|
||||
// DOM full-screen API.
|
||||
pref("full-screen-api.enabled", false);
|
||||
#ifdef RELEASE_OR_BETA
|
||||
pref("full-screen-api.unprefix.enabled", false);
|
||||
#else
|
||||
pref("full-screen-api.unprefix.enabled", true);
|
||||
#endif
|
||||
pref("full-screen-api.allow-trusted-requests-only", true);
|
||||
// whether to prevent the top level widget from going fullscreen
|
||||
pref("full-screen-api.ignore-widgets", false);
|
||||
|
|
Загрузка…
Ссылка в новой задаче