Merge inbound to mozilla-central. a=merge

This commit is contained in:
Brindusan Cristian 2018-04-07 12:57:02 +03:00
Родитель 2837c659de 211a09f3da
Коммит c5ba0f0766
15 изменённых файлов: 93 добавлений и 185 удалений

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

@ -54,7 +54,7 @@ var whitelist = [
// See bug 1339424 for why this is hard to fix.
{file: "chrome://global/locale/fallbackMenubar.properties",
platforms: ["linux", "win"]},
{file: "chrome://global/locale/printPageSetup.dtd", platforms: ["macosx"]},
{file: "chrome://global/locale/printPageSetup.dtd", platforms: ["linux", "macosx"]},
{file: "chrome://global/locale/printPreviewProgress.dtd",
platforms: ["macosx"]},
{file: "chrome://global/locale/printProgress.dtd", platforms: ["macosx"]},

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

@ -98,6 +98,7 @@ function telemetryBucketForCategory(category) {
switch (category) {
case "containers":
case "general":
case "home":
case "privacy":
case "search":
case "sync":

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

@ -26,9 +26,7 @@
locale/browser/browser.properties (%chrome/browser/browser.properties)
locale/browser/customizableui/customizableWidgets.properties (%chrome/browser/customizableui/customizableWidgets.properties)
locale/browser/lightweightThemes.properties (%chrome/browser/lightweightThemes.properties)
#ifdef XP_WIN
locale/browser/uiDensity.properties (%chrome/browser/uiDensity.properties)
#endif
locale/browser/pageInfo.dtd (%chrome/browser/pageInfo.dtd)
locale/browser/pageInfo.properties (%chrome/browser/pageInfo.properties)
locale/browser/quitDialog.properties (%chrome/browser/quitDialog.properties)

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

@ -726,10 +726,10 @@ nsMathMLElement::MapMathMLAttributesInto(const nsMappedAttributes* aAttributes,
str.CompressWhitespace();
if (str.EqualsASCII("normal")) {
aData->SetKeywordValue(eCSSProperty_font_weight,
NS_STYLE_FONT_WEIGHT_NORMAL);
NS_FONT_WEIGHT_NORMAL);
} else if (str.EqualsASCII("bold")) {
aData->SetKeywordValue(eCSSProperty_font_weight,
NS_STYLE_FONT_WEIGHT_BOLD);
NS_FONT_WEIGHT_BOLD);
}
}
}

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

@ -71,8 +71,10 @@ tags=capturestream
[test_audioParamExponentialRamp.html]
[test_audioParamGain.html]
[test_audioParamLinearRamp.html]
skip-if = os == "linux" || os == "win" #bug 1446346
[test_audioParamSetCurveAtTime.html]
[test_audioParamSetCurveAtTimeTwice.html]
skip-if = os == "linux" || os == "win" #bug 1446456
[test_audioParamSetCurveAtTimeZeroDuration.html]
[test_audioParamSetTargetAtTime.html]
[test_audioParamSetTargetAtTimeZeroTimeConstant.html]

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

@ -789,6 +789,7 @@ public:
ServiceWorkerRegistrarSaveDataRunnable()
: Runnable("dom::ServiceWorkerRegistrarSaveDataRunnable")
, mEventTarget(GetCurrentThreadEventTarget())
, mRetryCounter(0)
{
AssertIsOnBackgroundThread();
}
@ -799,12 +800,23 @@ public:
RefPtr<ServiceWorkerRegistrar> service = ServiceWorkerRegistrar::Get();
MOZ_ASSERT(service);
service->SaveData();
// If the save fails, try again once in case it was a temporary
// problem due to virus scanning, etc.
static const uint32_t kMaxSaveRetryCount = 1;
nsresult rv = service->SaveData();
if (NS_FAILED(rv) && mRetryCounter < kMaxSaveRetryCount) {
rv = GetCurrentThreadEventTarget()->Dispatch(this, NS_DISPATCH_NORMAL);
if (NS_SUCCEEDED(rv)) {
mRetryCounter += 1;
return NS_OK;
}
}
RefPtr<Runnable> runnable =
NewRunnableMethod("ServiceWorkerRegistrar::DataSaved",
service, &ServiceWorkerRegistrar::DataSaved);
nsresult rv = mEventTarget->Dispatch(runnable, NS_DISPATCH_NORMAL);
rv = mEventTarget->Dispatch(runnable, NS_DISPATCH_NORMAL);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
@ -814,6 +826,7 @@ public:
private:
nsCOMPtr<nsIEventTarget> mEventTarget;
uint32_t mRetryCounter;
};
void
@ -845,7 +858,7 @@ ServiceWorkerRegistrar::ShutdownCompleted()
MOZ_ASSERT(NS_SUCCEEDED(rv));
}
void
nsresult
ServiceWorkerRegistrar::SaveData()
{
MOZ_ASSERT(!NS_IsMainThread());
@ -853,8 +866,12 @@ ServiceWorkerRegistrar::SaveData()
nsresult rv = WriteData();
if (NS_FAILED(rv)) {
NS_WARNING("Failed to write data for the ServiceWorker Registations.");
DeleteData();
// Don't touch the file or in-memory state. Writing files can
// sometimes fail due to virus scanning, etc. We should just leave
// things as is so the next save operation can pick up any changes
// without losing data.
}
return rv;
}
void

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

@ -63,7 +63,7 @@ protected:
// These methods are protected because we test this class using gTest
// subclassing it.
void LoadData();
void SaveData();
nsresult SaveData();
nsresult ReadData();
nsresult WriteData();

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

@ -972,7 +972,7 @@ FontFaceSet::FindOrCreateUserFontEntryFromFontFace(const nsAString& aFamilyName,
nsCSSValue val;
nsCSSUnit unit;
uint32_t weight = NS_STYLE_FONT_WEIGHT_NORMAL;
uint32_t weight = NS_FONT_WEIGHT_NORMAL;
int32_t stretch = NS_STYLE_FONT_STRETCH_NORMAL;
uint8_t italicStyle = NS_STYLE_FONT_STYLE_NORMAL;
uint32_t languageOverride = NO_FONT_LANGUAGE_OVERRIDE;
@ -984,10 +984,10 @@ FontFaceSet::FindOrCreateUserFontEntryFromFontFace(const nsAString& aFamilyName,
if (unit == eCSSUnit_Integer || unit == eCSSUnit_Enumerated) {
weight = val.GetIntValue();
if (weight == 0) {
weight = NS_STYLE_FONT_WEIGHT_NORMAL;
weight = NS_FONT_WEIGHT_NORMAL;
}
} else if (unit == eCSSUnit_Normal) {
weight = NS_STYLE_FONT_WEIGHT_NORMAL;
weight = NS_FONT_WEIGHT_NORMAL;
} else {
NS_ASSERTION(unit == eCSSUnit_Null,
"@font-face weight has unexpected unit");

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

@ -1375,8 +1375,8 @@ const KTableEntry nsCSSProps::kFontVariantPositionKTable[] = {
};
const KTableEntry nsCSSProps::kFontWeightKTable[] = {
{ eCSSKeyword_normal, NS_STYLE_FONT_WEIGHT_NORMAL },
{ eCSSKeyword_bold, NS_STYLE_FONT_WEIGHT_BOLD },
{ eCSSKeyword_normal, NS_FONT_WEIGHT_NORMAL },
{ eCSSKeyword_bold, NS_FONT_WEIGHT_BOLD },
{ eCSSKeyword_bolder, NS_STYLE_FONT_WEIGHT_BOLDER },
{ eCSSKeyword_lighter, NS_STYLE_FONT_WEIGHT_LIGHTER },
{ eCSSKeyword_UNKNOWN, -1 }

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

@ -1,111 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsContentIndexCache_h__
#define nsContentIndexCache_h__
#include "js/HashTable.h"
class nsIContent;
namespace mozilla {
namespace dom {
class Element;
} // namespace dom
} // namespace mozilla
/*
* A class that computes and caches the indices used for :nth-* pseudo-class
* matching.
*/
class nsNthIndexCache {
private:
typedef mozilla::dom::Element Element;
public:
/**
* Constructor and destructor out of line so that we don't try to
* instantiate the hashtable template all over the place.
*/
nsNthIndexCache();
~nsNthIndexCache();
// Returns a 1-based index of the child in its parent. If the child
// is not in its parent's child list (i.e., it is anonymous content),
// returns 0.
// If aCheckEdgeOnly is true, the function will return 1 if the result
// is 1, and something other than 1 (maybe or maybe not a valid
// result) otherwise.
// This must only be called on nodes which have a non-null parent.
int32_t GetNthIndex(Element* aChild, bool aIsOfType, bool aIsFromEnd,
bool aCheckEdgeOnly);
void Reset();
private:
/**
* Returns true if aSibling and aElement should be considered in the same
* list for nth-index purposes, taking aIsOfType into account.
*/
inline bool SiblingMatchesElement(nsIContent* aSibling, Element* aElement,
bool aIsOfType);
// This node's index for this cache.
// If -2, needs to be computed.
// If -1, needs to be computed but known not to be 1.
// If 0, the node is not at any index in its parent.
typedef int32_t CacheEntry;
class SystemAllocPolicy {
public:
void *malloc_(size_t bytes) { return ::malloc(bytes); }
template <typename T>
T *maybe_pod_calloc(size_t numElems) {
return static_cast<T *>(::calloc(numElems, sizeof(T)));
}
template <typename T>
T *pod_calloc(size_t numElems) {
return maybe_pod_calloc<T>(numElems);
}
void *realloc_(void *p, size_t bytes) { return ::realloc(p, bytes); }
void free_(void *p) { ::free(p); }
void reportAllocOverflow() const {}
bool checkSimulatedOOM() const { return true; }
};
typedef js::HashMap<nsIContent*, CacheEntry, js::DefaultHasher<nsIContent*>,
SystemAllocPolicy> Cache;
/**
* Returns true if aResult has been set to the correct value for aChild and
* no more work needs to be done. Returns false otherwise.
*
* aResult is an inout parameter. The in value is the number of elements
* that are in the half-open range (aSibling, aChild] (so including aChild
* but not including aSibling) that match aChild. The out value is the
* correct index for aChild if this function returns true and the number of
* elements in the closed range [aSibling, aChild] that match aChild
* otherwise.
*/
inline bool IndexDeterminedFromPreviousSibling(nsIContent* aSibling,
Element* aChild,
bool aIsOfType,
bool aIsFromEnd,
const Cache& aCache,
int32_t& aResult);
// Caches of indices for :nth-child(), :nth-last-child(),
// :nth-of-type(), :nth-last-of-type(), keyed by Element*.
//
// The first subscript is 0 for -child and 1 for -of-type, the second
// subscript is 0 for nth- and 1 for nth-last-.
Cache mCaches[2][2];
};
#endif /* nsContentIndexCache_h__ */

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

@ -573,9 +573,6 @@ enum class StyleDisplay : uint8_t {
#define NS_STYLE_FONT_STYLE_OBLIQUE NS_FONT_STYLE_OBLIQUE
// See nsStyleFont
// We should eventually stop using the NS_STYLE_* variants here.
#define NS_STYLE_FONT_WEIGHT_NORMAL NS_FONT_WEIGHT_NORMAL
#define NS_STYLE_FONT_WEIGHT_BOLD NS_FONT_WEIGHT_BOLD
// The constants below appear only in style sheets and not computed style.
#define NS_STYLE_FONT_WEIGHT_BOLDER (-1)
#define NS_STYLE_FONT_WEIGHT_LIGHTER (-2)

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

@ -24,7 +24,7 @@ def get_method(method):
return _target_task_methods[method]
def filter_on_nightly(task, parameters):
def filter_out_nightly(task, parameters):
return not task.attributes.get('nightly') or parameters.get('include_nightly')
@ -34,6 +34,12 @@ def filter_for_project(task, parameters):
return match_run_on_projects(parameters['project'], run_on_projects)
def filter_on_platforms(task, platforms):
"""Filter tasks on the given platform"""
platform = task.attributes.get('build_platform')
return (platform in platforms)
def filter_upload_symbols(task, parameters):
# Filters out symbols when there are not part of a nightly or a release build
# TODO Remove this too specific filter (bug 1353296)
@ -88,7 +94,7 @@ def filter_beta_release_tasks(task, parameters, ignore_kinds=None, allow_l10n=Fa
def standard_filter(task, parameters):
return all(
filter_func(task, parameters) for filter_func in
(filter_on_nightly, filter_for_project, filter_upload_symbols)
(filter_out_nightly, filter_for_project, filter_upload_symbols)
)
@ -249,36 +255,6 @@ def target_tasks_valgrind(full_task_graph, parameters, graph_config):
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
@_target_task('nightly_fennec')
def target_tasks_nightly_fennec(full_task_graph, parameters, graph_config):
"""Select the set of tasks required for a nightly build of fennec. The
nightly build process involves a pipeline of builds, signing,
and, eventually, uploading the tasks to balrog."""
def filter(task):
platform = task.attributes.get('build_platform')
if platform in ('android-aarch64-nightly',
'android-api-16-nightly',
'android-nightly',
'android-x86-nightly',
):
if not task.attributes.get('nightly', False):
return False
return filter_for_project(task, parameters)
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
@_target_task('nightly_linux')
def target_tasks_nightly_linux(full_task_graph, parameters, graph_config):
"""Select the set of tasks required for a nightly build of linux. The
nightly build process involves a pipeline of builds, signing,
and, eventually, uploading the tasks to balrog."""
def filter(task):
platform = task.attributes.get('build_platform')
if platform in ('linux64-nightly', 'linux-nightly'):
return task.attributes.get('nightly', False)
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
@_target_task('mozilla_beta_tasks')
def target_tasks_mozilla_beta(full_task_graph, parameters, graph_config):
"""Select the set of tasks required for a promotable beta or release build
@ -537,16 +513,54 @@ def target_tasks_pine(full_task_graph, parameters, graph_config):
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
@_target_task('nightly_fennec')
def target_tasks_nightly_fennec(full_task_graph, parameters, graph_config):
"""Select the set of tasks required for a nightly build of fennec. The
nightly build process involves a pipeline of builds, signing,
and, eventually, uploading the tasks to balrog."""
def filter(task):
platform = task.attributes.get('build_platform')
if not filter_for_project(task, parameters):
return False
if platform in ('android-aarch64-nightly',
'android-api-16-nightly',
'android-nightly',
'android-x86-nightly',
):
if not task.attributes.get('nightly', False):
return False
return filter_for_project(task, parameters)
filter
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
def make_nightly_filter(platforms):
"""Returns a filter that gets all nightly tasks on the given platform."""
def filter(task, parameters):
return all([
filter_on_platforms(task, platforms),
filter_for_project(task, parameters),
task.attributes.get('nightly', False),
])
return filter
@_target_task('nightly_linux')
def target_tasks_nightly_linux(full_task_graph, parameters, graph_config):
"""Select the set of tasks required for a nightly build of linux. The
nightly build process involves a pipeline of builds, signing,
and, eventually, uploading the tasks to balrog."""
filter = make_nightly_filter({'linux64-nightly', 'linux-nightly'})
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t, parameters)]
@_target_task('nightly_macosx')
def target_tasks_nightly_macosx(full_task_graph, parameters, graph_config):
"""Select the set of tasks required for a nightly build of macosx. The
nightly build process involves a pipeline of builds, signing,
and, eventually, uploading the tasks to balrog."""
def filter(task):
platform = task.attributes.get('build_platform')
if platform in ('macosx64-nightly', ):
return task.attributes.get('nightly', False)
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
filter = make_nightly_filter({'macosx64-nightly'})
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t, parameters)]
@_target_task('nightly_win32')
@ -554,13 +568,8 @@ def target_tasks_nightly_win32(full_task_graph, parameters, graph_config):
"""Select the set of tasks required for a nightly build of win32 and win64.
The nightly build process involves a pipeline of builds, signing,
and, eventually, uploading the tasks to balrog."""
def filter(task):
platform = task.attributes.get('build_platform')
if not filter_for_project(task, parameters):
return False
if platform in ('win32-nightly', ):
return task.attributes.get('nightly', False)
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
filter = make_nightly_filter({'win32-nightly'})
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t, parameters)]
@_target_task('nightly_win64')
@ -568,13 +577,8 @@ def target_tasks_nightly_win64(full_task_graph, parameters, graph_config):
"""Select the set of tasks required for a nightly build of win32 and win64.
The nightly build process involves a pipeline of builds, signing,
and, eventually, uploading the tasks to balrog."""
def filter(task):
platform = task.attributes.get('build_platform')
if not filter_for_project(task, parameters):
return False
if platform in ('win64-nightly', ):
return task.attributes.get('nightly', False)
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
filter = make_nightly_filter({'win64-nightly'})
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t, parameters)]
@_target_task('nightly_desktop')

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

@ -12,12 +12,14 @@ INTEGRATION_PROJECTS = {
'autoland',
}
TRUNK_PROJECTS = INTEGRATION_PROJECTS | {'mozilla-central', }
TRUNK_PROJECTS = INTEGRATION_PROJECTS | {'mozilla-central', 'comm-central'}
RELEASE_PROJECTS = {
'mozilla-central',
'mozilla-beta',
'mozilla-release',
'comm-central',
'comm-beta',
}
RELEASE_PROMOTION_PROJECTS = {

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

@ -6316,11 +6316,11 @@
},
"FX_PREFERENCES_CATEGORY_OPENED_V2": {
"record_in_processes": ["main", "content"],
"bug_numbers": [1335907, 1425173],
"bug_numbers": [1335907, 1425173, 1451006],
"alert_emails": ["jaws@mozilla.com"],
"expires_in_version": "66",
"kind": "categorical",
"labels": ["unknown", "searchresults", "general", "applications", "privacy", "sync", "advanced", "search"],
"labels": ["unknown", "searchresults", "general", "applications", "privacy", "sync", "advanced", "search", "home"],
"releaseChannelCollection": "opt-out",
"description": "Count how often each preference category is opened."
},

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

@ -58,9 +58,7 @@
locale/@AB_CD@/global/notification.dtd (%chrome/global/notification.dtd)
locale/@AB_CD@/global/preferences.dtd (%chrome/global/preferences.dtd)
#ifndef MOZ_FENNEC
#ifndef MOZ_GTK
locale/@AB_CD@/global/printPageSetup.dtd (%chrome/global/printPageSetup.dtd)
#endif
locale/@AB_CD@/global/printPreview.dtd (%chrome/global/printPreview.dtd)
locale/@AB_CD@/global/printPreviewProgress.dtd (%chrome/global/printPreviewProgress.dtd)
locale/@AB_CD@/global/printdialog.properties (%chrome/global/printdialog.properties)