Skip to content

Commit

Permalink
Backed out 31 changesets (bug 1552643, bug 1550422) for xpcshell cras…
Browse files Browse the repository at this point in the history
…h on a CLOSED TREE.

Backed out changeset e30c1aa75529 (bug 1552643)
Backed out changeset caadcd7e02d3 (bug 1552643)
Backed out changeset aa7086ab09be (bug 1552643)
Backed out changeset 0b4029671710 (bug 1550422)
Backed out changeset a16295296035 (bug 1550422)
Backed out changeset 3b70307c0db5 (bug 1550422)
Backed out changeset 69df7818d4a3 (bug 1550422)
Backed out changeset d98dfc565927 (bug 1550422)
Backed out changeset 6f0997976944 (bug 1550422)
Backed out changeset 0edd264464c2 (bug 1550422)
Backed out changeset 9ea6da7a74ec (bug 1550422)
Backed out changeset f855f9309c8b (bug 1550422)
Backed out changeset 1033546224a7 (bug 1550422)
Backed out changeset ade7384c6186 (bug 1550422)
Backed out changeset 75b04de7e99c (bug 1550422)
Backed out changeset 91c3acdb2454 (bug 1550422)
Backed out changeset 77d2f80257d1 (bug 1550422)
Backed out changeset e0cd10d35327 (bug 1550422)
Backed out changeset 097091082423 (bug 1550422)
Backed out changeset 2f328853c1ab (bug 1550422)
Backed out changeset f92f2cc29cb1 (bug 1550422)
Backed out changeset 6dc82f88333d (bug 1550422)
Backed out changeset c20f66494d69 (bug 1550422)
Backed out changeset 2ba22cddeb6f (bug 1550422)
Backed out changeset 3aa72f89e295 (bug 1550422)
Backed out changeset ab4c4e806977 (bug 1550422)
Backed out changeset 72e5de040dda (bug 1550422)
Backed out changeset 7d3c2d486706 (bug 1550422)
Backed out changeset 132e0b8d8468 (bug 1550422)
Backed out changeset 54c85ac75dd0 (bug 1550422)
Backed out changeset d7ba4a18dd54 (bug 1550422)
  • Loading branch information
raulgurzau committed May 25, 2019
1 parent 742de43 commit 010253f
Show file tree
Hide file tree
Showing 273 changed files with 4,100 additions and 6,334 deletions.
5 changes: 2 additions & 3 deletions devtools/server/actors/highlighters/utils/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ const { getComputedStyle } = require("./markup");
//
// This canvas size value is the safest we can use because most GPUs can handle it.
// It's also far from the maximum canvas memory allocation limit (4096x4096x4 is
// 67.108.864 bytes, where the limit is 500.000.000 bytes, see
// MaxAllocSizeDoNotUseDirectly in:
// https://searchfox.org/mozilla-central/source/modules/libpref/init/StaticPrefList.h).
// 67.108.864 bytes, where the limit is 500.000.000 bytes, see:
// http://searchfox.org/mozilla-central/source/gfx/thebes/gfxPrefs.h#401).
//
// Note:
// Once bug 1232491 lands, we could try to refactor this code to use the values from
Expand Down
7 changes: 4 additions & 3 deletions dom/base/Document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
#include "nsWindowSizes.h"
#include "mozilla/dom/Location.h"
#include "mozilla/dom/FontFaceSet.h"
#include "gfxPrefs.h"
#include "nsISupportsPrimitives.h"
#include "mozilla/ServoStyleSet.h"
#include "mozilla/StyleSheet.h"
Expand Down Expand Up @@ -7146,7 +7147,7 @@ nsViewportInfo Document::GetViewportInfo(const ScreenIntSize& aDisplaySize) {
// Special behaviour for desktop mode, provided we are not on an about: page
nsPIDOMWindowOuter* win = GetWindow();
if (win && win->IsDesktopModeViewport() && !IsAboutPage()) {
CSSCoord viewportWidth = StaticPrefs::DesktopViewportWidth() / fullZoom;
CSSCoord viewportWidth = gfxPrefs::DesktopViewportWidth() / fullZoom;
CSSToScreenScale scaleToFit(aDisplaySize.width / viewportWidth);
float aspectRatio = (float)aDisplaySize.height / aDisplaySize.width;
CSSSize viewportSize(viewportWidth, viewportWidth * aspectRatio);
Expand Down Expand Up @@ -7240,7 +7241,7 @@ nsViewportInfo Document::GetViewportInfo(const ScreenIntSize& aDisplaySize) {
nsViewportInfo::ZoomFlag effectiveZoomFlag =
mAllowZoom ? nsViewportInfo::ZoomFlag::AllowZoom
: nsViewportInfo::ZoomFlag::DisallowZoom;
if (StaticPrefs::ForceUserScalable()) {
if (gfxPrefs::ForceUserScalable()) {
// If the pref to force user-scalable is enabled, we ignore the values
// from the meta-viewport tag for these properties and just assume they
// allow the page to be scalable. Note in particular that this code is
Expand Down Expand Up @@ -7353,7 +7354,7 @@ nsViewportInfo Document::GetViewportInfo(const ScreenIntSize& aDisplaySize) {
// Divide by fullZoom to stretch CSS pixel size of viewport in order
// to keep device pixel size unchanged after full zoom applied.
// See bug 974242.
width = StaticPrefs::DesktopViewportWidth() / fullZoom;
width = gfxPrefs::DesktopViewportWidth() / fullZoom;
} else {
// Some viewport information was provided; follow the spec.
width = displaySize.width;
Expand Down
3 changes: 2 additions & 1 deletion dom/base/TextInputProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* 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 "gfxPrefs.h"
#include "mozilla/dom/Event.h"
#include "mozilla/EventForwards.h"
#include "mozilla/Maybe.h"
Expand Down Expand Up @@ -389,7 +390,7 @@ nsresult TextInputProcessor::BeginInputTransactionInternal(

nsresult rv = NS_OK;
if (aForTests) {
bool isAPZAware = StaticPrefs::TestEventsAsyncEnabled();
bool isAPZAware = gfxPrefs::TestEventsAsyncEnabled();
rv = dispatcher->BeginTestInputTransaction(this, isAPZAware);
} else {
rv = dispatcher->BeginInputTransaction(this);
Expand Down
4 changes: 2 additions & 2 deletions dom/base/nsContentUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// is included in mozAutoDocUpdate.h.
#include "nsNPAPIPluginInstance.h"
#include "gfxDrawable.h"
#include "mozilla/StaticPrefs.h"
#include "gfxPrefs.h"
#include "ImageOps.h"
#include "mozAutoDocUpdate.h"
#include "mozilla/AntiTrackingCommon.h"
Expand Down Expand Up @@ -7909,7 +7909,7 @@ nsresult nsContentUtils::SendMouseEvent(
}
return presShell->HandleEvent(view->GetFrame(), &event, false, &status);
}
if (StaticPrefs::TestEventsAsyncEnabled()) {
if (gfxPrefs::TestEventsAsyncEnabled()) {
status = widget->DispatchInputEvent(&event);
} else {
nsresult rv = widget->DispatchEvent(&event, status);
Expand Down
4 changes: 2 additions & 2 deletions dom/base/nsDOMWindowUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include "mozilla/MiscEvents.h"
#include "mozilla/MouseEvents.h"
#include "mozilla/PresShell.h"
#include "mozilla/StaticPrefs.h"
#include "mozilla/TextEvents.h"
#include "mozilla/TextEventDispatcher.h"
#include "mozilla/TouchEvents.h"
Expand All @@ -70,6 +69,7 @@
#endif

#include "Layers.h"
#include "gfxPrefs.h"

#include "mozilla/dom/AudioDeviceInfo.h"
#include "mozilla/dom/Element.h"
Expand Down Expand Up @@ -470,7 +470,7 @@ nsDOMWindowUtils::SetDisplayPortForElement(float aXPx, float aYPx,
new DisplayPortPropertyData(displayport, aPriority),
nsINode::DeleteProperty<DisplayPortPropertyData>);

if (StaticPrefs::LayoutUseContainersForRootFrames()) {
if (gfxPrefs::LayoutUseContainersForRootFrames()) {
nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame();
if (rootScrollFrame && aElement == rootScrollFrame->GetContent() &&
nsLayoutUtils::UsesAsyncScrolling(rootScrollFrame)) {
Expand Down
4 changes: 3 additions & 1 deletion dom/base/nsImageLoadingContent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#include "nsIContentPolicy.h"
#include "SVGObserverUtils.h"

#include "gfxPrefs.h"

#include "mozAutoDocUpdate.h"
#include "mozilla/AsyncEventDispatcher.h"
#include "mozilla/AutoRestore.h"
Expand Down Expand Up @@ -527,7 +529,7 @@ void nsImageLoadingContent::MaybeForceSyncDecoding(
// attribute on a timer.
TimeStamp now = TimeStamp::Now();
TimeDuration threshold = TimeDuration::FromMilliseconds(
StaticPrefs::ImageInferSrcAnimationThresholdMS());
gfxPrefs::ImageInferSrcAnimationThresholdMS());

// If the length of time between request changes is less than the threshold,
// then force sync decoding to eliminate flicker from the animation.
Expand Down
6 changes: 3 additions & 3 deletions dom/canvas/CanvasRenderingContext2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include "gfxPlatform.h"
#include "gfxFont.h"
#include "gfxBlur.h"
#include "gfxPrefs.h"
#include "gfxTextRun.h"
#include "gfxUtils.h"

Expand Down Expand Up @@ -92,7 +93,6 @@
#include "mozilla/MathAlgorithms.h"
#include "mozilla/Preferences.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/StaticPrefs.h"
#include "mozilla/Telemetry.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/UniquePtr.h"
Expand Down Expand Up @@ -1231,8 +1231,8 @@ bool CanvasRenderingContext2D::EnsureTarget(const gfx::Rect* aCoveredRect,
}

// Check that the dimensions are sane
if (mWidth > StaticPrefs::MaxCanvasSize() ||
mHeight > StaticPrefs::MaxCanvasSize() || mWidth < 0 || mHeight < 0) {
if (mWidth > gfxPrefs::MaxCanvasSize() ||
mHeight > gfxPrefs::MaxCanvasSize() || mWidth < 0 || mHeight < 0) {
SetErrorState();
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions dom/canvas/WebGL2Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "WebGL2Context.h"

#include "mozilla/StaticPrefs.h"
#include "gfxPrefs.h"
#include "GLContext.h"
#include "mozilla/dom/WebGL2RenderingContextBinding.h"
#include "mozilla/ArrayUtils.h"
Expand All @@ -31,7 +31,7 @@ UniquePtr<webgl::FormatUsageAuthority> WebGL2Context::CreateFormatUsage(
}

/*static*/
bool WebGL2Context::IsSupported() { return StaticPrefs::WebGL2Enabled(); }
bool WebGL2Context::IsSupported() { return gfxPrefs::WebGL2Enabled(); }

/*static*/
WebGL2Context* WebGL2Context::Create() { return new WebGL2Context(); }
Expand Down
1 change: 1 addition & 0 deletions dom/canvas/WebGL2ContextQueries.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "WebGL2Context.h"
#include "GLContext.h"
#include "WebGLQuery.h"
#include "gfxPrefs.h"
#include "nsThreadUtils.h"

namespace mozilla {
Expand Down
4 changes: 2 additions & 2 deletions dom/canvas/WebGL2ContextSync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ GLenum WebGL2Context::ClientWaitSync(const WebGLSync& sync, GLbitfield flags,
}

const bool canBeAvailable =
(sync.mCanBeAvailable || StaticPrefs::WebGLImmediateQueries());
(sync.mCanBeAvailable || gfxPrefs::WebGLImmediateQueries());
if (!canBeAvailable) {
if (timeout) {
GenerateWarning(
Expand Down Expand Up @@ -118,7 +118,7 @@ void WebGL2Context::GetSyncParameter(JSContext*, const WebGLSync& sync,
////

const bool canBeAvailable =
(sync.mCanBeAvailable || StaticPrefs::WebGLImmediateQueries());
(sync.mCanBeAvailable || gfxPrefs::WebGLImmediateQueries());
if (!canBeAvailable && pname == LOCAL_GL_SYNC_STATUS) {
retval.set(JS::Int32Value(LOCAL_GL_UNSIGNALED));
return;
Expand Down
39 changes: 19 additions & 20 deletions dom/canvas/WebGLContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "gfxContext.h"
#include "gfxCrashReporterUtils.h"
#include "gfxPattern.h"
#include "gfxPrefs.h"
#include "gfxUtils.h"
#include "MozFramebuffer.h"
#include "GLBlitHelper.h"
Expand All @@ -34,7 +35,6 @@
#include "mozilla/ProcessPriorityManager.h"
#include "mozilla/ScopeExit.h"
#include "mozilla/Services.h"
#include "mozilla/StaticPrefs.h"
#include "mozilla/Telemetry.h"
#include "nsContentUtils.h"
#include "nsDisplayList.h"
Expand Down Expand Up @@ -97,7 +97,7 @@ using namespace mozilla::layers;

WebGLContextOptions::WebGLContextOptions() {
// Set default alpha state based on preference.
if (StaticPrefs::WebGLDefaultNoAlpha()) alpha = false;
if (gfxPrefs::WebGLDefaultNoAlpha()) alpha = false;
}

bool WebGLContextOptions::operator==(const WebGLContextOptions& r) const {
Expand All @@ -116,18 +116,18 @@ bool WebGLContextOptions::operator==(const WebGLContextOptions& r) const {
WebGLContext::WebGLContext()
: gl(mGL_OnlyClearInDestroyResourcesAndContext) // const reference
,
mMaxPerfWarnings(StaticPrefs::WebGLMaxPerfWarnings()),
mMaxPerfWarnings(gfxPrefs::WebGLMaxPerfWarnings()),
mNumPerfWarnings(0),
mMaxAcceptableFBStatusInvals(
StaticPrefs::WebGLMaxAcceptableFBStatusInvals()),
gfxPrefs::WebGLMaxAcceptableFBStatusInvals()),
mDataAllocGLCallCount(0),
mEmptyTFO(0),
mContextLossHandler(this),
mNeedsFakeNoAlpha(false),
mNeedsFakeNoDepth(false),
mNeedsFakeNoStencil(false),
mAllowFBInvalidation(StaticPrefs::WebGLFBInvalidation()),
mMsaaSamples((uint8_t)StaticPrefs::WebGLMsaaSamples()) {
mAllowFBInvalidation(gfxPrefs::WebGLFBInvalidation()),
mMsaaSamples((uint8_t)gfxPrefs::WebGLMsaaSamples()) {
mGeneration = 0;
mInvalidated = false;
mCapturedFrameInvalidated = false;
Expand Down Expand Up @@ -163,7 +163,7 @@ WebGLContext::WebGLContext()
mAlreadyWarnedAboutFakeVertexAttrib0 = false;
mAlreadyWarnedAboutViewportLargerThanDest = false;

mMaxWarnings = StaticPrefs::WebGLMaxWarningsPerContext();
mMaxWarnings = gfxPrefs::WebGLMaxWarningsPerContext();
if (mMaxWarnings < -1) {
GenerateWarning(
"webgl.max-warnings-per-context size is too large (seems like a "
Expand Down Expand Up @@ -359,11 +359,11 @@ WebGLContext::SetContextOptions(JSContext* cx, JS::Handle<JS::Value> options,
}

// Don't do antialiasing if we've disabled MSAA.
if (!StaticPrefs::MSAALevel()) {
if (!gfxPrefs::MSAALevel()) {
newOpts.antialias = false;
}

if (!StaticPrefs::WebGLForceMSAA()) {
if (!gfxPrefs::WebGLForceMSAA()) {
const nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();

nsCString blocklistId;
Expand Down Expand Up @@ -475,7 +475,7 @@ bool WebGLContext::CreateAndInitGL(

if (IsWebGL2()) {
flags |= gl::CreateContextFlags::PREFER_ES3;
} else if (!StaticPrefs::WebGL1AllowCoreProfile()) {
} else if (!gfxPrefs::WebGL1AllowCoreProfile()) {
flags |= gl::CreateContextFlags::REQUIRE_COMPAT_PROFILE;
}

Expand All @@ -496,7 +496,7 @@ bool WebGLContext::CreateAndInitGL(
// - Same origin with root page (try to stem bleeding from WebGL
// ads/trackers)
default:
if (!StaticPrefs::WebGLDefaultLowPower()) {
if (!gfxPrefs::WebGLDefaultLowPower()) {
flags |= gl::CreateContextFlags::HIGH_POWER;
}
break;
Expand Down Expand Up @@ -541,11 +541,11 @@ bool WebGLContext::CreateAndInitGL(
tryNativeGL = false;
tryANGLE = true;

if (StaticPrefs::WebGLDisableWGL()) {
if (gfxPrefs::WebGLDisableWGL()) {
tryNativeGL = false;
}

if (StaticPrefs::WebGLDisableANGLE() || PR_GetEnv("MOZ_WEBGL_FORCE_OPENGL") ||
if (gfxPrefs::WebGLDisableANGLE() || PR_GetEnv("MOZ_WEBGL_FORCE_OPENGL") ||
useEGL) {
tryNativeGL = true;
tryANGLE = false;
Expand Down Expand Up @@ -801,7 +801,7 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight) {
// pick up the old generation.
++mGeneration;

bool disabled = StaticPrefs::WebGLDisabled();
bool disabled = gfxPrefs::WebGLDisabled();

// TODO: When we have software webgl support we should use that instead.
disabled |= gfxPlatform::InSafeMode();
Expand All @@ -817,7 +817,7 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight) {
return NS_ERROR_FAILURE;
}

if (StaticPrefs::WebGLDisableFailIfMajorPerformanceCaveat()) {
if (gfxPrefs::WebGLDisableFailIfMajorPerformanceCaveat()) {
mOptions.failIfMajorPerformanceCaveat = false;
}

Expand All @@ -834,7 +834,7 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight) {
}

// Alright, now let's start trying.
bool forceEnabled = StaticPrefs::WebGLForceEnabled();
bool forceEnabled = gfxPrefs::WebGLForceEnabled();
ScopedGfxFeatureReporter reporter("WebGL", forceEnabled);

MOZ_ASSERT(!gl);
Expand Down Expand Up @@ -966,9 +966,8 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight) {
}

void WebGLContext::LoseOldestWebGLContextIfLimitExceeded() {
const auto maxWebGLContexts = StaticPrefs::WebGLMaxContexts();
auto maxWebGLContextsPerPrincipal =
StaticPrefs::WebGLMaxContextsPerPrincipal();
const auto maxWebGLContexts = gfxPrefs::WebGLMaxContexts();
auto maxWebGLContextsPerPrincipal = gfxPrefs::WebGLMaxContextsPerPrincipal();

// maxWebGLContextsPerPrincipal must be less than maxWebGLContexts
MOZ_ASSERT(maxWebGLContextsPerPrincipal <= maxWebGLContexts);
Expand Down Expand Up @@ -1330,7 +1329,7 @@ ScopedPrepForResourceClear::~ScopedPrepForResourceClear() {
// -

void WebGLContext::OnEndOfFrame() const {
if (StaticPrefs::WebGLSpewFrameAllocs()) {
if (gfxPrefs::WebGLSpewFrameAllocs()) {
GeneratePerfWarning("[webgl.perf.spew-frame-allocs] %" PRIu64
" data allocations this frame.",
mDataAllocGLCallCount);
Expand Down
3 changes: 2 additions & 1 deletion dom/canvas/WebGLContextExtensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "WebGLContext.h"
#include "WebGLContextUtils.h"
#include "WebGLExtensions.h"
#include "gfxPrefs.h"
#include "GLContext.h"

#include "nsString.h"
Expand Down Expand Up @@ -81,7 +82,7 @@ bool WebGLContext::IsExtensionSupported(dom::CallerType callerType,
allowPrivilegedExts = true;
}

if (StaticPrefs::WebGLPrivilegedExtensionsEnabled()) {
if (gfxPrefs::WebGLPrivilegedExtensionsEnabled()) {
allowPrivilegedExts = true;
}

Expand Down
Loading

0 comments on commit 010253f

Please sign in to comment.