Bug 1548253 - Port pref cache variables of nsContentUtils to StaticPrefs - layout.css.getBoxQuads.enabled, r=Ehsan

Differential Revision: https://phabricator.services.mozilla.com/D29517

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrea Marchesini 2019-05-01 21:09:58 +00:00
Родитель 033f3e0374
Коммит 2af86f5ef5
5 изменённых файлов: 15 добавлений и 18 удалений

Просмотреть файл

@ -310,7 +310,6 @@ nsString* nsContentUtils::sAltText = nullptr;
nsString* nsContentUtils::sModifierSeparator = nullptr;
bool nsContentUtils::sInitialized = false;
bool nsContentUtils::sGetBoxQuadsEnabled = false;
bool nsContentUtils::sSkipCursorMoveForSameValueSet = false;
bool nsContentUtils::sRequestIdleCallbackEnabled = false;
bool nsContentUtils::sTailingEnabled = false;
@ -614,9 +613,6 @@ nsresult nsContentUtils::Init() {
Preferences::AddBoolVarCache(&sAllowXULXBL_for_file,
"dom.allow_XUL_XBL_for_file");
Preferences::AddBoolVarCache(&sGetBoxQuadsEnabled,
"layout.css.getBoxQuads.enabled", false);
Preferences::AddBoolVarCache(&sSkipCursorMoveForSameValueSet,
"dom.input.skip_cursor_move_for_same_value_set",
true);

Просмотреть файл

@ -2350,11 +2350,6 @@ class nsContentUtils {
ShouldResistFingerprinting();
}
/**
* Returns true if the getBoxQuads API should be enabled.
*/
static bool GetBoxQuadsEnabled() { return sGetBoxQuadsEnabled; }
/**
* Returns true if the requestIdleCallback API should be enabled.
*/
@ -3438,7 +3433,6 @@ class nsContentUtils {
static bool sIsHandlingKeyBoardEvent;
static bool sAllowXULXBL_for_file;
static bool sGetBoxQuadsEnabled;
static bool sSkipCursorMoveForSameValueSet;
static bool sRequestIdleCallbackEnabled;
static bool sTailingEnabled;

Просмотреть файл

@ -36,6 +36,7 @@
#include "mozilla/dom/SVGUseElement.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/dom/l10n/DOMOverlays.h"
#include "mozilla/StaticPrefs.h"
#include "nsAttrValueOrString.h"
#include "nsBindingManager.h"
#include "nsCCUncollectableMarker.h"
@ -2661,7 +2662,7 @@ Element* nsINode::GetParentElementCrossingShadowRoot() const {
bool nsINode::HasBoxQuadsSupport(JSContext* aCx, JSObject* /* unused */) {
return xpc::AccessCheck::isChrome(js::GetContextCompartment(aCx)) ||
nsContentUtils::GetBoxQuadsEnabled();
StaticPrefs::layout_css_getBoxQuads_enabled();
}
nsINode* nsINode::GetScopeChainParent() const { return nullptr; }

Просмотреть файл

@ -1234,6 +1234,19 @@ VARCACHE_PREF(
)
#undef PREF_VALUE
// Is support for GeometryUtils.getBoxQuads enabled?
#ifdef RELEASE_OR_BETA
# define PREF_VALUE false
#else
# define PREF_VALUE true
#endif
VARCACHE_PREF(
"layout.css.getBoxQuads.enabled",
layout_css_getBoxQuads_enabled,
bool, PREF_VALUE
)
#undef PREF_VALUE
// Pref to control whether arrow-panel animations are enabled or not.
// Transitions are currently disabled on Linux due to rendering issues on
// certain configurations.

Просмотреть файл

@ -3096,13 +3096,6 @@ pref("layout.css.DOMQuad.enabled", true);
// Is support for DOMMatrix enabled?
pref("layout.css.DOMMatrix.enabled", true);
// Is support for GeometryUtils.getBoxQuads enabled?
#ifdef RELEASE_OR_BETA
pref("layout.css.getBoxQuads.enabled", false);
#else
pref("layout.css.getBoxQuads.enabled", true);
#endif
// Is support for GeometryUtils.convert*FromNode enabled?
#ifdef RELEASE_OR_BETA
pref("layout.css.convertFromNode.enabled", false);