summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--SECURITY.md5
-rw-r--r--build/moz.configure/init.configure14
-rw-r--r--config/recurse.mk2
-rw-r--r--devtools/client/preferences/devtools.js12
-rw-r--r--devtools/shared/tests/unit/xpcshell.ini6
-rw-r--r--dom/base/DOMIntersectionObserver.cpp8
-rw-r--r--dom/base/Navigator.cpp11
-rw-r--r--dom/base/Navigator.h2
-rw-r--r--dom/base/UseCounter.h36
-rw-r--r--dom/base/UseCounters.conf63
-rwxr-xr-xdom/base/gen-usecounters.py80
-rwxr-xr-xdom/base/moz.build15
-rw-r--r--dom/base/nsDOMWindowUtils.cpp24
-rw-r--r--dom/base/nsDocument.cpp77
-rw-r--r--dom/base/nsIDocument.h46
-rw-r--r--dom/base/nsImageLoadingContent.cpp6
-rw-r--r--dom/base/test/browser.ini8
-rw-r--r--dom/base/test/browser_use_counters.js238
-rw-r--r--dom/base/test/file_use_counter_outer.html17
-rw-r--r--dom/base/test/file_use_counter_svg_currentScale.svg17
-rw-r--r--dom/base/test/file_use_counter_svg_fill_pattern.svg15
-rw-r--r--dom/base/test/file_use_counter_svg_fill_pattern_data.svg15
-rw-r--r--dom/base/test/file_use_counter_svg_fill_pattern_definition.svg14
-rw-r--r--dom/base/test/file_use_counter_svg_fill_pattern_internal.svg23
-rw-r--r--dom/base/test/file_use_counter_svg_getElementById.svg22
-rw-r--r--dom/base/usecounters.py71
-rw-r--r--dom/bindings/BindingUtils.cpp12
-rw-r--r--dom/bindings/BindingUtils.h6
-rw-r--r--dom/bindings/Codegen.py37
-rw-r--r--dom/bindings/parser/WebIDL.py10
-rw-r--r--dom/html/HTMLImageElement.cpp12
-rw-r--r--dom/html/HTMLImageElement.h6
-rw-r--r--dom/interfaces/base/nsIDOMWindowUtils.idl13
-rw-r--r--dom/quota/ActorsParent.cpp39
-rw-r--r--dom/svg/nsSVGElement.cpp36
-rw-r--r--dom/webidl/External.webidl2
-rw-r--r--dom/webidl/Navigator.webidl7
-rw-r--r--dom/webidl/OfflineResourceList.webidl14
-rw-r--r--dom/webidl/PushManager.webidl2
-rw-r--r--dom/webidl/PushSubscription.webidl2
-rw-r--r--dom/webidl/SVGSVGElement.webidl2
-rw-r--r--dom/webidl/Window.webidl2
-rw-r--r--gfx/src/DriverCrashGuard.cpp8
-rw-r--r--gfx/thebes/gfxEnv.h1
-rw-r--r--image/DynamicImage.cpp6
-rw-r--r--image/ImageWrapper.cpp6
-rw-r--r--image/RasterImage.cpp6
-rw-r--r--image/VectorImage.cpp10
-rw-r--r--image/imgIContainer.idl11
-rw-r--r--js/src/builtin/TestingFunctions.cpp41
-rw-r--r--js/src/jit/x86-shared/BaseAssembler-x86-shared.h23
-rw-r--r--js/src/js-config.mozbuild6
-rw-r--r--js/src/jsutil.h4
-rw-r--r--js/src/vm/Debugger.cpp10
-rw-r--r--js/src/vm/Debugger.h4
-rw-r--r--js/src/vm/UnboxedObject.cpp10
-rw-r--r--js/src/wasm/AsmJS.cpp5
-rw-r--r--layout/generic/nsBulletFrame.cpp10
-rw-r--r--layout/style/ImageLoader.cpp23
-rw-r--r--layout/style/ImageLoader.h2
-rw-r--r--layout/style/nsCSSDataBlock.cpp19
-rw-r--r--layout/style/nsCSSDataBlock.h9
-rw-r--r--layout/style/nsCSSParser.cpp42
-rw-r--r--layout/style/nsCSSProps.cpp15
-rw-r--r--layout/style/nsCSSProps.h12
-rw-r--r--mfbt/WeakPtr.h2
-rw-r--r--modules/libpref/init/all.js65
-rw-r--r--toolkit/components/formautofill/formautofill.manifest3
-rw-r--r--toolkit/content/aboutSupport.js18
-rw-r--r--toolkit/modules/AppConstants.jsm18
-rw-r--r--xpcom/glue/nsDebug.h2
-rw-r--r--xpcom/glue/nsISupportsImpl.h4
73 files changed, 96 insertions, 1352 deletions
diff --git a/README.md b/README.md
index e24a7476ce..4f849359de 100644
--- a/README.md
+++ b/README.md
@@ -9,8 +9,6 @@ selective cherry-picking of directly-applicable patches, this repository has its
own development and holds the base for a maintained platform to be used by XUL
applications.
-For a list of active projects making use of the Unified XUL Platform, checkout http://thereisonlyxul.org/.
-
## Additional documentation
Additional documentation relevant to this source code can be found in the `/docs`
@@ -23,7 +21,7 @@ You are also always welcome to get in touch with our community on the [Pale Moon
### A note about trademarks and branding
-Although this repository is licensed under Mozilla Public License v2.0, the
+Although this repository is primarily licensed under Mozilla Public License v2.0, the
trademarks and brands contained herein remain the property of their respective
owners. For more details, please see the notifications in the respective directories.
diff --git a/SECURITY.md b/SECURITY.md
index 8ef8316746..8da448d59c 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -15,14 +15,14 @@ What should be considered vulnerabilities or security hazards by default:
Generally not security vulnerabilities:
- Null dereferencing crashes;
-- Malware extensions (but please do report those on the forum in the extensions board!);
+- Malware extensions (but please do report those on the forum in the add-ons board!);
- Denial-of-service (AKA "evil trap sites")
- Browser hangs
- Issues with non-standard manual configuration (either at build time or by manipulating about:config directly)
## Reporting a Vulnerability
-If you find an issue in UXP or the applications it builds on that could impact the security or safety of users please **do not**
+If you find an issue in UXP, or the applications building on it, that could impact the security or safety of users please **do not**
make an issue on Gitea about it. Gitea does not support restricted viewability for security sensitive bugs.
If you want to report a security-sensitive issue then please go to the [forum](https://forum.palemoon.org) and report the issue
@@ -33,4 +33,3 @@ except the recipient (not even moderators!).
You will be informed via private message if the vulnerability report is accepted or declined, with reasoning.
Security updates occur regularly and are given priority over most other development tasks. In general, they can be solved
relatively quickly and will be included in the next point release (third digit if not rolled into a more major one).
-
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
index 893da821cd..f0d6b791b6 100644
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -666,11 +666,7 @@ set_define('MOZ_BUILD_APP', build_project)
add_old_configure_assignment('MOZ_BUILD_APP', build_project)
-# set RELEASE_OR_BETA and NIGHTLY_BUILD variables depending on the cycle we're in
-# The logic works like this:
-# - if we have "a1" in GRE_MILESTONE, we're building Nightly (define NIGHTLY_BUILD)
-# - otherwise, if we have "a" in GRE_MILESTONE, we're building Nightly or Aurora
-# - otherwise, we're building Release/Beta (define RELEASE_OR_BETA)
+# set RELEASE_OR_BETA and NIGHTLY_BUILD variables for compatibility
@depends(check_build_environment, '--help')
@imports(_from='__builtin__', _import='open')
def milestone(build_env, _):
@@ -680,12 +676,8 @@ def milestone(build_env, _):
with open(milestone_path, 'r') as fh:
milestone = fh.read().splitlines()[-1]
- is_nightly = is_release_or_beta = None
-
- if 'a1' in milestone:
- is_nightly = True
- elif 'a' not in milestone:
- is_release_or_beta = True
+ is_nightly = None
+ is_release_or_beta = True
return namespace(version=milestone,
is_nightly=is_nightly,
diff --git a/config/recurse.mk b/config/recurse.mk
index 7628eae367..c7bb531c6e 100644
--- a/config/recurse.mk
+++ b/config/recurse.mk
@@ -158,7 +158,7 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),gtk3)
toolkit/library/target: widget/gtk/mozgtk/gtk3/target
endif
ifdef MOZ_LDAP_XPCOM
-ldap/target: config/external/nss/target mozglue/build/target
+ldap/target: security/target mozglue/build/target
toolkit/library/target: ldap/target
endif
ifeq ($(MOZ_REPLACE_MALLOC_LINKAGE),dummy library)
diff --git a/devtools/client/preferences/devtools.js b/devtools/client/preferences/devtools.js
index 2f31e18e30..a8c4e119ee 100644
--- a/devtools/client/preferences/devtools.js
+++ b/devtools/client/preferences/devtools.js
@@ -146,12 +146,8 @@ pref("devtools.performance.ui.show-triggers-for-gc-types",
// TODO remove once we have flame charts via bug 1148663
pref("devtools.performance.ui.enable-memory-flame", false);
-// Enable experimental options in the UI only in Nightly
-#if defined(NIGHTLY_BUILD)
-pref("devtools.performance.ui.experimental", true);
-#else
+// Enable experimental options in the UI?
pref("devtools.performance.ui.experimental", false);
-#endif
// The default cache UI setting
pref("devtools.cache.disabled", false);
@@ -304,12 +300,8 @@ pref("devtools.webconsole.timestampMessages", false);
// to automatically trigger multiline editing (equivalent to shift + enter).
pref("devtools.webconsole.autoMultiline", true);
-// Enable the experimental webconsole frontend
-#if defined(NIGHTLY_BUILD)
-pref("devtools.webconsole.new-frontend-enabled", true);
-#else
+// Enable the experimental webconsole frontend?
pref("devtools.webconsole.new-frontend-enabled", false);
-#endif
// Enable the experimental support for source maps in console (work in progress)
pref("devtools.sourcemap.locations.enabled", false);
diff --git a/devtools/shared/tests/unit/xpcshell.ini b/devtools/shared/tests/unit/xpcshell.ini
index d0323c813c..92a561e8c3 100644
--- a/devtools/shared/tests/unit/xpcshell.ini
+++ b/devtools/shared/tests/unit/xpcshell.ini
@@ -9,12 +9,6 @@ support-files =
[test_assert.js]
[test_csslexer.js]
-[test_css-properties-db.js]
-# This test only enforces that the CSS database is up to date with nightly. The DB is
-# only used when inspecting a target that doesn't support the getCSSDatabase actor.
-# CSS properties are behind compile-time flags, and there is no automatic rebuild
-# process for uplifts, so this test breaks on uplift.
-run-if = nightly_build
[test_fetch-bom.js]
[test_fetch-chrome.js]
[test_fetch-file.js]
diff --git a/dom/base/DOMIntersectionObserver.cpp b/dom/base/DOMIntersectionObserver.cpp
index bc8f030d0f..7ee1a4c938 100644
--- a/dom/base/DOMIntersectionObserver.cpp
+++ b/dom/base/DOMIntersectionObserver.cpp
@@ -84,7 +84,7 @@ DOMIntersectionObserver::Constructor(const mozilla::dom::GlobalObject& aGlobal,
if (!observer->SetRootMargin(aOptions.mRootMargin)) {
aRv.ThrowDOMException(NS_ERROR_DOM_SYNTAX_ERR,
- NS_LITERAL_CSTRING("rootMargin must be specified in pixels or percent."));
+ NS_LITERAL_CSTRING("rootMargin must be a valid absolute or percent length."));
return nullptr;
}
@@ -126,7 +126,9 @@ DOMIntersectionObserver::SetRootMargin(const nsAString& aString)
for (uint32_t i = 0; i < ArrayLength(nsCSSRect::sides); ++i) {
nsCSSValue value = mRootMargin.*nsCSSRect::sides[i];
- if (!(value.IsPixelLengthUnit() || value.IsPercentLengthUnit())) {
+ if (!(value.IsPixelLengthUnit() ||
+ value.IsPercentLengthUnit() ||
+ value.IsFloatUnit(value.GetUnit()))) {
return false;
}
}
@@ -327,6 +329,8 @@ DOMIntersectionObserver::Update(nsIDocument* aDocument, DOMHighResTimeStamp time
nsStyleCoord coord;
if (value.IsPixelLengthUnit()) {
coord.SetCoordValue(value.GetPixelLength());
+ } else if (value.IsFloatUnit(value.GetUnit())) {
+ coord.SetCoordValue(value.GetFloatValue());
} else if (value.IsPercentLengthUnit()) {
coord.SetPercentValue(value.GetPercentValue());
} else {
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
index 096f9794a9..28b66be3db 100644
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1346,14 +1346,9 @@ Navigator::HasUserMediaSupport(JSContext* /* unused */,
bool
Navigator::IsE10sEnabled(JSContext* aCx, JSObject* aGlobal)
{
- return XRE_IsContentProcess();
-}
-
-bool
-Navigator::MozE10sEnabled()
-{
- // This will only be called if IsE10sEnabled() is true.
- return true;
+ // We no longer support this, so always false.
+ // TODO: Remove this.
+ return false;
}
/* static */
diff --git a/dom/base/Navigator.h b/dom/base/Navigator.h
index 56e7dfaf8a..2915b50692 100644
--- a/dom/base/Navigator.h
+++ b/dom/base/Navigator.h
@@ -214,8 +214,6 @@ public:
void GetLanguages(nsTArray<nsString>& aLanguages);
- bool MozE10sEnabled();
-
StorageManager* Storage();
static void GetAcceptLanguages(nsTArray<nsString>& aLanguages);
diff --git a/dom/base/UseCounter.h b/dom/base/UseCounter.h
deleted file mode 100644
index 01cdb9969e..0000000000
--- a/dom/base/UseCounter.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/. */
-#ifndef UseCounter_h_
-#define UseCounter_h_
-
-#include <stdint.h>
-
-namespace mozilla {
-
-enum UseCounter : int16_t {
- eUseCounter_UNKNOWN = -1,
-#define USE_COUNTER_DOM_METHOD(interface_, name_) \
- eUseCounter_##interface_##_##name_,
-#define USE_COUNTER_DOM_ATTRIBUTE(interface_, name_) \
- eUseCounter_##interface_##_##name_##_getter, \
- eUseCounter_##interface_##_##name_##_setter,
-#define USE_COUNTER_CSS_PROPERTY(name_, id_) \
- eUseCounter_property_##id_,
-#include "mozilla/dom/UseCounterList.h"
-#undef USE_COUNTER_DOM_METHOD
-#undef USE_COUNTER_DOM_ATTRIBUTE
-#undef USE_COUNTER_CSS_PROPERTY
-
-#define DEPRECATED_OPERATION(op_) \
- eUseCounter_##op_,
-#include "nsDeprecatedOperationList.h"
-#undef DEPRECATED_OPERATION
-
- eUseCounter_Count
-};
-
-}
-
-#endif
diff --git a/dom/base/UseCounters.conf b/dom/base/UseCounters.conf
deleted file mode 100644
index f9202b629e..0000000000
--- a/dom/base/UseCounters.conf
+++ /dev/null
@@ -1,63 +0,0 @@
-// 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/.
-
-// This file defines a list of use counters, which are things that can
-// record usage of Web platform features and then report this information
-// through Telemetry.
-//
-// The format of this file is very strict. Each line can be:
-//
-// (a) a blank line
-//
-// (b) a comment, which is a line that begins with "//"
-//
-// (c) one of three possible use counter declarations:
-//
-// method <IDL interface name>.<IDL operation name>
-// attribute <IDL interface name>.<IDL attribute name>
-// property <CSS property method name>
-//
-// The |CSS property method name| should be identical to the |method|
-// argument to CSS_PROP and related macros. The method name is
-// identical to the name of the property, except that all hyphens are
-// removed and CamelCase naming is used. See nsCSSPropList.h for
-// further details.
-//
-// To actually cause use counters to be incremented, DOM methods
-// and attributes must have a [UseCounter] extended attribute in
-// the Web IDL file. CSS properties require no special treatment
-// beyond being listed below.
-//
-// You might reasonably ask why we have this file and we require
-// annotating things with [UseCounter] in the relevant WebIDL file as
-// well. Generating things from bindings codegen and ensuring all the
-// dependencies were correct would have been rather difficult, and
-// annotating the WebIDL files does nothing for identifying CSS
-// property usage, which we would also like to track.
-
-method SVGSVGElement.getElementById
-attribute SVGSVGElement.currentScale
-property Fill
-property FillOpacity
-
-// Push API
-method PushManager.subscribe
-method PushSubscription.unsubscribe
-
-// window.sidebar.addSearchEngine
-attribute Window.sidebar
-method External.addSearchEngine
-
-// AppCache API
-method OfflineResourceList.swapCache
-method OfflineResourceList.update
-attribute OfflineResourceList.status
-attribute OfflineResourceList.onchecking
-attribute OfflineResourceList.onerror
-attribute OfflineResourceList.onnoupdate
-attribute OfflineResourceList.ondownloading
-attribute OfflineResourceList.onprogress
-attribute OfflineResourceList.onupdateready
-attribute OfflineResourceList.oncached
-attribute OfflineResourceList.onobsolete
diff --git a/dom/base/gen-usecounters.py b/dom/base/gen-usecounters.py
deleted file mode 100755
index 5b17c22e44..0000000000
--- a/dom/base/gen-usecounters.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/env python
-
-# 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/.
-
-from __future__ import print_function
-
-import json
-import os
-import sys
-sys.path.append(os.path.dirname(__file__))
-
-import usecounters
-
-AUTOGENERATED_WARNING_COMMENT = "/* THIS FILE IS AUTOGENERATED BY gen-usecounters.py - DO NOT EDIT */"
-
-def generate_list(f, counters):
- def print_optional_macro_declare(name):
- print('''
-#ifndef %(name)s
-#define %(name)s(interface_, name_) // nothing
-#define DEFINED_%(name)s
-#endif
-''' % { 'name': name }, file=f)
-
- def print_optional_macro_undeclare(name):
- print('''
-#ifdef DEFINED_%(name)s
-#undef DEFINED_%(name)s
-#undef %(name)s
-#endif
-''' % { 'name': name }, file=f)
-
- print(AUTOGENERATED_WARNING_COMMENT, file=f)
-
- print_optional_macro_declare('USE_COUNTER_DOM_METHOD')
- print_optional_macro_declare('USE_COUNTER_DOM_ATTRIBUTE')
- print_optional_macro_declare('USE_COUNTER_CSS_PROPERTY')
-
- for counter in counters:
- if counter['type'] == 'method':
- print('USE_COUNTER_DOM_METHOD(%s, %s)' % (counter['interface_name'], counter['method_name']), file=f)
- elif counter['type'] == 'attribute':
- print('USE_COUNTER_DOM_ATTRIBUTE(%s, %s)' % (counter['interface_name'], counter['attribute_name']), file=f)
- elif counter['type'] == 'property':
- prop = counter['property_name']
- print('USE_COUNTER_CSS_PROPERTY(%s, %s)' % (prop, prop), file=f)
-
- print_optional_macro_undeclare('USE_COUNTER_DOM_METHOD')
- print_optional_macro_undeclare('USE_COUNTER_DOM_ATTRIBUTE')
- print_optional_macro_undeclare('USE_COUNTER_CSS_PROPERTY')
-
-def generate_property_map(f, counters):
- print(AUTOGENERATED_WARNING_COMMENT, file=f)
- print('''
-enum {
- #define CSS_PROP_PUBLIC_OR_PRIVATE(publicname_, privatename_) privatename_
- #define CSS_PROP_LIST_INCLUDE_LOGICAL
- #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \\
- kwtable_, stylestruct_, stylestructoffset_, animtype_) \\
- USE_COUNTER_FOR_CSS_PROPERTY_##method_ = eUseCounter_UNKNOWN,
- #include "nsCSSPropList.h"
- #undef CSS_PROP
- #undef CSS_PROP_LIST_INCLUDE_LOGICAL
- #undef CSS_PROP_PUBLIC_OR_PRIVATE
-};
-''', file=f)
- for counter in counters:
- if counter['type'] == 'property':
- prop = counter['property_name']
- print('#define USE_COUNTER_FOR_CSS_PROPERTY_%s eUseCounter_property_%s' % (prop, prop), file=f)
-
-def use_counter_list(output_header, conf_filename):
- counters = usecounters.read_conf(conf_filename)
- generate_list(output_header, counters)
-
-def property_map(output_map, conf_filename):
- counters = usecounters.read_conf(conf_filename)
- generate_property_map(output_map, counters)
diff --git a/dom/base/moz.build b/dom/base/moz.build
index d8f00e82db..98235c0622 100755
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -141,11 +141,9 @@ EXPORTS.mozilla += [
'FeedWriterEnabled.h',
'TextInputProcessor.h',
'TimerClamping.h',
- 'UseCounter.h',
]
EXPORTS.mozilla.dom += [
- '!UseCounterList.h',
'AnonymousContent.h',
'Attr.h',
'BarProps.h',
@@ -471,18 +469,5 @@ if CONFIG['MOZ_PHOENIX']:
if CONFIG['MOZ_X11']:
CXXFLAGS += CONFIG['TK_CFLAGS']
-GENERATED_FILES += [
- 'PropertyUseCounterMap.inc',
- 'UseCounterList.h',
-]
-
-countermap = GENERATED_FILES['PropertyUseCounterMap.inc']
-countermap.script = 'gen-usecounters.py:property_map'
-countermap.inputs = ['UseCounters.conf']
-
-counterlist = GENERATED_FILES['UseCounterList.h']
-counterlist.script = 'gen-usecounters.py:use_counter_list'
-counterlist.inputs = ['UseCounters.conf']
-
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-error=shadow']
diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp
index d05f3b71fc..d38b3c600b 100644
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -104,9 +104,6 @@
#include "nsContentPermissionHelper.h"
#include "nsCSSPseudoElements.h" // for CSSPseudoElementType
#include "nsNetUtil.h"
-#include "nsDocument.h"
-#include "HTMLImageElement.h"
-#include "mozilla/css/ImageLoader.h"
#include "mozilla/layers/APZCTreeManager.h" // for layers::ZoomToRectBehavior
#include "mozilla/dom/Promise.h"
#include "mozilla/StyleSheetInlines.h"
@@ -4026,27 +4023,6 @@ nsDOMWindowUtils::LeaveChaosMode()
}
NS_IMETHODIMP
-nsDOMWindowUtils::ForceUseCounterFlush(nsIDOMNode *aNode)
-{
- NS_ENSURE_ARG_POINTER(aNode);
-
- if (nsCOMPtr<nsIDocument> doc = do_QueryInterface(aNode)) {
- mozilla::css::ImageLoader* loader = doc->StyleImageLoader();
- loader->FlushUseCounters();
- return NS_OK;
- }
-
- if (nsCOMPtr<nsIContent> content = do_QueryInterface(aNode)) {
- if (HTMLImageElement* img = HTMLImageElement::FromContent(content)) {
- img->FlushUseCounters();
- return NS_OK;
- }
- }
-
- return NS_OK;
-}
-
-NS_IMETHODIMP
nsDOMWindowUtils::HasRuleProcessorUsedByMultipleStyleSets(uint32_t aSheetType,
bool* aRetVal)
{
diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp
index c00a41addf..95827151db 100644
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -9713,19 +9713,6 @@ static const char* kDocumentWarnings[] = {
};
#undef DOCUMENT_WARNING
-static UseCounter
-OperationToUseCounter(nsIDocument::DeprecatedOperations aOperation)
-{
- switch(aOperation) {
-#define DEPRECATED_OPERATION(_op) \
- case nsIDocument::e##_op: return eUseCounter_##_op;
-#include "nsDeprecatedOperationList.h"
-#undef DEPRECATED_OPERATION
- default:
- MOZ_CRASH();
- }
-}
-
bool
nsIDocument::HasWarnedAbout(DeprecatedOperations aOperation) const
{
@@ -9741,7 +9728,6 @@ nsIDocument::WarnOnceAbout(DeprecatedOperations aOperation,
return;
}
mDeprecationWarnedAbout[aOperation] = true;
- const_cast<nsIDocument*>(this)->SetDocumentAndPageUseCounter(OperationToUseCounter(aOperation));
uint32_t flags = asError ? nsIScriptError::errorFlag
: nsIScriptError::warningFlag;
nsContentUtils::ReportToConsole(flags,
@@ -11992,69 +11978,6 @@ nsIDocument::GetTopLevelContentDocument()
return parent;
}
-void
-nsIDocument::PropagateUseCounters(nsIDocument* aParentDocument)
-{
- MOZ_ASSERT(this != aParentDocument);
-
- // What really matters here is that our use counters get propagated as
- // high up in the content document hierarchy as possible. So,
- // starting with aParentDocument, we need to find the toplevel content
- // document, and propagate our use counters into its
- // mChildDocumentUseCounters.
- nsIDocument* contentParent = aParentDocument->GetTopLevelContentDocument();
-
- if (!contentParent) {
- return;
- }
-
- contentParent->mChildDocumentUseCounters |= mUseCounters;
- contentParent->mChildDocumentUseCounters |= mChildDocumentUseCounters;
-}
-
-void
-nsIDocument::SetPageUseCounter(UseCounter aUseCounter)
-{
- // We want to set the use counter on the "page" that owns us; the definition
- // of "page" depends on what kind of document we are. See the comments below
- // for details. In any event, checking all the conditions below is
- // reasonably expensive, so we cache whether we've notified our owning page.
- if (mNotifiedPageForUseCounter[aUseCounter]) {
- return;
- }
- mNotifiedPageForUseCounter[aUseCounter] = true;
-
- if (mDisplayDocument) {
- // If we are a resource document, we won't have a docshell and so we won't
- // record any page use counters on this document. Instead, we should
- // forward it up to the document that loaded us.
- MOZ_ASSERT(!mDocumentContainer);
- mDisplayDocument->SetChildDocumentUseCounter(aUseCounter);
- return;
- }
-
- if (IsBeingUsedAsImage()) {
- // If this is an SVG image document, we also won't have a docshell.
- MOZ_ASSERT(!mDocumentContainer);
- return;
- }
-
- // We only care about use counters in content. If we're already a toplevel
- // content document, then we should have already set the use counter on
- // ourselves, and we are done.
- nsIDocument* contentParent = GetTopLevelContentDocument();
- if (!contentParent) {
- return;
- }
-
- if (this == contentParent) {
- MOZ_ASSERT(GetUseCounter(aUseCounter));
- return;
- }
-
- contentParent->SetChildDocumentUseCounter(aUseCounter);
-}
-
bool
nsIDocument::HasScriptsBlockedBySandbox()
{
diff --git a/dom/base/nsIDocument.h b/dom/base/nsIDocument.h
index fd393723c1..f6645aaefc 100644
--- a/dom/base/nsIDocument.h
+++ b/dom/base/nsIDocument.h
@@ -24,7 +24,6 @@
#include "nsTHashtable.h" // for member
#include "mozilla/net/ReferrerPolicy.h" // for member
#include "nsWeakReference.h"
-#include "mozilla/UseCounter.h"
#include "mozilla/WeakPtr.h"
#include "Units.h"
#include "nsContentListDeclarations.h"
@@ -2782,23 +2781,6 @@ public:
bool DidFireDOMContentLoaded() const { return mDidFireDOMContentLoaded; }
- void SetDocumentUseCounter(mozilla::UseCounter aUseCounter)
- {
- if (!mUseCounters[aUseCounter]) {
- mUseCounters[aUseCounter] = true;
- }
- }
-
- void SetPageUseCounter(mozilla::UseCounter aUseCounter);
-
- void SetDocumentAndPageUseCounter(mozilla::UseCounter aUseCounter)
- {
- SetDocumentUseCounter(aUseCounter);
- SetPageUseCounter(aUseCounter);
- }
-
- void PropagateUseCounters(nsIDocument* aParentDocument);
-
void SetUserHasInteracted(bool aUserHasInteracted)
{
mUserHasInteracted = aUserHasInteracted;
@@ -2857,24 +2839,6 @@ public:
virtual void ScheduleResizeObserversNotification() const = 0;
-protected:
- bool GetUseCounter(mozilla::UseCounter aUseCounter)
- {
- return mUseCounters[aUseCounter];
- }
-
- void SetChildDocumentUseCounter(mozilla::UseCounter aUseCounter)
- {
- if (!mChildDocumentUseCounters[aUseCounter]) {
- mChildDocumentUseCounters[aUseCounter] = true;
- }
- }
-
- bool GetChildDocumentUseCounter(mozilla::UseCounter aUseCounter)
- {
- return mChildDocumentUseCounters[aUseCounter];
- }
-
private:
mutable std::bitset<eDeprecatedOperationCount> mDeprecationWarnedAbout;
mutable std::bitset<eDocumentWarningCount> mDocWarningWarnedAbout;
@@ -3315,15 +3279,7 @@ protected:
// Our live MediaQueryLists
PRCList mDOMMediaQueryLists;
- // Flags for use counters used directly by this document.
- std::bitset<mozilla::eUseCounter_Count> mUseCounters;
- // Flags for use counters used by any child documents of this document.
- std::bitset<mozilla::eUseCounter_Count> mChildDocumentUseCounters;
- // Flags for whether we've notified our top-level "page" of a use counter
- // for this child document.
- std::bitset<mozilla::eUseCounter_Count> mNotifiedPageForUseCounter;
-
- // Whether the user has interacted with the document or not:
+ // Whether the user has interacted with the document or not:
bool mUserHasInteracted;
mozilla::TimeStamp mPageUnloadingEventTimeStamp;
diff --git a/dom/base/nsImageLoadingContent.cpp b/dom/base/nsImageLoadingContent.cpp
index fecd995d72..091ee65263 100644
--- a/dom/base/nsImageLoadingContent.cpp
+++ b/dom/base/nsImageLoadingContent.cpp
@@ -180,12 +180,6 @@ nsImageLoadingContent::Notify(imgIRequest* aRequest,
}
if (aType == imgINotificationObserver::DECODE_COMPLETE) {
- nsCOMPtr<imgIContainer> container;
- aRequest->GetImage(getter_AddRefs(container));
- if (container) {
- container->PropagateUseCounters(GetOurOwnerDoc());
- }
-
UpdateImageState(true);
}
diff --git a/dom/base/test/browser.ini b/dom/base/test/browser.ini
index 60949f7a2d..506eeb97ad 100644
--- a/dom/base/test/browser.ini
+++ b/dom/base/test/browser.ini
@@ -4,13 +4,6 @@ support-files =
file_bug1011748_redirect.sjs
file_bug1011748_OK.sjs
file_messagemanager_unload.html
- file_use_counter_outer.html
- file_use_counter_svg_getElementById.svg
- file_use_counter_svg_currentScale.svg
- file_use_counter_svg_fill_pattern_definition.svg
- file_use_counter_svg_fill_pattern.svg
- file_use_counter_svg_fill_pattern_internal.svg
- file_use_counter_svg_fill_pattern_data.svg
[browser_bug593387.js]
[browser_bug902350.js]
@@ -24,5 +17,4 @@ tags = mcb
skip-if = e10s # this tests non-e10s behavior. it's not expected to work in e10s.
[browser_state_notifications.js]
skip-if = true # Bug 1271028
-[browser_use_counters.js]
[browser_bug1307747.js]
diff --git a/dom/base/test/browser_use_counters.js b/dom/base/test/browser_use_counters.js
deleted file mode 100644
index 7206bb5064..0000000000
--- a/dom/base/test/browser_use_counters.js
+++ /dev/null
@@ -1,238 +0,0 @@
-/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*- */
-
-requestLongerTimeout(2);
-
-var {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
-Cu.import("resource://gre/modules/Services.jsm");
-
-const gHttpTestRoot = "http://example.com/browser/dom/base/test/";
-
-add_task(function* () {
- // Check that use counters are incremented by SVGs loaded directly in iframes.
- yield check_use_counter_iframe("file_use_counter_svg_getElementById.svg",
- "SVGSVGELEMENT_GETELEMENTBYID");
- yield check_use_counter_iframe("file_use_counter_svg_currentScale.svg",
- "SVGSVGELEMENT_CURRENTSCALE_getter");
- yield check_use_counter_iframe("file_use_counter_svg_currentScale.svg",
- "SVGSVGELEMENT_CURRENTSCALE_setter");
-
- // Check that even loads from the imglib cache update use counters. The
- // images should still be there, because we just loaded them in the last
- // set of tests. But we won't get updated counts for the document
- // counters, because we won't be re-parsing the SVG documents.
- yield check_use_counter_iframe("file_use_counter_svg_getElementById.svg",
- "SVGSVGELEMENT_GETELEMENTBYID", false);
- yield check_use_counter_iframe("file_use_counter_svg_currentScale.svg",
- "SVGSVGELEMENT_CURRENTSCALE_getter", false);
- yield check_use_counter_iframe("file_use_counter_svg_currentScale.svg",
- "SVGSVGELEMENT_CURRENTSCALE_setter", false);
-
- // Check that use counters are incremented by SVGs loaded as images.
- // Note that SVG images are not permitted to execute script, so we can only
- // check for properties here.
- yield check_use_counter_img("file_use_counter_svg_getElementById.svg",
- "PROPERTY_FILL");
- yield check_use_counter_img("file_use_counter_svg_currentScale.svg",
- "PROPERTY_FILL");
-
- // Check that use counters are incremented by directly loading SVGs
- // that reference patterns defined in another SVG file.
- yield check_use_counter_direct("file_use_counter_svg_fill_pattern.svg",
- "PROPERTY_FILLOPACITY", /*xfail=*/true);
-
- // Check that use counters are incremented by directly loading SVGs
- // that reference patterns defined in the same file or in data: URLs.
- yield check_use_counter_direct("file_use_counter_svg_fill_pattern_internal.svg",
- "PROPERTY_FILLOPACITY");
- // data: URLs don't correctly propagate to their referring document yet.
- //yield check_use_counter_direct("file_use_counter_svg_fill_pattern_data.svg",
- // "PROPERTY_FILL_OPACITY");
-});
-
-
-function waitForDestroyedDocuments() {
- let deferred = promise.defer();
- SpecialPowers.exactGC(deferred.resolve);
- return deferred.promise;
-}
-
-function waitForPageLoad(browser) {
- return ContentTask.spawn(browser, null, function*() {
- Cu.import("resource://gre/modules/PromiseUtils.jsm");
- yield new Promise(resolve => {
- let listener = () => {
- removeEventListener("load", listener, true);
- resolve();
- }
- addEventListener("load", listener, true);
- });
- });
-}
-
-function grabHistogramsFromContent(use_counter_middlefix, page_before = null) {
-}
-
-var check_use_counter_iframe = Task.async(function* (file, use_counter_middlefix, check_documents=true) {
- info("checking " + file + " with histogram " + use_counter_middlefix);
-
- let newTab = gBrowser.addTab( "about:blank");
- gBrowser.selectedTab = newTab;
- newTab.linkedBrowser.stop();
-
- gBrowser.selectedBrowser.loadURI(gHttpTestRoot + "file_use_counter_outer.html");
- yield waitForPageLoad(gBrowser.selectedBrowser);
-
- // Inject our desired file into the iframe of the newly-loaded page.
- yield ContentTask.spawn(gBrowser.selectedBrowser, { file: file }, function(opts) {
- Cu.import("resource://gre/modules/PromiseUtils.jsm");
- let deferred = PromiseUtils.defer();
-
- let wu = content.window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
-
- let iframe = content.document.getElementById('content');
- iframe.src = opts.file;
- let listener = (event) => {
- event.target.removeEventListener("load", listener, true);
-
- // We flush the main document first, then the iframe's document to
- // ensure any propagation that might happen from content->parent should
- // have already happened.
- wu.forceUseCounterFlush(content.document);
- wu.forceUseCounterFlush(iframe.contentDocument);
-
- deferred.resolve();
- };
- iframe.addEventListener("load", listener, true);
-
- return deferred.promise;
- });
-
- // Tear down the page.
- gBrowser.removeTab(newTab);
-
- // The histograms only get recorded when the document actually gets
- // destroyed, which might not have happened yet due to GC/CC effects, etc.
- // Try to force document destruction.
- yield waitForDestroyedDocuments();
-
- // Grab histograms again and compare.
- let [histogram_page_after, histogram_document_after,
- histogram_docs_after, histogram_toplevel_docs_after] =
- yield grabHistogramsFromContent(use_counter_middlefix, histogram_page_before);
-
- is(histogram_page_after, histogram_page_before + 1,
- "page counts for " + use_counter_middlefix + " after are correct");
- ok(histogram_toplevel_docs_after >= histogram_toplevel_docs_before + 1,
- "top level document counts are correct");
- if (check_documents) {
- is(histogram_document_after, histogram_document_before + 1,
- "document counts for " + use_counter_middlefix + " after are correct");
- }
-});
-
-var check_use_counter_img = Task.async(function* (file, use_counter_middlefix) {
- info("checking " + file + " as image with histogram " + use_counter_middlefix);
-
- let newTab = gBrowser.addTab("about:blank");
- gBrowser.selectedTab = newTab;
- newTab.linkedBrowser.stop();
-
- gBrowser.selectedBrowser.loadURI(gHttpTestRoot + "file_use_counter_outer.html");
- yield waitForPageLoad(gBrowser.selectedBrowser);
-
- // Inject our desired file into the img of the newly-loaded page.
- yield ContentTask.spawn(gBrowser.selectedBrowser, { file: file }, function(opts) {
- Cu.import("resource://gre/modules/PromiseUtils.jsm");
- let deferred = PromiseUtils.defer();
-
- let img = content.document.getElementById('display');
- img.src = opts.file;
- let listener = (event) => {
- img.removeEventListener("load", listener, true);
-
- // Flush for the image. It matters what order we do these in, so that
- // the image can propagate its use counters to the document prior to the
- // document reporting its use counters.
- let wu = content.window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
- wu.forceUseCounterFlush(img);
-
- // Flush for the main window.
- wu.forceUseCounterFlush(content.document);
-
- deferred.resolve();
- };
- img.addEventListener("load", listener, true);
-
- return deferred.promise;
- });
-
- // Tear down the page.
- gBrowser.removeTab(newTab);
-
- // The histograms only get recorded when the document actually gets
- // destroyed, which might not have happened yet due to GC/CC effects, etc.
- // Try to force document destruction.
- yield waitForDestroyedDocuments();
-
- // Grab histograms again and compare.
- let [histogram_page_after, histogram_document_after,
- histogram_docs_after, histogram_toplevel_docs_after] =
- yield grabHistogramsFromContent(use_counter_middlefix, histogram_page_before);
- is(histogram_page_after, histogram_page_before + 1,
- "page counts for " + use_counter_middlefix + " after are correct");
- is(histogram_document_after, histogram_document_before + 1,
- "document counts for " + use_counter_middlefix + " after are correct");
- ok(histogram_toplevel_docs_after >= histogram_toplevel_docs_before + 1,
- "top level document counts are correct");
- // 2 documents: one for the outer html page containing the <img> element, and
- // one for the SVG image itself.
- ok(histogram_docs_after >= histogram_docs_before + 2,
- "document counts are correct");
-});
-
-var check_use_counter_direct = Task.async(function* (file, use_counter_middlefix, xfail=false) {
- info("checking " + file + " with histogram " + use_counter_middlefix);
-
- let newTab = gBrowser.addTab( "about:blank");
- gBrowser.selectedTab = newTab;
- newTab.linkedBrowser.stop();
-
- gBrowser.selectedBrowser.loadURI(gHttpTestRoot + file);
- yield ContentTask.spawn(gBrowser.selectedBrowser, null, function*() {
- Cu.import("resource://gre/modules/PromiseUtils.jsm");
- yield new Promise(resolve => {
- let listener = () => {
- removeEventListener("load", listener, true);
-
- let wu = content.window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
- wu.forceUseCounterFlush(content.document);
-
- setTimeout(resolve, 0);
- }
- addEventListener("load", listener, true);
- });
- });
-
- // Tear down the page.
- gBrowser.removeTab(newTab);
-
- // The histograms only get recorded when the document actually gets
- // destroyed, which might not have happened yet due to GC/CC effects, etc.
- // Try to force document destruction.
- yield waitForDestroyedDocuments();
-
- // Grab histograms again and compare.
- let [histogram_page_after, histogram_document_after,
- histogram_docs_after, histogram_toplevel_docs_after] =
- yield grabHistogramsFromContent(use_counter_middlefix, histogram_page_before);
- if (!xfail) {
- is(histogram_page_after, histogram_page_before + 1,
- "page counts for " + use_counter_middlefix + " after are correct");
- is(histogram_document_after, histogram_document_before + 1,
- "document counts for " + use_counter_middlefix + " after are correct");
- }
- ok(histogram_toplevel_docs_after >= histogram_toplevel_docs_before + 1,
- "top level document counts are correct");
- ok(histogram_docs_after >= histogram_docs_before + 1,
- "document counts are correct");
-});
diff --git a/dom/base/test/file_use_counter_outer.html b/dom/base/test/file_use_counter_outer.html
deleted file mode 100644
index 1a7eb90f7c..0000000000
--- a/dom/base/test/file_use_counter_outer.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=968923
--->
-<head>
- <meta charset="utf-8">
- <title>Test for Bug 968923</title>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=968923">Mozilla Bug 968923</a>
-<img id="display" />
-<iframe id="content">
-
-</iframe>
-</body>
-</html>
diff --git a/dom/base/test/file_use_counter_svg_currentScale.svg b/dom/base/test/file_use_counter_svg_currentScale.svg
deleted file mode 100644
index ea9721a599..0000000000
--- a/dom/base/test/file_use_counter_svg_currentScale.svg
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
- "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg width="4in" height="3in" version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink">
- <desc>Test graphic for hitting currentScale
- </desc>
- <script type="text/javascript"> <![CDATA[
- document.documentElement.currentScale = document.documentElement.currentScale;
- ]]>
- </script>
- <image id="i1" x="200" y="200" width="100px" height="80px">
- </image>
- <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red"/>
-</svg>
diff --git a/dom/base/test/file_use_counter_svg_fill_pattern.svg b/dom/base/test/file_use_counter_svg_fill_pattern.svg
deleted file mode 100644
index ec8059a3d4..0000000000
--- a/dom/base/test/file_use_counter_svg_fill_pattern.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
- "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg width="8cm" height="4cm" viewBox="0 0 800 400" version="1.1"
- xmlns="http://www.w3.org/2000/svg">
- <desc>Borrowed from http://www.w3.org/TR/SVG/pservers.html</desc>
- <!-- Outline the drawing area in blue -->
- <rect fill="none" stroke="blue"
- x="1" y="1" width="798" height="398"/>
-
- <!-- The ellipse is filled using a triangle pattern paint server
- and stroked with black -->
- <ellipse fill="url(http://example.com/browser/dom/base/test/file_use_counter_svg_fill_pattern_definition.svg#TrianglePattern)" stroke="black" stroke-width="5"
- cx="400" cy="200" rx="350" ry="150" />
-</svg>
diff --git a/dom/base/test/file_use_counter_svg_fill_pattern_data.svg b/dom/base/test/file_use_counter_svg_fill_pattern_data.svg
deleted file mode 100644
index 21f4753148..0000000000
--- a/dom/base/test/file_use_counter_svg_fill_pattern_data.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
- "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg width="8cm" height="4cm" viewBox="0 0 800 400" version="1.1"
- xmlns="http://www.w3.org/2000/svg">
- <desc>Borrowed from http://www.w3.org/TR/SVG/pservers.html</desc>
- <!-- Outline the drawing area in blue -->
- <rect fill="none" stroke="blue"
- x="1" y="1" width="798" height="398"/>
-
- <!-- The ellipse is filled using a triangle pattern paint server
- and stroked with black -->
- <ellipse fill="url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iIAogICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPgo8c3ZnIHdpZHRoPSI4Y20iIGhlaWdodD0iNGNtIiB2aWV3Qm94PSIwIDAgODAwIDQwMCIgdmVyc2lvbj0iMS4xIgogICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGRlc2M+Qm9ycm93ZWQgZnJvbSBodHRwOi8vd3d3LnczLm9yZy9UUi9TVkcvcHNlcnZlcnMuaHRtbDwvZGVzYz4KICA8ZGVmcz4KICAgIDxwYXR0ZXJuIGlkPSJUcmlhbmdsZVBhdHRlcm4iIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiCiAgICAgICAgICAgICB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIKICAgICAgICAgICAgIHZpZXdCb3g9IjAgMCAxMCAxMCIgPgogICAgICA8cGF0aCBkPSJNIDAgMCBMIDcgMCBMIDMuNSA3IHoiIGZpbGw9InJlZCIgZmlsbC1vcGFjaXR5PSIwLjciIHN0cm9rZT0iYmx1ZSIgLz4KICAgIDwvcGF0dGVybj4gCiAgPC9kZWZzPgo8L3N2Zz4K#TrianglePattern)" stroke="black" stroke-width="5"
- cx="400" cy="200" rx="350" ry="150" />
-</svg>
diff --git a/dom/base/test/file_use_counter_svg_fill_pattern_definition.svg b/dom/base/test/file_use_counter_svg_fill_pattern_definition.svg
deleted file mode 100644
index ffc2f1bed2..0000000000
--- a/dom/base/test/file_use_counter_svg_fill_pattern_definition.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
- "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg width="8cm" height="4cm" viewBox="0 0 800 400" version="1.1"
- xmlns="http://www.w3.org/2000/svg">
- <desc>Borrowed from http://www.w3.org/TR/SVG/pservers.html</desc>
- <defs>
- <pattern id="TrianglePattern" patternUnits="userSpaceOnUse"
- x="0" y="0" width="100" height="100"
- viewBox="0 0 10 10" >
- <path d="M 0 0 L 7 0 L 3.5 7 z" fill="red" fill-opacity="0.7" stroke="blue" />
- </pattern>
- </defs>
-</svg>
diff --git a/dom/base/test/file_use_counter_svg_fill_pattern_internal.svg b/dom/base/test/file_use_counter_svg_fill_pattern_internal.svg
deleted file mode 100644
index 3b0670cd0b..0000000000
--- a/dom/base/test/file_use_counter_svg_fill_pattern_internal.svg
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
- "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg width="8cm" height="4cm" viewBox="0 0 800 400" version="1.1"
- xmlns="http://www.w3.org/2000/svg">
- <desc>Borrowed from http://www.w3.org/TR/SVG/pservers.html</desc>
- <!-- Outline the drawing area in blue -->
- <rect fill="none" stroke="blue"
- x="1" y="1" width="798" height="398"/>
-
- <defs>
- <pattern id="TrianglePattern" patternUnits="userSpaceOnUse"
- x="0" y="0" width="100" height="100"
- viewBox="0 0 10 10" >
- <path d="M 0 0 L 7 0 L 3.5 7 z" fill="red" fill-opacity="0.7" stroke="blue" />
- </pattern>
- </defs>
-
- <!-- The ellipse is filled using a triangle pattern paint server
- and stroked with black -->
- <ellipse fill="url(#TrianglePattern)" stroke="black" stroke-width="5"
- cx="400" cy="200" rx="350" ry="150" />
-</svg>
diff --git a/dom/base/test/file_use_counter_svg_getElementById.svg b/dom/base/test/file_use_counter_svg_getElementById.svg
deleted file mode 100644
index 3393f43752..0000000000
--- a/dom/base/test/file_use_counter_svg_getElementById.svg
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
- "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg width="4in" height="3in" version="1.1"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink">
- <desc>Test graphic for hitting getElementById
- </desc>
- <image id="i1" x="200" y="200" width="100px" height="80px">
- </image>
- <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red"/>
- <script type="text/javascript"> <![CDATA[
- var image = document.documentElement.getElementById("i1");
- image.addEventListener("load",
- function() {
- document.documentElement.removeAttribute("class");
- },
- false);
- ]]>
- </script>
-</svg>
diff --git a/dom/base/usecounters.py b/dom/base/usecounters.py
deleted file mode 100644
index b93f02f801..0000000000
--- a/dom/base/usecounters.py
+++ /dev/null
@@ -1,71 +0,0 @@
-# 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/.
-
-import buildconfig
-import collections
-import re
-import StringIO
-import sys
-
-def read_conf(conf_filename):
- # Can't read/write from a single StringIO, so make a new one for reading.
- stream = open(conf_filename, 'rU')
-
- def parse_counters(stream):
- for line_num, line in enumerate(stream):
- line = line.rstrip('\n')
- if not line or line.startswith('//'):
- # empty line or comment
- continue
- m = re.match(r'method ([A-Za-z0-9]+)\.([A-Za-z0-9]+)$', line)
- if m:
- interface_name, method_name = m.groups()
- yield { 'type': 'method',
- 'interface_name': interface_name,
- 'method_name': method_name }
- continue
- m = re.match(r'attribute ([A-Za-z0-9]+)\.([A-Za-z0-9]+)$', line)
- if m:
- interface_name, attribute_name = m.groups()
- yield { 'type': 'attribute',
- 'interface_name': interface_name,
- 'attribute_name': attribute_name }
- continue
- m = re.match(r'property ([A-Za-z0-9]+)$', line)
- if m:
- property_name = m.group(1)
- yield { 'type': 'property',
- 'property_name': property_name }
- continue
- raise ValueError('error parsing %s at line %d' % (conf_filename, line_num))
-
- return parse_counters(stream)
-
-def generate_histograms(filename):
- # The mapping for use counters to telemetry histograms depends on the
- # ordering of items in the dictionary.
- items = collections.OrderedDict()
- for counter in read_conf(filename):
- def append_counter(name, desc):
- items[name] = { 'expires_in_version': 'never',
- 'kind' : 'boolean',
- 'description': desc }
-
- def append_counters(name, desc):
- append_counter('USE_COUNTER2_%s_DOCUMENT' % name, 'Whether a document %s' % desc)
- append_counter('USE_COUNTER2_%s_PAGE' % name, 'Whether a page %s' % desc)
-
- if counter['type'] == 'method':
- method = '%s.%s' % (counter['interface_name'], counter['method_name'])
- append_counters(method.replace('.', '_').upper(), 'called %s' % method)
- elif counter['type'] == 'attribute':
- attr = '%s.%s' % (counter['interface_name'], counter['attribute_name'])
- counter_name = attr.replace('.', '_').upper()
- append_counters('%s_getter' % counter_name, 'got %s' % attr)
- append_counters('%s_setter' % counter_name, 'set %s' % attr)
- elif counter['type'] == 'property':
- prop = counter['property_name']
- append_counters('PROPERTY_%s' % prop.replace('-', '_').upper(), "used the '%s' property" % prop)
-
- return items
diff --git a/dom/bindings/BindingUtils.cpp b/dom/bindings/BindingUtils.cpp
index a8884d6a45..512b9f8173 100644
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -14,7 +14,6 @@
#include "mozilla/Preferences.h"
#include "mozilla/SizePrintfMacros.h"
#include "mozilla/Unused.h"
-#include "mozilla/UseCounter.h"
#include "mozilla/dom/DocGroup.h"
#include "AccessCheck.h"
@@ -59,7 +58,6 @@
#include "mozilla/jsipc/CrossProcessObjectWrappers.h"
#include "nsDOMClassInfo.h"
#include "ipc/ErrorIPCUtils.h"
-#include "mozilla/UseCounter.h"
namespace mozilla {
namespace dom {
@@ -3592,16 +3590,6 @@ AssertReflectorHasGivenProto(JSContext* aCx, JSObject* aReflector,
} // namespace binding_detail
#endif // DEBUG
-void
-SetDocumentAndPageUseCounter(JSContext* aCx, JSObject* aObject,
- UseCounter aUseCounter)
-{
- nsGlobalWindow* win = xpc::WindowGlobalOrNull(js::UncheckedUnwrap(aObject));
- if (win && win->GetDocument()) {
- win->GetDocument()->SetDocumentAndPageUseCounter(aUseCounter);
- }
-}
-
namespace {
// This runnable is used to write a deprecation message from a worker to the
diff --git a/dom/bindings/BindingUtils.h b/dom/bindings/BindingUtils.h
index c80631fc14..9ae5ed1f73 100644
--- a/dom/bindings/BindingUtils.h
+++ b/dom/bindings/BindingUtils.h
@@ -46,8 +46,6 @@ class nsIJSID;
namespace mozilla {
-enum UseCounter : int16_t;
-
namespace dom {
class CustomElementReactionsStack;
template<typename KeyType, typename ValueType> class Record;
@@ -3428,10 +3426,6 @@ already_AddRefed<nsGenericHTMLElement>
CreateHTMLElement(const GlobalObject& aGlobal, const JS::CallArgs& aCallArgs,
JS::Handle<JSObject*> aGivenProto, ErrorResult& aRv);
-void
-SetDocumentAndPageUseCounter(JSContext* aCx, JSObject* aObject,
- UseCounter aUseCounter);
-
// Warnings
void
DeprecationWarning(JSContext* aCx, JSObject* aObject,
diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py
index 42ce94fcb4..a70253fc3a 100644
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -7467,8 +7467,8 @@ class CGPerSignatureCall(CGThing):
def __init__(self, returnType, arguments, nativeMethodName, static,
descriptor, idlNode, argConversionStartsAt=0, getter=False,
- setter=False, isConstructor=False, useCounterName=None,
- resultVar=None, objectName="obj"):
+ setter=False, isConstructor=False, resultVar=None,
+ objectName="obj"):
assert idlNode.isMethod() == (not getter and not setter)
assert idlNode.isAttr() == (getter or setter)
# Constructors are always static
@@ -7701,11 +7701,6 @@ class CGPerSignatureCall(CGThing):
nativeMethodName,
static, argsPost=argsPost, resultVar=resultVar))
- if useCounterName:
- # Generate a telemetry call for when [UseCounter] is used.
- code = "SetDocumentAndPageUseCounter(cx, obj, eUseCounter_%s);\n" % useCounterName
- cgThings.append(CGGeneric(code))
-
self.cgRoot = CGList(cgThings)
def getArguments(self):
@@ -7934,11 +7929,6 @@ class CGMethodCall(CGThing):
methodName = "%s.%s" % (descriptor.interface.identifier.name, method.identifier.name)
argDesc = "argument %d of " + methodName
- if method.getExtendedAttribute("UseCounter"):
- useCounterName = methodName.replace(".", "_")
- else:
- useCounterName = None
-
if method.isStatic():
nativeType = descriptor.nativeType
staticTypeOverride = PropertyDefiner.getStringAttr(method, "StaticClassOverride")
@@ -7960,8 +7950,7 @@ class CGMethodCall(CGThing):
nativeMethodName, static, descriptor,
method,
argConversionStartsAt=argConversionStartsAt,
- isConstructor=isConstructor,
- useCounterName=useCounterName)
+ isConstructor=isConstructor)
signatures = method.signatures()
if len(signatures) == 1:
@@ -8337,16 +8326,11 @@ class CGGetterCall(CGPerSignatureCall):
getter.
"""
def __init__(self, returnType, nativeMethodName, descriptor, attr):
- if attr.getExtendedAttribute("UseCounter"):
- useCounterName = "%s_%s_getter" % (descriptor.interface.identifier.name,
- attr.identifier.name)
- else:
- useCounterName = None
if attr.isStatic():
nativeMethodName = "%s::%s" % (descriptor.nativeType, nativeMethodName)
CGPerSignatureCall.__init__(self, returnType, [], nativeMethodName,
attr.isStatic(), descriptor, attr,
- getter=True, useCounterName=useCounterName)
+ getter=True)
class CGNavigatorGetterCall(CGPerSignatureCall):
@@ -8413,17 +8397,12 @@ class CGSetterCall(CGPerSignatureCall):
setter.
"""
def __init__(self, argType, nativeMethodName, descriptor, attr):
- if attr.getExtendedAttribute("UseCounter"):
- useCounterName = "%s_%s_setter" % (descriptor.interface.identifier.name,
- attr.identifier.name)
- else:
- useCounterName = None
if attr.isStatic():
nativeMethodName = "%s::%s" % (descriptor.nativeType, nativeMethodName)
CGPerSignatureCall.__init__(self, None,
[FakeArgument(argType, attr, allowTreatNonCallableAsNull=True)],
nativeMethodName, attr.isStatic(),
- descriptor, attr, setter=True, useCounterName=useCounterName)
+ descriptor, attr, setter=True)
def wrap_return_value(self):
attr = self.idlNode
@@ -13932,12 +13911,6 @@ class CGBindingRoot(CGThing):
bindingHeaders[CGHeaders.getDeclarationFilename(enums[0])] = True
bindingHeaders["jsapi.h"] = True
- # For things that have [UseCounter]
- def descriptorRequiresTelemetry(desc):
- iface = desc.interface
- return any(m.getExtendedAttribute("UseCounter") for m in iface.members)
- bindingHeaders["mozilla/UseCounter.h"] = any(
- descriptorRequiresTelemetry(d) for d in descriptors)
bindingHeaders["mozilla/dom/SimpleGlobalObject.h"] = any(
CGDictionary.dictionarySafeToJSONify(d) for d in dictionaries)
bindingHeaders["XrayWrapper.h"] = any(
diff --git a/dom/bindings/parser/WebIDL.py b/dom/bindings/parser/WebIDL.py
index 81911996d5..ce8862c02b 100644
--- a/dom/bindings/parser/WebIDL.py
+++ b/dom/bindings/parser/WebIDL.py
@@ -4245,11 +4245,6 @@ class IDLAttribute(IDLInterfaceMember):
"readonly attributes" % attr.value(),
[attr.location, self.location])
self._setDependsOn(attr.value())
- elif identifier == "UseCounter":
- if self.stringifier:
- raise WebIDLError("[UseCounter] must not be used on a "
- "stringifier attribute",
- [attr.location, self.location])
elif identifier == "Unscopable":
if not attr.noArguments():
raise WebIDLError("[Unscopable] must take no arguments",
@@ -4979,11 +4974,6 @@ class IDLMethod(IDLInterfaceMember, IDLScope):
raise WebIDLError("[Alias] takes an identifier or string",
[attr.location])
self._addAlias(attr.value())
- elif identifier == "UseCounter":
- if self.isSpecial():
- raise WebIDLError("[UseCounter] must not be used on a special "
- "operation",
- [attr.location, self.location])
elif identifier == "Unscopable":
if not attr.noArguments():
raise WebIDLError("[Unscopable] must take no arguments",
diff --git a/dom/html/HTMLImageElement.cpp b/dom/html/HTMLImageElement.cpp
index 5e75d09349..b11cd101a0 100644
--- a/dom/html/HTMLImageElement.cpp
+++ b/dom/html/HTMLImageElement.cpp
@@ -10,7 +10,6 @@
#include "nsPresContext.h"
#include "nsMappedAttributes.h"
#include "nsSize.h"
-#include "nsDocument.h"
#include "nsIDocument.h"
#include "nsIDOMMutationEvent.h"
#include "nsIScriptContext.h"
@@ -27,7 +26,6 @@
#include "mozilla/dom/HTMLFormElement.h"
#include "nsAttrValueOrString.h"
#include "imgLoader.h"
-#include "Image.h"
// Responsive images!
#include "mozilla/dom/HTMLSourceElement.h"
@@ -1365,16 +1363,6 @@ HTMLImageElement::MediaFeatureValuesChanged()
QueueImageLoadTask(false);
}
-void
-HTMLImageElement::FlushUseCounters()
-{
- nsCOMPtr<imgIRequest> request;
- GetRequest(CURRENT_REQUEST, getter_AddRefs(request));
-
- nsCOMPtr<imgIContainer> container;
- request->GetImage(getter_AddRefs(container));
-}
-
} // namespace dom
} // namespace mozilla
diff --git a/dom/html/HTMLImageElement.h b/dom/html/HTMLImageElement.h
index 8d382610da..3d3c7c834e 100644
--- a/dom/html/HTMLImageElement.h
+++ b/dom/html/HTMLImageElement.h
@@ -261,12 +261,6 @@ public:
const nsAString& aMediaAttr,
nsAString& aResult);
- /**
- * If this image's src pointers to an SVG document, flush the SVG document's
- * use counters to telemetry. Only used for testing purposes.
- */
- void FlushUseCounters();
-
protected:
virtual ~HTMLImageElement();
diff --git a/dom/interfaces/base/nsIDOMWindowUtils.idl b/dom/interfaces/base/nsIDOMWindowUtils.idl
index 70ec7e0ae6..ad45e6e520 100644
--- a/dom/interfaces/base/nsIDOMWindowUtils.idl
+++ b/dom/interfaces/base/nsIDOMWindowUtils.idl
@@ -49,7 +49,7 @@ interface nsIJSRAIIHelper;
interface nsIContentPermissionRequest;
interface nsIObserver;
-[scriptable, uuid(c471d440-004b-4c50-a6f2-747db5f443b6)]
+[scriptable, uuid(7fcc7958-77d9-45ff-8c81-277bde5f0dc8)]
interface nsIDOMWindowUtils : nsISupports {
/**
@@ -1938,17 +1938,6 @@ interface nsIDOMWindowUtils : nsISupports {
*/
bool hasRuleProcessorUsedByMultipleStyleSets(in unsigned long aSheetType);
- /*
- * Force the use counters for the node's associated document(s) to be
- * flushed to telemetry. For example, a document node will flush its own
- * counters and an image node with an SVG source will flush the SVG
- * document's counters. Normally, use counters are flushed to telemetry
- * upon document destruction, but as document destruction is somewhat
- * non-deterministic, we have this method here for more determinism when
- * running tests.
- */
- void forceUseCounterFlush(in nsIDOMNode aNode);
-
void setNextPaintSyncId(in long aSyncId);
/**
diff --git a/dom/quota/ActorsParent.cpp b/dom/quota/ActorsParent.cpp
index c240cbf201..74d57c5db6 100644
--- a/dom/quota/ActorsParent.cpp
+++ b/dom/quota/ActorsParent.cpp
@@ -3799,37 +3799,6 @@ QuotaManager::InitializeRepository(PersistenceType aPersistenceType)
return NS_OK;
}
-namespace {
-
-// The Cache API was creating top level morgue directories by accident for
-// a short time in nightly. This unfortunately prevents all storage from
-// working. So recover these profiles by removing these corrupt directories.
-// This should be removed at some point in the future.
-bool
-MaybeRemoveCorruptDirectory(const nsAString& aLeafName, nsIFile* aDir)
-{
-#ifdef NIGHTLY_BUILD
- MOZ_ASSERT(aDir);
-
- if (aLeafName != NS_LITERAL_STRING("morgue")) {
- return false;
- }
-
- NS_WARNING("QuotaManager removing corrupt morgue directory!");
-
- nsresult rv = aDir->Remove(true /* recursive */);
- if (NS_WARN_IF(NS_FAILED(rv))) {
- return false;
- }
-
- return true;
-#else
- return false;
-#endif // NIGHTLY_BUILD
-}
-
-} // namespace
-
nsresult
QuotaManager::InitializeOrigin(PersistenceType aPersistenceType,
const nsACString& aGroup,
@@ -3883,10 +3852,6 @@ QuotaManager::InitializeOrigin(PersistenceType aPersistenceType,
return NS_ERROR_UNEXPECTED;
}
- if (MaybeRemoveCorruptDirectory(leafName, file)) {
- continue;
- }
-
Client::Type clientType;
rv = Client::TypeFromText(leafName, clientType);
if (NS_FAILED(rv)) {
@@ -5981,10 +5946,6 @@ QuotaUsageRequestBase::GetUsageForOrigin(QuotaManager* aQuotaManager,
}
}
- if (MaybeRemoveCorruptDirectory(leafName, file)) {
- continue;
- }
-
Client::Type clientType;
rv = Client::TypeFromText(leafName, clientType);
if (NS_FAILED(rv)) {
diff --git a/dom/svg/nsSVGElement.cpp b/dom/svg/nsSVGElement.cpp
index 30ba920c9f..39998c1541 100644
--- a/dom/svg/nsSVGElement.cpp
+++ b/dom/svg/nsSVGElement.cpp
@@ -1150,7 +1150,7 @@ public:
MappedAttrParser(css::Loader* aLoader,
nsIURI* aDocURI,
already_AddRefed<nsIURI> aBaseURI,
- nsSVGElement* aElement);
+ nsIPrincipal* aNodePrincipal);
~MappedAttrParser();
// Parses a mapped attribute value.
@@ -1170,20 +1170,18 @@ private:
// Arguments for nsCSSParser::ParseProperty
nsIURI* mDocURI;
nsCOMPtr<nsIURI> mBaseURI;
+ nsIPrincipal* mNodePrincipal;
// Declaration for storing parsed values (lazily initialized)
css::Declaration* mDecl;
-
- // For reporting use counters
- nsSVGElement* mElement;
};
MappedAttrParser::MappedAttrParser(css::Loader* aLoader,
nsIURI* aDocURI,
already_AddRefed<nsIURI> aBaseURI,
- nsSVGElement* aElement)
+ nsIPrincipal* aNodePrincipal)
: mParser(aLoader), mDocURI(aDocURI), mBaseURI(aBaseURI),
- mDecl(nullptr), mElement(aElement)
+ mNodePrincipal(aNodePrincipal), mDecl(nullptr)
{
}
@@ -1208,27 +1206,9 @@ MappedAttrParser::ParseMappedAttrValue(nsIAtom* aMappedAttrName,
nsCSSProps::LookupProperty(nsDependentAtomString(aMappedAttrName),
CSSEnabledState::eForAllContent);
if (propertyID != eCSSProperty_UNKNOWN) {
- bool changed = false; // outparam for ParseProperty.
+ bool changed; // outparam for ParseProperty. (ignored)
mParser.ParseProperty(propertyID, aMappedAttrValue, mDocURI, mBaseURI,
- mElement->NodePrincipal(), mDecl, &changed, false, true);
- if (changed) {
- // The normal reporting of use counters by the nsCSSParser won't happen
- // since it doesn't have a sheet.
- if (nsCSSProps::IsShorthand(propertyID)) {
- CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES(subprop, propertyID,
- CSSEnabledState::eForAllContent) {
- UseCounter useCounter = nsCSSProps::UseCounterFor(*subprop);
- if (useCounter != eUseCounter_UNKNOWN) {
- mElement->OwnerDoc()->SetDocumentAndPageUseCounter(useCounter);
- }
- }
- } else {
- UseCounter useCounter = nsCSSProps::UseCounterFor(propertyID);
- if (useCounter != eUseCounter_UNKNOWN) {
- mElement->OwnerDoc()->SetDocumentAndPageUseCounter(useCounter);
- }
- }
- }
+ mNodePrincipal, mDecl, &changed, false, true);
return;
}
MOZ_ASSERT(aMappedAttrName == nsGkAtoms::lang,
@@ -1275,7 +1255,7 @@ nsSVGElement::UpdateContentStyleRule()
nsIDocument* doc = OwnerDoc();
MappedAttrParser mappedAttrParser(doc->CSSLoader(), doc->GetDocumentURI(),
- GetBaseURI(), this);
+ GetBaseURI(), NodePrincipal());
for (uint32_t i = 0; i < attrCount; ++i) {
const nsAttrName* attrName = mAttrsAndChildren.AttrNameAt(i);
@@ -1348,7 +1328,7 @@ nsSVGElement::UpdateAnimatedContentStyleRule()
}
MappedAttrParser mappedAttrParser(doc->CSSLoader(), doc->GetDocumentURI(),
- GetBaseURI(), this);
+ GetBaseURI(), NodePrincipal());
doc->PropertyTable(SMIL_MAPPED_ATTR_ANIMVAL)->
Enumerate(this, ParseMappedAttrAnimValueCallback, &mappedAttrParser);
diff --git a/dom/webidl/External.webidl b/dom/webidl/External.webidl
index 890dff306e..4b97a2007e 100644
--- a/dom/webidl/External.webidl
+++ b/dom/webidl/External.webidl
@@ -13,7 +13,7 @@ interface External
// Mozilla extension
partial interface External {
- [UnsafeInPrerendering, UseCounter]
+ [UnsafeInPrerendering]
void addSearchEngine(DOMString engineURL, DOMString iconURL,
DOMString suggestedTitle, DOMString suggestedCategory);
};
diff --git a/dom/webidl/Navigator.webidl b/dom/webidl/Navigator.webidl
index 379585ef9f..516b5415e3 100644
--- a/dom/webidl/Navigator.webidl
+++ b/dom/webidl/Navigator.webidl
@@ -313,13 +313,6 @@ partial interface Navigator {
};
#endif
-#ifdef NIGHTLY_BUILD
-partial interface Navigator {
- [Func="Navigator::IsE10sEnabled"]
- readonly attribute boolean mozE10sEnabled;
-};
-#endif
-
[NoInterfaceObject, Exposed=(Window,Worker)]
interface NavigatorConcurrentHardware {
readonly attribute unsigned long long hardwareConcurrency;
diff --git a/dom/webidl/OfflineResourceList.webidl b/dom/webidl/OfflineResourceList.webidl
index abc5118881..a646428016 100644
--- a/dom/webidl/OfflineResourceList.webidl
+++ b/dom/webidl/OfflineResourceList.webidl
@@ -25,38 +25,30 @@ interface OfflineResourceList : EventTarget {
/* The application cache group is now obsolete. */
const unsigned short OBSOLETE = 5;
- [Throws, UseCounter]
+ [Throws]
readonly attribute unsigned short status;
/**
* Begin the application update process on the associated application cache.
*/
- [Throws, UseCounter]
+ [Throws]
void update();
/**
* Swap in the newest version of the application cache, or disassociate
* from the cache if the cache group is obsolete.
*/
- [Throws, UseCounter]
+ [Throws]
void swapCache();
/* Events */
- [UseCounter]
attribute EventHandler onchecking;
- [UseCounter]
attribute EventHandler onerror;
- [UseCounter]
attribute EventHandler onnoupdate;
- [UseCounter]
attribute EventHandler ondownloading;
- [UseCounter]
attribute EventHandler onprogress;
- [UseCounter]
attribute EventHandler onupdateready;
- [UseCounter]
attribute EventHandler oncached;
- [UseCounter]
attribute EventHandler onobsolete;
};
diff --git a/dom/webidl/PushManager.webidl b/dom/webidl/PushManager.webidl
index de1e632c7e..ef9b49e26f 100644
--- a/dom/webidl/PushManager.webidl
+++ b/dom/webidl/PushManager.webidl
@@ -25,7 +25,7 @@ interface PushManagerImpl {
[Exposed=(Window,Worker), Func="nsContentUtils::PushEnabled",
ChromeConstructor(DOMString scope)]
interface PushManager {
- [Throws, UseCounter]
+ [Throws]
Promise<PushSubscription> subscribe(optional PushSubscriptionOptionsInit options);
[Throws]
Promise<PushSubscription?> getSubscription();
diff --git a/dom/webidl/PushSubscription.webidl b/dom/webidl/PushSubscription.webidl
index eab576d3ce..4451a0441d 100644
--- a/dom/webidl/PushSubscription.webidl
+++ b/dom/webidl/PushSubscription.webidl
@@ -44,7 +44,7 @@ interface PushSubscription
readonly attribute PushSubscriptionOptions options;
[Throws]
ArrayBuffer? getKey(PushEncryptionKeyName name);
- [Throws, UseCounter]
+ [Throws]
Promise<boolean> unsubscribe();
// Implements the custom serializer specified in Push API, section 9.
diff --git a/dom/webidl/SVGSVGElement.webidl b/dom/webidl/SVGSVGElement.webidl
index afe63dbb28..d04a464008 100644
--- a/dom/webidl/SVGSVGElement.webidl
+++ b/dom/webidl/SVGSVGElement.webidl
@@ -33,7 +33,6 @@ interface SVGSVGElement : SVGGraphicsElement {
readonly attribute float screenPixelToMillimeterY;
readonly attribute boolean useCurrentView;
// readonly attribute SVGViewSpec currentView;
- [UseCounter]
attribute float currentScale;
readonly attribute SVGPoint currentTranslate;
@@ -71,7 +70,6 @@ interface SVGSVGElement : SVGGraphicsElement {
SVGTransform createSVGTransform();
[NewObject]
SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix);
- [UseCounter]
Element? getElementById(DOMString elementId);
};
diff --git a/dom/webidl/Window.webidl b/dom/webidl/Window.webidl
index ad427630bd..1b98042473 100644
--- a/dom/webidl/Window.webidl
+++ b/dom/webidl/Window.webidl
@@ -368,7 +368,7 @@ Window implements OnErrorEventHandlerForWindow;
#ifdef HAVE_SIDEBAR
// Mozilla extension
partial interface Window {
- [Replaceable, Throws, UseCounter]
+ [Replaceable, Throws]
readonly attribute (External or WindowProxy) sidebar;
};
#endif
diff --git a/gfx/src/DriverCrashGuard.cpp b/gfx/src/DriverCrashGuard.cpp
index 3b69d387c5..333c624e94 100644
--- a/gfx/src/DriverCrashGuard.cpp
+++ b/gfx/src/DriverCrashGuard.cpp
@@ -68,19 +68,11 @@ AreCrashGuardsEnabled()
if (XRE_IsGPUProcess()) {
return false;
}
-#ifdef NIGHTLY_BUILD
- // We only use the crash guard on non-nightly channels, since the nightly
- // channel is for development and having graphics features perma-disabled
- // is rather annoying. Unless the user forces is with an environment
- // variable, which comes in handy for testing.
- return gfxEnv::ForceCrashGuardNightly();
-#else
// Check to see if all guards have been disabled through the environment.
if (gfxEnv::DisableCrashGuard()) {
return false;
}
return true;
-#endif
}
void
diff --git a/gfx/thebes/gfxEnv.h b/gfx/thebes/gfxEnv.h
index ff4a8063ac..e1e491a9bc 100644
--- a/gfx/thebes/gfxEnv.h
+++ b/gfx/thebes/gfxEnv.h
@@ -42,7 +42,6 @@ public:
// Disabling the crash guard in DriverCrashGuard
DECL_GFX_ENV("MOZ_DISABLE_CRASH_GUARD", DisableCrashGuard);
- DECL_GFX_ENV("MOZ_FORCE_CRASH_GUARD_NIGHTLY", ForceCrashGuardNightly);
// We force present to work around some Windows bugs - disable that if this
// environment variable is set.
diff --git a/image/DynamicImage.cpp b/image/DynamicImage.cpp
index aeb1fcf78e..dfdc3e5d81 100644
--- a/image/DynamicImage.cpp
+++ b/image/DynamicImage.cpp
@@ -337,11 +337,5 @@ DynamicImage::Unwrap()
return self.forget();
}
-void
-DynamicImage::PropagateUseCounters(nsIDocument*)
-{
- // No use counters.
-}
-
} // namespace image
} // namespace mozilla
diff --git a/image/ImageWrapper.cpp b/image/ImageWrapper.cpp
index 5ed6c78179..7d2fbfa363 100644
--- a/image/ImageWrapper.cpp
+++ b/image/ImageWrapper.cpp
@@ -291,12 +291,6 @@ ImageWrapper::SetAnimationStartTime(const TimeStamp& aTime)
mInnerImage->SetAnimationStartTime(aTime);
}
-void
-ImageWrapper::PropagateUseCounters(nsIDocument* aParentDocument)
-{
- mInnerImage->PropagateUseCounters(aParentDocument);
-}
-
nsIntSize
ImageWrapper::OptimalImageSizeForDest(const gfxSize& aDest,
uint32_t aWhichFrame,
diff --git a/image/RasterImage.cpp b/image/RasterImage.cpp
index eff6cb7b38..4fd3797bb0 100644
--- a/image/RasterImage.cpp
+++ b/image/RasterImage.cpp
@@ -1661,12 +1661,6 @@ RasterImage::Unwrap()
return self.forget();
}
-void
-RasterImage::PropagateUseCounters(nsIDocument*)
-{
- // No use counters.
-}
-
IntSize
RasterImage::OptimalImageSizeForDest(const gfxSize& aDest, uint32_t aWhichFrame,
SamplingFilter aSamplingFilter, uint32_t aFlags)
diff --git a/image/VectorImage.cpp b/image/VectorImage.cpp
index 3fcb296f5f..59b31be47e 100644
--- a/image/VectorImage.cpp
+++ b/image/VectorImage.cpp
@@ -34,7 +34,6 @@
#include "SVGDocumentWrapper.h"
#include "nsIDOMEventListener.h"
#include "SurfaceCache.h"
-#include "nsDocument.h"
// undef the GetCurrentTime macro defined in WinBase.h from the MS Platform SDK
#undef GetCurrentTime
@@ -1328,15 +1327,6 @@ VectorImage::InvalidateObserversOnNextRefreshDriverTick()
}
}
-void
-VectorImage::PropagateUseCounters(nsIDocument* aParentDocument)
-{
- nsIDocument* doc = mSVGDocumentWrapper->GetDocument();
- if (doc) {
- doc->PropagateUseCounters(aParentDocument);
- }
-}
-
nsIntSize
VectorImage::OptimalImageSizeForDest(const gfxSize& aDest,
uint32_t aWhichFrame,
diff --git a/image/imgIContainer.idl b/image/imgIContainer.idl
index ba1c494af6..ce663a73e1 100644
--- a/image/imgIContainer.idl
+++ b/image/imgIContainer.idl
@@ -19,8 +19,6 @@
#include "nsSize.h"
#include "limits.h"
-class nsIDocument;
-
namespace mozilla {
namespace layers {
class LayerManager;
@@ -67,7 +65,6 @@ native Orientation(mozilla::image::Orientation);
native TempRefSourceSurface(already_AddRefed<mozilla::gfx::SourceSurface>);
native TempRefImgIContainer(already_AddRefed<imgIContainer>);
native nsIntSizeByVal(nsIntSize);
-[ptr] native nsIDocument(nsIDocument);
/**
@@ -77,7 +74,7 @@ native nsIntSizeByVal(nsIntSize);
*
* Internally, imgIContainer also manages animation of images.
*/
-[scriptable, builtinclass, uuid(a8dbee24-ff86-4755-b40e-51175caf31af)]
+[scriptable, builtinclass, uuid(7ba72242-28da-4c5f-b53f-54da8874775e)]
interface imgIContainer : nsISupports
{
/**
@@ -542,10 +539,4 @@ interface imgIContainer : nsISupports
* Removes any ImageWrappers and returns the unwrapped base image.
*/
[notxpcom, nostdcall] TempRefImgIContainer unwrap();
-
- /*
- * Propagate the use counters (if any) from this container to the passed in
- * document.
- */
- [noscript, notxpcom] void propagateUseCounters(in nsIDocument aDocument);
};
diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp
index f91a53eae2..8bcae4d826 100644
--- a/js/src/builtin/TestingFunctions.cpp
+++ b/js/src/builtin/TestingFunctions.cpp
@@ -2433,39 +2433,6 @@ SharedMemoryEnabled(JSContext* cx, unsigned argc, Value* vp)
return true;
}
-#ifdef NIGHTLY_BUILD
-static bool
-ObjectAddress(JSContext* cx, unsigned argc, Value* vp)
-{
- CallArgs args = CallArgsFromVp(argc, vp);
- if (args.length() != 1) {
- RootedObject callee(cx, &args.callee());
- ReportUsageErrorASCII(cx, callee, "Wrong number of arguments");
- return false;
- }
- if (!args[0].isObject()) {
- RootedObject callee(cx, &args.callee());
- ReportUsageErrorASCII(cx, callee, "Expected object");
- return false;
- }
-
-#ifdef JS_MORE_DETERMINISTIC
- args.rval().setInt32(0);
-#else
- void* ptr = js::UncheckedUnwrap(&args[0].toObject(), true);
- char buffer[64];
- SprintfLiteral(buffer, "%p", ptr);
-
- JSString* str = JS_NewStringCopyZ(cx, buffer);
- if (!str)
- return false;
-
- args.rval().setString(str);
-#endif
-
- return true;
-}
-
static bool
SharedAddress(JSContext* cx, unsigned argc, Value* vp)
{
@@ -2507,7 +2474,6 @@ SharedAddress(JSContext* cx, unsigned argc, Value* vp)
return true;
}
-#endif
static bool
DumpBacktrace(JSContext* cx, unsigned argc, Value* vp)
@@ -4430,16 +4396,9 @@ JS_FN_HELP("rejectPromise", RejectPromise, 2, 0,
"sharedMemoryEnabled()",
" Return true if SharedArrayBuffer and Atomics are enabled"),
-#ifdef NIGHTLY_BUILD
- JS_FN_HELP("objectAddress", ObjectAddress, 1, 0,
-"objectAddress(obj)",
-" Return the current address of the object. For debugging only--this\n"
-" address may change during a moving GC."),
-
JS_FN_HELP("sharedAddress", SharedAddress, 1, 0,
"sharedAddress(obj)",
" Return the address of the shared storage of a SharedArrayBuffer."),
-#endif
JS_FN_HELP("evalReturningScope", EvalReturningScope, 1, 0,
"evalReturningScope(scriptStr, [global])",
diff --git a/js/src/jit/x86-shared/BaseAssembler-x86-shared.h b/js/src/jit/x86-shared/BaseAssembler-x86-shared.h
index 54b862a56c..b5f800cdab 100644
--- a/js/src/jit/x86-shared/BaseAssembler-x86-shared.h
+++ b/js/src/jit/x86-shared/BaseAssembler-x86-shared.h
@@ -2,6 +2,7 @@
*
* ***** BEGIN LICENSE BLOCK *****
* Copyright (C) 2008 Apple Inc. All rights reserved.
+ * Portions Copyright (C) 2022 Moonchild Productions.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -3779,28 +3780,6 @@ threeByteOpImmSimd("vblendps", VEX_PD, OP3_BLENDPS_VpsWpsIb, ESCAPE_3A, imm, off
return false;
if (MOZ_UNLIKELY(size_t(offset) >= size())) {
-#ifdef NIGHTLY_BUILD
- // Stash some data on the stack so we can retrieve it from minidumps,
- // see bug 1124397.
- int32_t startOffset = from.offset() - 1;
- while (startOffset >= 0 && code[startOffset] == 0xe5)
- startOffset--;
- int32_t endOffset = from.offset() - 1;
- while (endOffset < int32_t(size()) && code[endOffset] == 0xe5)
- endOffset++;
- volatile uintptr_t dump[10];
- blackbox = dump;
- blackbox[0] = uintptr_t(0xABCD1234);
- blackbox[1] = uintptr_t(offset);
- blackbox[2] = uintptr_t(size());
- blackbox[3] = uintptr_t(from.offset());
- blackbox[4] = uintptr_t(code[from.offset() - 5]);
- blackbox[5] = uintptr_t(code[from.offset() - 4]);
- blackbox[6] = uintptr_t(code[from.offset() - 3]);
- blackbox[7] = uintptr_t(startOffset);
- blackbox[8] = uintptr_t(endOffset);
- blackbox[9] = uintptr_t(0xFFFF7777);
-#endif
MOZ_CRASH("nextJump bogus offset");
}
diff --git a/js/src/js-config.mozbuild b/js/src/js-config.mozbuild
index 4166c0ad16..d90a42466a 100644
--- a/js/src/js-config.mozbuild
+++ b/js/src/js-config.mozbuild
@@ -10,11 +10,9 @@ DEFINES['ENABLE_SHARED_ARRAY_BUFFER'] = True
DEFINES['EXPORT_JS_API'] = True
-if CONFIG['NIGHTLY_BUILD']:
- DEFINES['ENABLE_BINARYDATA'] = True
+DEFINES['ENABLE_BINARYDATA'] = True
-if CONFIG['NIGHTLY_BUILD']:
- DEFINES['ENABLE_SIMD'] = True
+DEFINES['ENABLE_SIMD'] = True
if CONFIG['JS_HAS_CTYPES']:
DEFINES['JS_HAS_CTYPES'] = True
diff --git a/js/src/jsutil.h b/js/src/jsutil.h
index daf056ad2f..48141b1592 100644
--- a/js/src/jsutil.h
+++ b/js/src/jsutil.h
@@ -361,8 +361,8 @@ Poison(void* ptr, uint8_t value, size_t num)
return ptr;
}
-/* Crash diagnostics by default in debug and on nightly channel. */
-#if (defined(DEBUG) || defined(NIGHTLY_BUILD)) && !defined(MOZ_ASAN)
+/* Crash diagnostics by default in debug. */
+#if defined(DEBUG) && !defined(MOZ_ASAN)
# define JS_CRASH_DIAGNOSTICS 1
#endif
diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp
index 305555f414..1c875c606f 100644
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -641,7 +641,7 @@ Debugger::Debugger(JSContext* cx, NativeObject* dbg)
environments(cx),
wasmInstanceScripts(cx),
wasmInstanceSources(cx),
-#ifdef NIGHTLY_BUILD
+#ifdef DEBUG
traceLoggerLastDrainedSize(0),
traceLoggerLastDrainedIteration(0),
#endif
@@ -656,7 +656,7 @@ Debugger::Debugger(JSContext* cx, NativeObject* dbg)
#ifdef JS_TRACE_LOGGING
TraceLoggerThread* logger = TraceLoggerForMainThread(cx->runtime());
if (logger) {
-#ifdef NIGHTLY_BUILD
+#ifdef DEBUG
logger->getIterationAndSize(&traceLoggerLastDrainedIteration, &traceLoggerLastDrainedSize);
#endif
logger->getIterationAndSize(&traceLoggerScriptedCallsLastDrainedIteration,
@@ -4891,7 +4891,7 @@ DefineProperty(JSContext* cx, HandleObject obj, HandleId id, const char* value,
}
#ifdef JS_TRACE_LOGGING
-# ifdef NIGHTLY_BUILD
+# ifdef DEBUG
bool
Debugger::setupTraceLogger(JSContext* cx, unsigned argc, Value* vp)
{
@@ -5009,7 +5009,7 @@ Debugger::drainTraceLogger(JSContext* cx, unsigned argc, Value* vp)
return true;
}
-# endif // NIGHTLY_BUILD
+# endif // DEBUG
bool
Debugger::setupTraceLoggerScriptCalls(JSContext* cx, unsigned argc, Value* vp)
@@ -5262,7 +5262,7 @@ const JSFunctionSpec Debugger::methods[] = {
JS_FN("drainTraceLoggerScriptCalls", Debugger::drainTraceLoggerScriptCalls, 0, 0),
JS_FN("startTraceLogger", Debugger::startTraceLogger, 0, 0),
JS_FN("endTraceLogger", Debugger::endTraceLogger, 0, 0),
-# ifdef NIGHTLY_BUILD
+# ifdef DEBUG
JS_FN("setupTraceLogger", Debugger::setupTraceLogger, 1, 0),
JS_FN("drainTraceLogger", Debugger::drainTraceLogger, 0, 0),
# endif
diff --git a/js/src/vm/Debugger.h b/js/src/vm/Debugger.h
index c8b84d8b14..56a6318ba9 100644
--- a/js/src/vm/Debugger.h
+++ b/js/src/vm/Debugger.h
@@ -485,7 +485,7 @@ class Debugger : private mozilla::LinkedListElement<Debugger>
* Keep track of tracelogger last drained identifiers to know if there are
* lost events.
*/
-#ifdef NIGHTLY_BUILD
+#ifdef DEBUG
uint32_t traceLoggerLastDrainedSize;
uint32_t traceLoggerLastDrainedIteration;
#endif
@@ -629,7 +629,7 @@ class Debugger : private mozilla::LinkedListElement<Debugger>
static bool startTraceLogger(JSContext* cx, unsigned argc, Value* vp);
static bool endTraceLogger(JSContext* cx, unsigned argc, Value* vp);
static bool isCompilableUnit(JSContext* cx, unsigned argc, Value* vp);
-#ifdef NIGHTLY_BUILD
+#ifdef DEBUG
static bool setupTraceLogger(JSContext* cx, unsigned argc, Value* vp);
static bool drainTraceLogger(JSContext* cx, unsigned argc, Value* vp);
#endif
diff --git a/js/src/vm/UnboxedObject.cpp b/js/src/vm/UnboxedObject.cpp
index de6bdef9e3..4912e65db9 100644
--- a/js/src/vm/UnboxedObject.cpp
+++ b/js/src/vm/UnboxedObject.cpp
@@ -1906,17 +1906,9 @@ js::TryConvertToUnboxedLayout(ExclusiveContext* cx, AutoEnterAnalysis& enter, Sh
{
bool isArray = !templateShape;
- // Unboxed arrays are nightly only for now. The getenv() call will be
- // removed when they are on by default. See bug 1153266.
+ // Unboxed arrays are disabled for now. See bug 1153266.
if (isArray) {
-#ifdef NIGHTLY_BUILD
- if (!getenv("JS_OPTION_USE_UNBOXED_ARRAYS")) {
- if (!cx->options().unboxedArrays())
- return true;
- }
-#else
return true;
-#endif
} else {
if (jit::JitOptions.disableUnboxedObjects)
return true;
diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp
index f659c27ffa..8cbbff5370 100644
--- a/js/src/wasm/AsmJS.cpp
+++ b/js/src/wasm/AsmJS.cpp
@@ -1,6 +1,7 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* Copyright 2014 Mozilla Foundation
+ * Copyright 2022 Moonchild Productions
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -8546,9 +8547,7 @@ LookupAsmJSModuleInCache(ExclusiveContext* cx, AsmJSParser& parser, bool* loaded
// Don't punish release users by crashing if there is a programmer error
// here, just gracefully return with a cache miss.
-#ifdef NIGHTLY_BUILD
- MOZ_RELEASE_ASSERT(cursor == entry.memory + entry.serializedSize);
-#endif
+ MOZ_ASSERT(cursor == entry.memory + entry.serializedSize);
if (cursor != entry.memory + entry.serializedSize)
return true;
diff --git a/layout/generic/nsBulletFrame.cpp b/layout/generic/nsBulletFrame.cpp
index db9a70aff6..dad2230b36 100644
--- a/layout/generic/nsBulletFrame.cpp
+++ b/layout/generic/nsBulletFrame.cpp
@@ -775,16 +775,6 @@ nsBulletFrame::Notify(imgIRequest *aRequest, int32_t aType, const nsIntRect* aDa
InvalidateFrame();
}
- if (aType == imgINotificationObserver::DECODE_COMPLETE) {
- if (nsIDocument* parent = GetOurCurrentDoc()) {
- nsCOMPtr<imgIContainer> container;
- aRequest->GetImage(getter_AddRefs(container));
- if (container) {
- container->PropagateUseCounters(parent);
- }
- }
- }
-
return NS_OK;
}
diff --git a/layout/style/ImageLoader.cpp b/layout/style/ImageLoader.cpp
index a26a1741aa..5d4f628636 100644
--- a/layout/style/ImageLoader.cpp
+++ b/layout/style/ImageLoader.cpp
@@ -15,7 +15,6 @@
#include "FrameLayerBuilder.h"
#include "nsSVGEffects.h"
#include "imgIContainer.h"
-#include "Image.h"
namespace mozilla {
namespace css {
@@ -395,14 +394,6 @@ ImageLoader::Notify(imgIRequest* aRequest, int32_t aType, const nsIntRect* aData
return OnFrameUpdate(aRequest);
}
- if (aType == imgINotificationObserver::DECODE_COMPLETE) {
- nsCOMPtr<imgIContainer> image;
- aRequest->GetImage(getter_AddRefs(image));
- if (image && mDocument) {
- image->PropagateUseCounters(mDocument);
- }
- }
-
return NS_OK;
}
@@ -508,19 +499,5 @@ ImageLoader::UnblockOnload(imgIRequest* aRequest)
return NS_OK;
}
-void
-ImageLoader::FlushUseCounters()
-{
- for (auto iter = mImages.Iter(); !iter.Done(); iter.Next()) {
- nsPtrHashKey<Image>* key = iter.Get();
- ImageLoader::Image* image = key->GetKey();
-
- imgIRequest* request = image->mRequests.GetWeak(mDocument);
-
- nsCOMPtr<imgIContainer> container;
- request->GetImage(getter_AddRefs(container));
- }
-}
-
} // namespace css
} // namespace mozilla
diff --git a/layout/style/ImageLoader.h b/layout/style/ImageLoader.h
index 4e29da5ed4..c7469d570d 100644
--- a/layout/style/ImageLoader.h
+++ b/layout/style/ImageLoader.h
@@ -70,8 +70,6 @@ public:
void DestroyRequest(imgIRequest* aRequest);
- void FlushUseCounters();
-
private:
~ImageLoader() {}
diff --git a/layout/style/nsCSSDataBlock.cpp b/layout/style/nsCSSDataBlock.cpp
index 33c309dd40..c32f436106 100644
--- a/layout/style/nsCSSDataBlock.cpp
+++ b/layout/style/nsCSSDataBlock.cpp
@@ -681,14 +681,12 @@ nsCSSExpandedDataBlock::TransferFromBlock(nsCSSExpandedDataBlock& aFromBlock,
bool aIsImportant,
bool aOverrideImportant,
bool aMustCallValueAppended,
- css::Declaration* aDeclaration,
- nsIDocument* aSheetDocument)
+ css::Declaration* aDeclaration)
{
if (!nsCSSProps::IsShorthand(aPropID)) {
return DoTransferFromBlock(aFromBlock, aPropID,
aIsImportant, aOverrideImportant,
- aMustCallValueAppended, aDeclaration,
- aSheetDocument);
+ aMustCallValueAppended, aDeclaration);
}
// We can pass CSSEnabledState::eIgnore (here, and in ClearProperty
@@ -700,8 +698,7 @@ nsCSSExpandedDataBlock::TransferFromBlock(nsCSSExpandedDataBlock& aFromBlock,
CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES(p, aPropID, aEnabledState) {
changed |= DoTransferFromBlock(aFromBlock, *p,
aIsImportant, aOverrideImportant,
- aMustCallValueAppended, aDeclaration,
- aSheetDocument);
+ aMustCallValueAppended, aDeclaration);
}
return changed;
}
@@ -712,8 +709,7 @@ nsCSSExpandedDataBlock::DoTransferFromBlock(nsCSSExpandedDataBlock& aFromBlock,
bool aIsImportant,
bool aOverrideImportant,
bool aMustCallValueAppended,
- css::Declaration* aDeclaration,
- nsIDocument* aSheetDocument)
+ css::Declaration* aDeclaration)
{
bool changed = false;
MOZ_ASSERT(aFromBlock.HasPropertyBit(aPropID), "oops");
@@ -741,13 +737,6 @@ nsCSSExpandedDataBlock::DoTransferFromBlock(nsCSSExpandedDataBlock& aFromBlock,
aDeclaration->ValueAppended(aPropID);
}
- if (aSheetDocument) {
- UseCounter useCounter = nsCSSProps::UseCounterFor(aPropID);
- if (useCounter != eUseCounter_UNKNOWN) {
- aSheetDocument->SetDocumentAndPageUseCounter(useCounter);
- }
- }
-
SetPropertyBit(aPropID);
aFromBlock.ClearPropertyBit(aPropID);
diff --git a/layout/style/nsCSSDataBlock.h b/layout/style/nsCSSDataBlock.h
index b699c408b9..3d6fd659d8 100644
--- a/layout/style/nsCSSDataBlock.h
+++ b/layout/style/nsCSSDataBlock.h
@@ -20,7 +20,6 @@
struct nsRuleData;
class nsCSSExpandedDataBlock;
-class nsIDocument;
namespace mozilla {
namespace css {
@@ -258,8 +257,6 @@ public:
* Returns true if something changed, false otherwise. Calls
* |ValueAppended| on |aDeclaration| if the property was not
* previously set, or in any case if |aMustCallValueAppended| is true.
- * Calls |SetDocumentAndPageUseCounter| on |aSheetDocument| if it is
- * non-null and |aPropID| has a use counter.
*/
bool TransferFromBlock(nsCSSExpandedDataBlock& aFromBlock,
nsCSSPropertyID aPropID,
@@ -267,8 +264,7 @@ public:
bool aIsImportant,
bool aOverrideImportant,
bool aMustCallValueAppended,
- mozilla::css::Declaration* aDeclaration,
- nsIDocument* aSheetDocument);
+ mozilla::css::Declaration* aDeclaration);
/**
* Copies the values for aPropID into the specified aRuleData object.
@@ -302,8 +298,7 @@ private:
bool aIsImportant,
bool aOverrideImportant,
bool aMustCallValueAppended,
- mozilla::css::Declaration* aDeclaration,
- nsIDocument* aSheetDocument);
+ mozilla::css::Declaration* aDeclaration);
#ifdef DEBUG
void DoAssertInitialState();
diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp
index 70115d2a4a..6a65f06646 100644
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -67,9 +67,7 @@ static bool sOpentypeSVGEnabled;
static bool sWebkitPrefixedAliasesEnabled;
static bool sWebkitDevicePixelRatioEnabled;
static bool sUnprefixingServiceEnabled;
-#ifdef NIGHTLY_BUILD
static bool sUnprefixingServiceGloballyWhitelisted;
-#endif
static bool sMozGradientsEnabled;
static bool sControlCharVisibility;
@@ -143,8 +141,6 @@ public:
nsresult SetStyleSheet(CSSStyleSheet* aSheet);
- nsIDocument* GetDocument();
-
nsresult SetQuirkMode(bool aQuirkMode);
nsresult SetChildLoader(mozilla::css::Loader* aChildLoader);
@@ -1649,15 +1645,6 @@ CSSParserImpl::SetStyleSheet(CSSStyleSheet* aSheet)
return NS_OK;
}
-nsIDocument*
-CSSParserImpl::GetDocument()
-{
- if (!mSheet) {
- return nullptr;
- }
- return mSheet->GetDocument();
-}
-
nsresult
CSSParserImpl::SetQuirkMode(bool aQuirkMode)
{
@@ -1979,8 +1966,7 @@ CSSParserImpl::ParseTransformProperty(const nsAString& aPropValue,
declaration->ExpandTo(&mData);
changed = mData.TransferFromBlock(mTempData, eCSSProperty_transform,
EnabledState(), false,
- true, false, declaration,
- GetDocument());
+ true, false, declaration);
declaration->CompressFrom(&mData);
}
@@ -2061,8 +2047,7 @@ CSSParserImpl::ParseProperty(const nsCSSPropertyID aPropID,
aDeclaration->ExpandTo(&mData);
*aChanged = mData.TransferFromBlock(mTempData, aPropID,
EnabledState(), aIsImportant,
- true, false, aDeclaration,
- GetDocument());
+ true, false, aDeclaration);
aDeclaration->CompressFrom(&mData);
}
CLEAR_ERROR();
@@ -2302,8 +2287,20 @@ CSSParserImpl::ParseMarginString(const nsSubstring& aBuffer,
nsAutoSuppressErrors suppressErrors(this, aSuppressErrors);
- // Parse a margin, and check that there's nothing else after it.
- bool marginParsed = ParseGroupedBoxProperty(VARIANT_LP, aValue, 0) && !GetToken(true);
+ bool marginParsed = false;
+
+ // Treat margin as zero length if there are no tokens, i.e., the specified
+ // margin string is empty or consists only of whitespace characters.
+ if (!GetToken(true)) {
+ nsCSSRect& zeroRootMargin = aValue.SetRectValue();
+ zeroRootMargin.SetAllSidesTo(nsCSSValue(0.0f, eCSSUnit_Pixel));
+ marginParsed = true;
+ } else {
+ UngetToken();
+ // Parse a margin, and check that there's nothing else after it.
+ marginParsed = ParseGroupedBoxProperty(VARIANT_LPN, aValue, 0) &&
+ !GetToken(true);
+ }
if (aSuppressErrors) {
CLEAR_ERROR();
@@ -7197,13 +7194,12 @@ CSSParserImpl::ShouldUseUnprefixingService() const
return false;
}
-#ifdef NIGHTLY_BUILD
if (sUnprefixingServiceGloballyWhitelisted) {
// Unprefixing is globally whitelisted,
// so no need to check mSheetPrincipal.
return true;
}
-#endif
+
// Unprefixing enabled; see if our principal is whitelisted for unprefixing.
return mSheetPrincipal && mSheetPrincipal->IsOnCSSUnprefixingWhitelist();
}
@@ -7505,7 +7501,7 @@ CSSParserImpl::ParseDeclaration(css::Declaration* aDeclaration,
*aChanged |= mData.TransferFromBlock(mTempData, propID, EnabledState(),
status == ePriority_Important,
false, aMustCallValueAppended,
- aDeclaration, GetDocument());
+ aDeclaration);
}
return true;
@@ -17992,10 +17988,8 @@ nsCSSParser::Startup()
"layout.css.prefixes.device-pixel-ratio-webkit");
Preferences::AddBoolVarCache(&sUnprefixingServiceEnabled,
"layout.css.unprefixing-service.enabled");
-#ifdef NIGHTLY_BUILD
Preferences::AddBoolVarCache(&sUnprefixingServiceGloballyWhitelisted,
"layout.css.unprefixing-service.globally-whitelisted");
-#endif
Preferences::AddBoolVarCache(&sMozGradientsEnabled,
"layout.css.prefixes.gradients");
Preferences::AddBoolVarCache(&sControlCharVisibility,
diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp
index e3cd802417..da50e3cb4f 100644
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -3421,21 +3421,6 @@ nsCSSProps::gPropertyEnabled[eCSSProperty_COUNT_with_aliases] = {
#undef IS_ENABLED_BY_DEFAULT
};
-#include "../../dom/base/PropertyUseCounterMap.inc"
-
-/* static */ const UseCounter
-nsCSSProps::gPropertyUseCounter[eCSSProperty_COUNT_no_shorthands] = {
- #define CSS_PROP_PUBLIC_OR_PRIVATE(publicname_, privatename_) privatename_
- #define CSS_PROP_LIST_INCLUDE_LOGICAL
- #define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
- kwtable_, stylestruct_, stylestructoffset_, animtype_) \
- static_cast<UseCounter>(USE_COUNTER_FOR_CSS_PROPERTY_##method_),
- #include "nsCSSPropList.h"
- #undef CSS_PROP
- #undef CSS_PROP_LIST_INCLUDE_LOGICAL
- #undef CSS_PROP_PUBLIC_OR_PRIVATE
-};
-
// Check that all logical property flags are used appropriately.
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
kwtable_, stylestruct_, stylestructoffset_, animtype_) \
diff --git a/layout/style/nsCSSProps.h b/layout/style/nsCSSProps.h
index cf7ffda78f..567f7f7bfa 100644
--- a/layout/style/nsCSSProps.h
+++ b/layout/style/nsCSSProps.h
@@ -19,7 +19,6 @@
#include "nsStyleStructFwd.h"
#include "nsCSSKeywords.h"
#include "mozilla/CSSEnabledState.h"
-#include "mozilla/UseCounter.h"
#include "mozilla/EnumTypeTraits.h"
// Length of the "--" prefix on custom names (such as custom property names,
@@ -640,19 +639,8 @@ public:
return gPropertyEnabled[aProperty];
}
- // A table for the use counter associated with each CSS property. If a
- // property does not have a use counter defined in UseCounters.conf, then
- // its associated entry is |eUseCounter_UNKNOWN|.
- static const mozilla::UseCounter gPropertyUseCounter[eCSSProperty_COUNT_no_shorthands];
-
public:
- static mozilla::UseCounter UseCounterFor(nsCSSPropertyID aProperty) {
- MOZ_ASSERT(0 <= aProperty && aProperty < eCSSProperty_COUNT_no_shorthands,
- "out of range");
- return gPropertyUseCounter[aProperty];
- }
-
static bool IsEnabled(nsCSSPropertyID aProperty, EnabledState aEnabled)
{
if (IsEnabled(aProperty)) {
diff --git a/mfbt/WeakPtr.h b/mfbt/WeakPtr.h
index 477c56bbf3..a3164c3f87 100644
--- a/mfbt/WeakPtr.h
+++ b/mfbt/WeakPtr.h
@@ -99,7 +99,7 @@
// b. switch to POSIX-based threading in MinGW with pthread emulation
// c. refactor it to not use std::thread
-#if !defined(__MINGW32__) && (defined(DEBUG) || (defined(NIGHTLY_BUILD) && !defined(MOZ_PROFILING)))
+#if !defined(__MINGW32__) && defined(DEBUG)
#include <thread>
#define MOZ_WEAKPTR_DECLARE_THREAD_SAFETY_CHECK \
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
index d0bc9269c7..26df1c6ae5 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -150,11 +150,7 @@ pref("dom.manifest.onappinstalled", false);
pref("dom.select_events.enabled", true);
// Whether or not selection events on text controls are enabled
-#ifdef NIGHTLY_BUILD
-pref("dom.select_events.textcontrols.enabled", true);
-#else
pref("dom.select_events.textcontrols.enabled", false);
-#endif
// Whether or not the document visbility API is enabled
pref("dom.visibilityAPI.enabled", true);
@@ -202,11 +198,7 @@ pref("dom.permissions.revoke.enable", false);
pref("dom.performance.time_to_non_blank_paint.enabled", false);
// Enable Performance Observer API
-#ifdef NIGHTLY_BUILD
-pref("dom.enable_performance_observer", true);
-#else
pref("dom.enable_performance_observer", false);
-#endif
// Enable requestIdleCallback API
pref("dom.requestIdleCallback.enabled", true);
@@ -346,12 +338,8 @@ pref("mathml.disabled", false);
// Enable scale transform for stretchy MathML operators. See bug 414277.
pref("mathml.scale_stretchy_operators.enabled", true);
-// Enabled on nightly only until we fix mochitest failures.
-#ifdef NIGHTLY_BUILD
-pref("media.dormant-on-pause-timeout-ms", 5000);
-#else
-pref("media.dormant-on-pause-timeout-ms", -1);
-#endif
+// Reduce resource use after 10s of pause on media playback.
+pref("media.dormant-on-pause-timeout-ms", 10000);
// Media cache size in kilobytes
pref("media.cache_size", 512000);
@@ -388,11 +376,7 @@ pref("media.wmf.enabled", true);
pref("media.wmf.decoder.thread-count", -1);
pref("media.wmf.low-latency.enabled", false);
pref("media.wmf.skip-blacklist", false);
-#ifdef NIGHTLY_BUILD
pref("media.wmf.vp9.enabled", true);
-#else
-pref("media.wmf.vp9.enabled", false);
-#endif
pref("media.windows-media-foundation.allow-d3d11-dxva", true);
pref("media.wmf.disable-d3d11-for-dlls", "igd11dxva64.dll: 20.19.15.4463, 20.19.15.4454, 20.19.15.4444, 20.19.15.4416, 20.19.15.4404, 20.19.15.4390, 20.19.15.4380, 20.19.15.4377, 20.19.15.4364, 20.19.15.4360, 20.19.15.4352, 20.19.15.4331, 20.19.15.4326, 20.19.15.4300; igd10iumd32.dll: 20.19.15.4444, 20.19.15.4424, 20.19.15.4409, 20.19.15.4390, 20.19.15.4380, 20.19.15.4360, 10.18.10.4358, 20.19.15.4331, 20.19.15.4312, 20.19.15.4300, 10.18.15.4281, 10.18.15.4279, 10.18.10.4276, 10.18.15.4268, 10.18.15.4256, 10.18.10.4252, 10.18.15.4248, 10.18.14.4112, 10.18.10.3958, 10.18.10.3496, 10.18.10.3431, 10.18.10.3412, 10.18.10.3355, 9.18.10.3234, 9.18.10.3071, 9.18.10.3055, 9.18.10.3006; igd10umd32.dll: 9.17.10.4229, 9.17.10.3040, 9.17.10.2857, 8.15.10.2274, 8.15.10.2272, 8.15.10.2246, 8.15.10.1840, 8.15.10.1808; igd10umd64.dll: 9.17.10.4229, 9.17.10.2857, 10.18.10.3496; isonyvideoprocessor.dll: 4.1.2247.8090, 4.1.2153.6200; tosqep.dll: 1.2.15.526, 1.1.12.201, 1.0.11.318, 1.0.11.215, 1.0.10.1224; tosqep64.dll: 1.1.12.201, 1.0.11.215; nvwgf2um.dll: 22.21.13.8253, 22.21.13.8233, 22.21.13.8205, 22.21.13.8189, 22.21.13.8178, 22.21.13.8165, 21.21.13.7892, 21.21.13.7878, 21.21.13.7866, 21.21.13.7849, 21.21.13.7654, 21.21.13.7653, 21.21.13.7633, 21.21.13.7619, 21.21.13.7563, 21.21.13.7306, 21.21.13.7290, 21.21.13.7270, 21.21.13.7254, 21.21.13.6939, 21.21.13.6926, 21.21.13.6909, 21.21.13.4201, 21.21.13.4200, 10.18.13.6881, 10.18.13.6839, 10.18.13.6510, 10.18.13.6472, 10.18.13.6143, 10.18.13.5946, 10.18.13.5923, 10.18.13.5921, 10.18.13.5891, 10.18.13.5887, 10.18.13.5582, 10.18.13.5445, 10.18.13.5382, 10.18.13.5362, 9.18.13.4788, 9.18.13.4752, 9.18.13.4725, 9.18.13.4709, 9.18.13.4195, 9.18.13.4192, 9.18.13.4144, 9.18.13.4052, 9.18.13.3788, 9.18.13.3523, 9.18.13.3235, 9.18.13.3165, 9.18.13.2723, 9.18.13.2702, 9.18.13.1422, 9.18.13.1407, 9.18.13.1106, 9.18.13.546; atidxx32.dll: 21.19.151.3, 21.19.142.257, 21.19.137.514, 21.19.137.1, 21.19.134.1, 21.19.128.7, 21.19.128.4, 20.19.0.32837, 20.19.0.32832, 8.17.10.682, 8.17.10.671, 8.17.10.661, 8.17.10.648, 8.17.10.644, 8.17.10.625, 8.17.10.605, 8.17.10.581, 8.17.10.569, 8.17.10.560, 8.17.10.545, 8.17.10.539, 8.17.10.531, 8.17.10.525, 8.17.10.520, 8.17.10.519, 8.17.10.514, 8.17.10.511, 8.17.10.494, 8.17.10.489, 8.17.10.483, 8.17.10.453, 8.17.10.451, 8.17.10.441, 8.17.10.436, 8.17.10.432, 8.17.10.425, 8.17.10.418, 8.17.10.414, 8.17.10.401, 8.17.10.395, 8.17.10.385, 8.17.10.378, 8.17.10.362, 8.17.10.355, 8.17.10.342, 8.17.10.331, 8.17.10.318, 8.17.10.310, 8.17.10.286, 8.17.10.269, 8.17.10.261, 8.17.10.247, 8.17.10.240, 8.15.10.212; atidxx64.dll: 21.19.151.3, 21.19.142.257, 21.19.137.514, 21.19.137.1, 21.19.134.1, 21.19.128.7, 21.19.128.4, 20.19.0.32832, 8.17.10.682, 8.17.10.661, 8.17.10.644, 8.17.10.625; nvumdshim.dll: 10.18.13.6822");
pref("media.wmf.disable-d3d9-for-dlls", "igdumd64.dll: 8.15.10.2189, 8.15.10.2119, 8.15.10.2104, 8.15.10.2102, 8.771.1.0; atiumd64.dll: 7.14.10.833, 7.14.10.867, 7.14.10.885, 7.14.10.903, 7.14.10.911, 8.14.10.768, 9.14.10.1001, 9.14.10.1017, 9.14.10.1080, 9.14.10.1128, 9.14.10.1162, 9.14.10.1171, 9.14.10.1183, 9.14.10.1197, 9.14.10.945, 9.14.10.972, 9.14.10.984, 9.14.10.996");
@@ -443,11 +427,8 @@ pref("media.decoder-doctor.verbose", false);
pref("media.decoder-doctor.wmf-disabled-is-failure", false);
// Whether to suspend decoding of videos in background tabs.
-#ifdef NIGHTLY_BUILD
pref("media.suspend-bkgnd-video.enabled", true);
-#else
-pref("media.suspend-bkgnd-video.enabled", false);
-#endif
+
// Delay, in ms, from time window goes to background to suspending
// video decoders. Defaults to 10 seconds.
pref("media.suspend-bkgnd-video.delay-ms", 10000);
@@ -680,11 +661,7 @@ pref("apz.peek_messages.enabled", true);
// Whether to print the APZC tree for debugging
pref("apz.printtree", false);
-#ifdef NIGHTLY_BUILD
-pref("apz.record_checkerboarding", true);
-#else
pref("apz.record_checkerboarding", false);
-#endif
pref("apz.test.logging_enabled", false);
pref("apz.touch_start_tolerance", "0.1");
pref("apz.touch_move_tolerance", "0.03");
@@ -1276,11 +1253,7 @@ pref("javascript.options.mem.log", false);
pref("javascript.options.mem.notify", false);
pref("javascript.options.gc_on_memory_pressure", true);
pref("javascript.options.compact_on_user_inactive", true);
-#ifdef NIGHTLY_BUILD
-pref("javascript.options.compact_on_user_inactive_delay", 15000); // ms
-#else
pref("javascript.options.compact_on_user_inactive_delay", 300000); // ms
-#endif
pref("javascript.options.mem.gc_high_frequency_time_limit_ms", 1000);
pref("javascript.options.mem.gc_high_frequency_low_limit_mb", 100);
@@ -2518,12 +2491,8 @@ pref("layout.css.prefixes.device-pixel-ratio-webkit", false);
// Is the CSS Unprefixing Service enabled? (This service emulates support
// for certain vendor-prefixed properties & values, for sites on a "fixlist".)
pref("layout.css.unprefixing-service.enabled", true);
-#ifdef NIGHTLY_BUILD
// Is the CSS Unprefixing Service whitelisted for all domains?
-// (This pref is only honored in Nightly builds and can be removed when
-// Bug 1177263 is fixed.)
pref("layout.css.unprefixing-service.globally-whitelisted", false);
-#endif
// Is support for the :scope selector enabled?
pref("layout.css.scope-pseudo.enabled", true);
@@ -2734,10 +2703,6 @@ pref("hangmonitor.timeout", 0);
pref("plugins.load_appdir_plugins", false);
// If true, plugins will be click to play
pref("plugins.click_to_play", false);
-#ifdef NIGHTLY_BUILD
-// This only supports one hidden ctp plugin, edit nsPluginArray.cpp if adding a second
-pref("plugins.navigator.hidden_ctp_plugin", "Shockwave Flash");
-#endif
// The default value for nsIPluginTag.enabledState (STATE_ENABLED = 2)
pref("plugin.default.state", 2);
@@ -3130,12 +3095,12 @@ pref("font.name.serif.ar", "Times New Roman");
pref("font.name.sans-serif.ar", "Segoe UI");
pref("font.name-list.sans-serif.ar", "Segoe UI, Tahoma, Arial");
pref("font.name.monospace.ar", "Consolas");
-pref("font.name.cursive.ar", "Comic Sans MS");
+pref("font.name.cursive.ar", "Segoe Script");
pref("font.name.serif.el", "Times New Roman");
pref("font.name.sans-serif.el", "Arial");
pref("font.name.monospace.el", "Consolas");
-pref("font.name.cursive.el", "Comic Sans MS");
+pref("font.name.cursive.el", "Segoe Script");
pref("font.name.serif.he", "Narkisim");
pref("font.name.sans-serif.he", "Arial");
@@ -3170,17 +3135,17 @@ pref("font.name.cursive.th", "Tahoma");
pref("font.name.serif.x-cyrillic", "Times New Roman");
pref("font.name.sans-serif.x-cyrillic", "Arial");
pref("font.name.monospace.x-cyrillic", "Consolas");
-pref("font.name.cursive.x-cyrillic", "Comic Sans MS");
+pref("font.name.cursive.x-cyrillic", "Segoe Script");
pref("font.name.serif.x-unicode", "Times New Roman");
pref("font.name.sans-serif.x-unicode", "Arial");
pref("font.name.monospace.x-unicode", "Consolas");
-pref("font.name.cursive.x-unicode", "Comic Sans MS");
+pref("font.name.cursive.x-unicode", "Segoe Script");
pref("font.name.serif.x-western", "Times New Roman");
pref("font.name.sans-serif.x-western", "Arial");
pref("font.name.monospace.x-western", "Consolas");
-pref("font.name.cursive.x-western", "Comic Sans MS");
+pref("font.name.cursive.x-western", "Segoe Script");
pref("font.name.serif.zh-CN", "SimSun");
pref("font.name.sans-serif.zh-CN", "Microsoft YaHei");
@@ -3326,7 +3291,7 @@ pref("font.name.serif.x-math", "Latin Modern Math");
pref("font.name-list.serif.x-math", "Latin Modern Math, XITS Math, Cambria Math, Libertinus Math, DejaVu Math TeX Gyre, TeX Gyre Bonum Math, TeX Gyre Pagella Math, TeX Gyre Schola, TeX Gyre Termes Math, STIX Math, Asana Math, STIXGeneral, DejaVu Serif, DejaVu Sans, Symbol, Times New Roman");
pref("font.name.sans-serif.x-math", "Arial");
pref("font.name.monospace.x-math", "Consolas");
-pref("font.name.cursive.x-math", "Comic Sans MS");
+pref("font.name.cursive.x-math", "Segoe Script");
// ClearType tuning parameters for directwrite/d2d.
//
@@ -4303,10 +4268,6 @@ pref("layers.acceleration.force", false);
// and output the result to stderr.
pref("layers.bench.enabled", false);
-#if defined(XP_WIN) && defined(NIGHTLY_BUILD)
-pref("layers.gpu-process.dev.enabled", true);
-#endif
-
pref("layers.acceleration.draw-fps", false);
// Enable DEAA antialiasing for transformed layers in the compositor
@@ -4457,11 +4418,7 @@ pref("notification.feature.enabled", false);
pref("dom.webnotifications.enabled", true);
pref("dom.webnotifications.serviceworker.enabled", true);
pref("dom.webnotifications.requireinteraction.count", 3);
-#ifdef NIGHTLY_BUILD
-pref("dom.webnotifications.requireinteraction.enabled", true);
-#else
pref("dom.webnotifications.requireinteraction.enabled", false);
-#endif
// Alert animation effect, name is disableSlidingEffect for backwards-compat.
pref("alerts.disableSlidingEffect", false);
@@ -4854,11 +4811,7 @@ pref("dom.mozSettings.SettingsService.verbose.enabled", false);
pref("dom.mozSettings.allowForceReadOnly", false);
// The interval at which to check for slow running addons
-#ifdef NIGHTLY_BUILD
-pref("browser.addon-watch.interval", 15000);
-#else
pref("browser.addon-watch.interval", -1);
-#endif
pref("browser.addon-watch.ignore", "[\"mochikit@mozilla.org\",\"special-powers@mozilla.org\",\"fxdevtools-adapters@mozilla.org\",\"fx-devtools\"]");
// Search service settings
diff --git a/toolkit/components/formautofill/formautofill.manifest b/toolkit/components/formautofill/formautofill.manifest
index 880972edc2..8d5144a034 100644
--- a/toolkit/components/formautofill/formautofill.manifest
+++ b/toolkit/components/formautofill/formautofill.manifest
@@ -2,6 +2,3 @@ component {ed9c2c3c-3f86-4ae5-8e31-10f71b0f19e6} FormAutofillContentService.js
contract @mozilla.org/formautofill/content-service;1 {ed9c2c3c-3f86-4ae5-8e31-10f71b0f19e6}
component {51c95b3d-7431-467b-8d50-383f158ce9e5} FormAutofillStartup.js
contract @mozilla.org/formautofill/startup;1 {51c95b3d-7431-467b-8d50-383f158ce9e5}
-#ifdef NIGHTLY_BUILD
-category profile-after-change FormAutofillStartup @mozilla.org/formautofill/startup;1
-#endif
diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js
index f9a0abcb0e..ae991b888a 100644
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -196,24 +196,6 @@ var snapshotFormatters = {
delete data.info;
}
-#ifdef NIGHTLY_BUILD
- let windowUtils = window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindowUtils);
- let gpuProcessPid = windowUtils.gpuProcessPid;
-
- if (gpuProcessPid != -1) {
- let gpuProcessKillButton = $.new("button");
-
- gpuProcessKillButton.addEventListener("click", function() {
- windowUtils.terminateGPUProcess();
- });
-
- gpuProcessKillButton.textContent = strings.GetStringFromName("gpuProcessKillButton");
- addRow("diagnostics", "GPUProcessPid", gpuProcessPid);
- addRow("diagnostics", "GPUProcess", [gpuProcessKillButton]);
- }
-#endif
-
// graphics-failures-tbody tbody
if ("failures" in data) {
// If indices is there, it should be the same length as failures,
diff --git a/toolkit/modules/AppConstants.jsm b/toolkit/modules/AppConstants.jsm
index ba94f4a3fc..b5abc3c149 100644
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -13,21 +13,9 @@ this.EXPORTED_SYMBOLS = ["AppConstants"];
// Immutable for export.
this.AppConstants = Object.freeze({
- // See this wiki page for more details about channel specific build
- // defines: https://wiki.mozilla.org/Platform/Channel-specific_build_defines
- NIGHTLY_BUILD:
-#ifdef NIGHTLY_BUILD
- true,
-#else
- false,
-#endif
-
- RELEASE_OR_BETA:
-#ifdef RELEASE_OR_BETA
- true,
-#else
- false,
-#endif
+ // These defines are no longer used but kept for compatibility
+ NIGHTLY_BUILD: false,
+ RELEASE_OR_BETA: true,
ACCESSIBILITY:
#ifdef ACCESSIBILITY
diff --git a/xpcom/glue/nsDebug.h b/xpcom/glue/nsDebug.h
index 8921d60214..eca36c5137 100644
--- a/xpcom/glue/nsDebug.h
+++ b/xpcom/glue/nsDebug.h
@@ -355,7 +355,7 @@ inline void MOZ_PretendNoReturn()
/*****************************************************************************/
-#if (defined(DEBUG) || (defined(NIGHTLY_BUILD) && !defined(MOZ_PROFILING))) && !defined(XPCOM_GLUE_AVOID_NSPR)
+#if defined(DEBUG) && !defined(XPCOM_GLUE_AVOID_NSPR)
#define MOZ_THREAD_SAFETY_OWNERSHIP_CHECKS_SUPPORTED 1
#endif
diff --git a/xpcom/glue/nsISupportsImpl.h b/xpcom/glue/nsISupportsImpl.h
index 66c4ad6d85..8c75cbe643 100644
--- a/xpcom/glue/nsISupportsImpl.h
+++ b/xpcom/glue/nsISupportsImpl.h
@@ -64,13 +64,13 @@ private:
#define NS_ASSERT_OWNINGTHREAD_AGGREGATE(agg, _class) \
NS_CheckThreadSafe(agg->_mOwningThread.GetThread(), #_class " not thread-safe")
#define NS_ASSERT_OWNINGTHREAD(_class) NS_ASSERT_OWNINGTHREAD_AGGREGATE(this, _class)
-#else // !DEBUG && !(NIGHTLY_BUILD && !MOZ_PROFILING)
+#else // !DEBUG
#define NS_DECL_OWNINGTHREAD /* nothing */
#define NS_ASSERT_OWNINGTHREAD_AGGREGATE(agg, _class) ((void)0)
#define NS_ASSERT_OWNINGTHREAD(_class) ((void)0)
-#endif // DEBUG || (NIGHTLY_BUILD && !MOZ_PROFILING)
+#endif // DEBUG
// Macros for reference-count and constructor logging