Bug 1573268 - remove the varcache definition for svg.transform-box.enabled. r=njn

svg.transform-box.enabled is already a static pref, so I removed the varcache definition of it in nsLayoutUtils.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kristen Wright 2019-08-14 00:17:04 +00:00
Родитель e1e114c69d
Коммит 61d69ccebf
3 изменённых файлов: 2 добавлений и 8 удалений

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

@ -183,8 +183,6 @@ bool nsLayoutUtils::gPreventAssertInCompareTreePosition = false;
typedef ScrollableLayerGuid::ViewID ViewID;
typedef nsStyleTransformMatrix::TransformReferenceBox TransformReferenceBox;
/* static */
bool nsLayoutUtils::sSVGTransformBoxEnabled;
/* static */
uint32_t nsLayoutUtils::sIdlePeriodDeadlineLimit;
/* static */
@ -7963,8 +7961,6 @@ size_t nsLayoutUtils::SizeOfTextRunsForFrames(nsIFrame* aFrame,
/* static */
void nsLayoutUtils::Initialize() {
Preferences::AddBoolVarCache(&sSVGTransformBoxEnabled,
"svg.transform-box.enabled");
Preferences::AddUintVarCache(&sIdlePeriodDeadlineLimit,
"layout.idle_period.time_limit",
DEFAULT_IDLE_PERIOD_TIME_LIMIT);

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

@ -2442,8 +2442,6 @@ class nsLayoutUtils {
static bool FontSizeInflationEnabled(nsPresContext* aPresContext);
static bool SVGTransformBoxEnabled() { return sSVGTransformBoxEnabled; }
static uint32_t IdlePeriodDeadlineLimit() { return sIdlePeriodDeadlineLimit; }
static uint32_t QuiescentFramesBeforeIdlePeriod() {
@ -2994,7 +2992,6 @@ class nsLayoutUtils {
const nsIFrame* aFrame);
private:
static bool sSVGTransformBoxEnabled;
static uint32_t sIdlePeriodDeadlineLimit;
static uint32_t sQuiescentFramesBeforeIdlePeriod;

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

@ -13,6 +13,7 @@
#include "nsPresContext.h"
#include "nsSVGUtils.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/StaticPrefs_svg.h"
#include "mozilla/StyleAnimationValue.h"
#include "gfxMatrix.h"
#include "gfxQuaternion.h"
@ -47,7 +48,7 @@ void TransformReferenceBox::EnsureDimensionsAreCached() {
mIsCached = true;
if (mFrame->GetStateBits() & NS_FRAME_SVG_LAYOUT) {
if (!nsLayoutUtils::SVGTransformBoxEnabled()) {
if (!StaticPrefs::svg_transform_box_enabled()) {
mX = -mFrame->GetPosition().x;
mY = -mFrame->GetPosition().y;
Size contextSize = nsSVGUtils::GetContextSize(mFrame);