merge autoland to mozilla-central a=merge

This commit is contained in:
Carsten "Tomcat" Book 2016-12-07 11:29:40 +01:00
commit f218e40ad2
19 changed files with 187 additions and 189 deletions

View File

@ -1190,59 +1190,36 @@ RTCPeerConnection.prototype = {
});
},
createDataChannel: function(label, dict) {
createDataChannel: function(label, {
maxRetransmits, ordered, negotiated,
id = 0xFFFF,
maxRetransmitTime,
maxPacketLifeTime = maxRetransmitTime,
protocol,
} = {}) {
this._checkClosed();
if (dict == undefined) {
dict = {};
}
if (dict.maxRetransmitNum != undefined) {
dict.maxRetransmits = dict.maxRetransmitNum;
this.logWarning("Deprecated RTCDataChannelInit dictionary entry maxRetransmitNum used!");
}
if (dict.outOfOrderAllowed != undefined) {
dict.ordered = !dict.outOfOrderAllowed; // the meaning is swapped with
// the name change
this.logWarning("Deprecated RTCDataChannelInit dictionary entry outOfOrderAllowed used!");
}
if (dict.preset != undefined) {
dict.negotiated = dict.preset;
this.logWarning("Deprecated RTCDataChannelInit dictionary entry preset used!");
if (maxRetransmitTime !== undefined) {
this.logWarning("Use maxPacketLifeTime instead of deprecated maxRetransmitTime which will stop working soon in createDataChannel!");
}
if (dict.stream != undefined) {
dict.id = dict.stream;
this.logWarning("Deprecated RTCDataChannelInit dictionary entry stream used!");
}
if (dict.maxRetransmitTime !== null && dict.maxRetransmits !== null) {
if (maxPacketLifeTime !== undefined && maxRetransmits !== undefined) {
throw new this._win.DOMException(
"Both maxRetransmitTime and maxRetransmits cannot be provided",
"Both maxPacketLifeTime and maxRetransmits cannot be provided",
"InvalidParameterError");
}
let protocol;
if (dict.protocol == undefined) {
protocol = "";
} else {
protocol = dict.protocol;
}
// Must determine the type where we still know if entries are undefined.
let type;
if (dict.maxRetransmitTime != undefined) {
if (maxPacketLifeTime) {
type = Ci.IPeerConnection.kDataChannelPartialReliableTimed;
} else if (dict.maxRetransmits != undefined) {
} else if (maxRetransmits) {
type = Ci.IPeerConnection.kDataChannelPartialReliableRexmit;
} else {
type = Ci.IPeerConnection.kDataChannelReliable;
}
// Synchronous since it doesn't block.
let channel = this._impl.createDataChannel(
label, protocol, type, !dict.ordered, dict.maxRetransmitTime,
dict.maxRetransmits, dict.negotiated ? true : false,
dict.id != undefined ? dict.id : 0xFFFF
);
return channel;
return this._impl.createDataChannel(label, protocol, type, ordered,
maxPacketLifeTime, maxRetransmits,
negotiated, id);
}
};

View File

@ -101,7 +101,7 @@ interface PeerConnectionImpl {
/* Data channels */
[Throws]
DataChannel createDataChannel(DOMString label, DOMString protocol,
unsigned short type, boolean outOfOrderAllowed,
unsigned short type, boolean ordered,
unsigned short maxTime, unsigned short maxNum,
boolean externalNegotiated, unsigned short stream);
};

View File

@ -38,18 +38,15 @@ enum RTCIceConnectionState {
};
dictionary RTCDataChannelInit {
boolean ordered = true;
unsigned short? maxRetransmitTime = null;
unsigned short? maxRetransmits = null;
DOMString protocol = "";
boolean negotiated = false; // spec currently says 'true'; we disagree
unsigned short? id = null;
boolean ordered = true;
unsigned short maxPacketLifeTime;
unsigned short maxRetransmits;
DOMString protocol = "";
boolean negotiated = false;
unsigned short id;
// these are deprecated due to renaming in the spec, but still supported for Fx22
boolean outOfOrderAllowed; // now ordered, and the default changes to keep behavior the same
unsigned short maxRetransmitNum; // now maxRetransmits
boolean preset; // now negotiated
unsigned short stream; // now id
// These are deprecated due to renaming in the spec, but still supported for Fx53
unsigned short maxRetransmitTime;
};
dictionary RTCOfferAnswerOptions {

View File

@ -2064,19 +2064,6 @@ BuildTextRunsScanner::BuildTextRunForFrames(void* aTextBuffer)
(mLineContainer->StyleText()->mTextAlign == NS_STYLE_TEXT_ALIGN_JUSTIFY ||
mLineContainer->StyleText()->mTextAlignLast == NS_STYLE_TEXT_ALIGN_JUSTIFY);
// for word-break style
switch (mLineContainer->StyleText()->mWordBreak) {
case NS_STYLE_WORDBREAK_BREAK_ALL:
mLineBreaker.SetWordBreak(nsILineBreaker::kWordBreak_BreakAll);
break;
case NS_STYLE_WORDBREAK_KEEP_ALL:
mLineBreaker.SetWordBreak(nsILineBreaker::kWordBreak_KeepAll);
break;
default:
mLineBreaker.SetWordBreak(nsILineBreaker::kWordBreak_Normal);
break;
}
const nsStyleText* textStyle = nullptr;
const nsStyleFont* fontStyle = nullptr;
nsStyleContext* lastStyleContext = nullptr;
@ -2555,6 +2542,19 @@ void
BuildTextRunsScanner::SetupBreakSinksForTextRun(gfxTextRun* aTextRun,
const void* aTextPtr)
{
// for word-break style
switch (mLineContainer->StyleText()->mWordBreak) {
case NS_STYLE_WORDBREAK_BREAK_ALL:
mLineBreaker.SetWordBreak(nsILineBreaker::kWordBreak_BreakAll);
break;
case NS_STYLE_WORDBREAK_KEEP_ALL:
mLineBreaker.SetWordBreak(nsILineBreaker::kWordBreak_KeepAll);
break;
default:
mLineBreaker.SetWordBreak(nsILineBreaker::kWordBreak_Normal);
break;
}
// textruns have uniform language
const nsStyleFont *styleFont = mMappedFlows[0].mStartFrame->StyleFont();
// We should only use a language for hyphenation if it was specified

View File

@ -122,6 +122,7 @@ HTTP(..) == wordbreak-7a.html wordbreak-7a-ref.html
fails HTTP(..) == wordbreak-7b.html wordbreak-7b-ref.html # bug 479829
== wordbreak-8.html wordbreak-8-ref.html
pref(gfx.font_rendering.graphite.enabled,true) HTTP(..) == wordbreak-9.html wordbreak-9-ref.html
== wordbreak-dynamic-1.html wordbreak-dynamic-1-ref.html
== wordwrap-01.html wordwrap-01-ref.html
HTTP(..) == wordwrap-02.html wordwrap-02-ref.html
fuzzy-if(gtkWidget,1,177) fuzzy-if(skiaContent,1,50) HTTP(..) == wordwrap-03.html wordwrap-03-ref.html # Fuzzy on Linux because the native textbox gradient is painted in a slightly different position depending on the invalid area.

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Reference - word-break: break-all with dynamic change</title>
<style>
div {
font-family: monospace;
width: 3ch;
background: pink;
word-break: break-all;
}
</style>
</head>
<body>
<div>a bcdef</div>
</body>
</html>

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<meta charset="UTF-8">
<title>Test - word-break: break-all with dynamic change</title>
<style>
div {
font-family: monospace;
width: 3ch;
background: pink;
word-break: break-all;
}
</style>
</head>
<body>
<div>a bcdef<div></div></div>
<script>
document.addEventListener("DOMContentLoaded", function() {
document.body.offsetHeight;
document.querySelector('div > div').style.display = 'none';
document.documentElement.classList.remove('reftest-wait');
});
</script>
</body>
</html>

View File

@ -1337,7 +1337,7 @@ already_AddRefed<nsDOMDataChannel>
PeerConnectionImpl::CreateDataChannel(const nsAString& aLabel,
const nsAString& aProtocol,
uint16_t aType,
bool outOfOrderAllowed,
bool ordered,
uint16_t aMaxTime,
uint16_t aMaxNum,
bool aExternalNegotiated,
@ -1346,7 +1346,7 @@ PeerConnectionImpl::CreateDataChannel(const nsAString& aLabel,
{
#if !defined(MOZILLA_EXTERNAL_LINKAGE)
RefPtr<nsDOMDataChannel> result;
rv = CreateDataChannel(aLabel, aProtocol, aType, outOfOrderAllowed,
rv = CreateDataChannel(aLabel, aProtocol, aType, ordered,
aMaxTime, aMaxNum, aExternalNegotiated,
aStream, getter_AddRefs(result));
return result.forget();
@ -1359,7 +1359,7 @@ NS_IMETHODIMP
PeerConnectionImpl::CreateDataChannel(const nsAString& aLabel,
const nsAString& aProtocol,
uint16_t aType,
bool outOfOrderAllowed,
bool ordered,
uint16_t aMaxTime,
uint16_t aMaxNum,
bool aExternalNegotiated,
@ -1380,7 +1380,7 @@ PeerConnectionImpl::CreateDataChannel(const nsAString& aLabel,
}
dataChannel = mDataConnection->Open(
NS_ConvertUTF16toUTF8(aLabel), NS_ConvertUTF16toUTF8(aProtocol), theType,
!outOfOrderAllowed,
ordered,
aType == DataChannelConnection::PARTIAL_RELIABLE_REXMIT ? aMaxNum :
(aType == DataChannelConnection::PARTIAL_RELIABLE_TIMED ? aMaxTime : 0),
nullptr, nullptr, aExternalNegotiated, aStream

View File

@ -196,7 +196,7 @@ public class TelemetryJSONFilePingStore extends TelemetryPingStore {
inputStream = new FileInputStream(file);
} catch (final FileNotFoundException e) {
// permission problem might also cause same exception. To get more debug information.
String fileInfo = String.format("existence: %b, can write: %b, size: %l.",
String fileInfo = String.format("existence: %b, can write: %b, size: %d.",
file.exists(), file.canWrite(), file.length());
String msg = String.format(
"Expected file to exist but got exception in thread: %s. File info - %s",

View File

@ -2,9 +2,7 @@ android-api-15/debug:
description: "Android 4.0 API15+ Debug"
index:
product: mobile
job-name:
buildbot: android-api-15-debug
gecko-v2: android-api-15-debug
job-name: android-api-15-debug
treeherder:
platform: android-4-0-armv7-api15/debug
symbol: tc(B)

View File

@ -26,9 +26,7 @@ linux64/pgo:
description: "Linux64 PGO"
index:
product: firefox
job-name:
buildbot: linux64-pgo
gecko-v2: linux64-pgo
job-name: linux64-pgo
treeherder:
platform: linux64/pgo
symbol: tc(B)
@ -54,9 +52,7 @@ linux64/debug:
description: "Linux64 Debug"
index:
product: firefox
job-name:
buildbot: linux64-debug
gecko-v2: linux64-debug
job-name: linux64-debug
treeherder:
platform: linux64/debug
symbol: tc(B)
@ -131,8 +127,7 @@ linux/pgo:
description: "Linux32 PGO"
index:
product: firefox
job-name:
gecko-v2: linux-pgo
job-name: linux-pgo
treeherder:
platform: linux32/pgo
symbol: tc(B)

View File

@ -2,8 +2,7 @@ win32/debug:
description: "Win32 Debug"
index:
product: firefox
job-name:
gecko-v2: win32-debug
job-name: win32-debug
treeherder:
platform: windows2012-32/debug
symbol: tc(B)
@ -22,8 +21,7 @@ win32/opt:
description: "Win32 Opt"
index:
product: firefox
job-name:
gecko-v2: win32-opt
job-name: win32-opt
treeherder:
platform: windows2012-32/opt
symbol: tc(B)
@ -42,8 +40,7 @@ win32/pgo:
description: "Win32 Opt PGO"
index:
product: firefox
job-name:
gecko-v2: win32-pgo
job-name: win32-pgo
treeherder:
platform: windows2012-32/pgo
symbol: tc(B)
@ -63,8 +60,7 @@ win64/debug:
description: "Win64 Debug"
index:
product: firefox
job-name:
gecko-v2: win64-debug
job-name: win64-debug
treeherder:
platform: windows2012-64/debug
symbol: tc(B)
@ -83,8 +79,7 @@ win64/opt:
description: "Win64 Opt"
index:
product: firefox
job-name:
gecko-v2: win64-opt
job-name: win64-opt
treeherder:
platform: windows2012-64/opt
symbol: tc(B)
@ -103,8 +98,7 @@ win64/pgo:
description: "Win64 Opt PGO"
index:
product: firefox
job-name:
gecko-v2: win64-pgo
job-name: win64-pgo
treeherder:
platform: windows2012-64/pgo
symbol: tc(B)

View File

@ -24,8 +24,7 @@ jobs:
description: "JS Shell Hazard Analysis Linux"
index:
product: firefox
job-name:
gecko-v2: shell-haz-debug
job-name: shell-haz-debug
treeherder:
platform: linux64/debug
symbol: SM-tc(H)
@ -44,8 +43,7 @@ jobs:
description: "Browser Hazard Analysis Linux"
index:
product: firefox
job-name:
gecko-v2: browser-haz-debug
job-name: browser-haz-debug
treeherder:
platform: linux64/debug
symbol: tc(H)

View File

@ -47,8 +47,7 @@ jobs:
linux-l10n/opt:
description: "Localization"
index:
job-name:
gecko-v2: linux32-l10n-opt
job-name: linux32-l10n-opt
treeherder:
platform: linux32/opt
symbol: tc(L10n)
@ -69,8 +68,7 @@ jobs:
linux64-l10n/opt:
description: "Localization"
index:
job-name:
gecko-v2: linux64-l10n-opt
job-name: linux64-l10n-opt
treeherder:
platform: linux64/opt
symbol: tc(L10n)
@ -92,8 +90,7 @@ jobs:
description: "Single Locale Repack"
index:
product: mobile
job-name:
gecko-v2: android-l10n-opt
job-name: android-l10n-opt
treeherder:
platform: android-4-0-armv7-api15/opt
symbol: tc(L10n)

View File

@ -34,9 +34,7 @@ jobs:
sm-package/opt:
description: "Spidermonkey source package and test"
index:
job-name:
buildbot: sm-plain
gecko-v2: sm-package-opt
job-name: sm-package-opt
treeherder:
symbol: SM-tc(pkg)
run:
@ -71,8 +69,7 @@ jobs:
sm-mozjs-sys/debug:
description: "Build js/src as the mozjs_sys Rust crate"
index:
job-name:
gecko-v2: sm-mozjs-sys-debug
job-name: sm-mozjs-sys-debug
treeherder:
symbol: SM-tc(mozjs-crate)
run:
@ -86,9 +83,7 @@ jobs:
sm-plain/debug:
description: "Spidermonkey Plain"
index:
job-name:
buildbot: sm-plain
gecko-v2: sm-plaindebug-debug
job-name: sm-plaindebug-debug
treeherder:
platform: linux64/debug
symbol: SM-tc(p)
@ -107,9 +102,7 @@ jobs:
sm-arm-sim/debug:
description: "Spidermonkey ARM sim"
index:
job-name:
buildbot: sm-plain
gecko-v2: sm-arm-sim-debug
job-name: sm-arm-sim-debug
treeherder:
symbol: SM-tc(arm)
run:
@ -118,9 +111,7 @@ jobs:
sm-arm64-sim/debug:
description: "Spidermonkey ARM64 sim"
index:
job-name:
buildbot: sm-plain
gecko-v2: sm-arm64-sim-debug
job-name: sm-arm64-sim-debug
treeherder:
symbol: SM-tc(arm64)
run:
@ -129,9 +120,7 @@ jobs:
sm-asan/opt:
description: "Spidermonkey Address Sanitizer"
index:
job-name:
buildbot: sm-plain
gecko-v2: sm-asan-opt
job-name: sm-asan-opt
treeherder:
symbol: SM-tc(asan)
run:
@ -141,9 +130,7 @@ jobs:
sm-compacting/debug:
description: "Spidermonkey Compacting"
index:
job-name:
buildbot: sm-plain
gecko-v2: sm-compacting-debug
job-name: sm-compacting-debug
treeherder:
symbol: SM-tc(cgc)
run:
@ -152,9 +139,7 @@ jobs:
sm-msan/opt:
description: "Spidermonkey Memory Sanitizer"
index:
job-name:
buildbot: sm-plain
gecko-v2: sm-msan-opt
job-name: sm-msan-opt
treeherder:
symbol: SM-tc(msan)
run:
@ -164,9 +149,7 @@ jobs:
sm-tsan/opt:
description: "Spidermonkey Thread Sanitizer"
index:
job-name:
buildbot: sm-plain
gecko-v2: sm-tsan-opt
job-name: sm-tsan-opt
treeherder:
symbol: SM-tc(tsan)
tier: 3
@ -178,9 +161,7 @@ jobs:
sm-rootanalysis/debug:
description: "Spidermonkey Root Analysis"
index:
job-name:
buildbot: sm-plain
gecko-v2: sm-rootanalysis-debug
job-name: sm-rootanalysis-debug
treeherder:
symbol: SM-tc(r)
run:
@ -189,9 +170,7 @@ jobs:
sm-nonunified/debug:
description: "Spidermonkey Non-Unified Debug"
index:
job-name:
buildbot: sm-plain
gecko-v2: sm-nonunified-debug
job-name: sm-nonunified-debug
treeherder:
platform: linux64/debug
symbol: SM-tc(nu)

View File

@ -25,12 +25,38 @@ if [[ -z ${MOZHARNESS_URL} ]]; then fail "MOZHARNESS_URL is not set"; fi
if [[ -z ${MOZHARNESS_SCRIPT} ]]; then fail "MOZHARNESS_SCRIPT is not set"; fi
if [[ -z ${MOZHARNESS_CONFIG} ]]; then fail "MOZHARNESS_CONFIG is not set"; fi
# Unzip the mozharness ZIP file created by the build task
if ! curl --fail -o mozharness.zip --retry 10 -L $MOZHARNESS_URL; then
fail "failed to download mozharness zip"
fi
rm -rf mozharness
unzip -q mozharness.zip
# Download mozharness with exponential backoff
# curl already applies exponential backoff, but not for all
# failed cases, apparently, as we keep getting failed downloads
# with 404 code.
download_mozharness() {
local max_attempts=10
local timeout=1
local attempt=0
echo "Downloading mozharness"
while [[ $attempt < $max_attempts ]]; do
if curl --fail -o mozharness.zip --retry 10 -L $MOZHARNESS_URL; then
rm -rf mozharness
if unzip -q mozharness.zip; then
break
else
echo "error unzipping mozharness.zip" >&2
fi
else
echo "failed to download mozharness zip" >&2
fi
echo "Download failed, retrying in $timeout seconds..." >&2
sleep $timeout
timeout=$((timeout*2))
attempt=$((attempt+1))
done
fail "Failed to download and unzip mozharness"
}
download_mozharness
rm mozharness.zip
# For telemetry purposes, the build process wants information about the

View File

@ -69,15 +69,39 @@ cleanup() {
}
trap cleanup EXIT INT
# Download mozharness with exponential backoff
# curl already applies exponential backoff, but not for all
# failed cases, apparently, as we keep getting failed downloads
# with 404 code.
download_mozharness() {
local max_attempts=10
local timeout=1
local attempt=0
echo "Downloading mozharness"
while [[ $attempt < $max_attempts ]]; do
if curl --fail -o mozharness.zip --retry 10 -L $MOZHARNESS_URL; then
rm -rf mozharness
if unzip -q mozharness.zip; then
return 0
fi
echo "error unzipping mozharness.zip" >&2
else
echo "failed to download mozharness zip" >&2
fi
echo "Download failed, retrying in $timeout seconds..." >&2
sleep $timeout
timeout=$((timeout*2))
attempt=$((attempt+1))
done
fail "Failed to download and unzip mozharness"
}
# Download mozharness if we're told to.
if [ ${MOZHARNESS_URL} ]; then
if ! curl --fail -o mozharness.zip --retry 10 -L $MOZHARNESS_URL; then
fail "failed to download mozharness zip"
fi
rm -rf mozharness
if ! unzip -q mozharness.zip; then
fail "error unzipping mozharness.zip"
fi
download_mozharness
rm mozharness.zip
if ! [ -d mozharness ]; then

View File

@ -72,7 +72,7 @@ JOB_NAME_WHITELIST = set([
])
JOB_NAME_WHITELIST_ERROR = """\
The gecko-v2 job name {} is not in the whitelist in __file__.
The gecko-v2 job name {} is not in the whitelist in gecko_v2_whitelist.py.
If this job runs on Buildbot, please ensure that the job names match between
Buildbot and TaskCluster, then add the job name to the whitelist. If this is a
new job, there is nothing to check -- just add the job to the whitelist.

View File

@ -89,20 +89,7 @@ task_description_schema = Schema({
'product': Any('firefox', 'mobile'),
# the names to use for this job in the TaskCluster index
'job-name': Any(
# Assuming the job is named "normally", this is the v2 job name,
# and the v1 and buildbot routes will be determined appropriately.
basestring,
# otherwise, give separate names for each of the legacy index
# routes; if a name is omitted, no corresponding route will be
# created.
{
# the name as it appears in buildbot routes
Optional('buildbot'): basestring,
Required('gecko-v2'): basestring,
}
),
'job-name': basestring,
# The rank that the task will receive in the TaskCluster
# index. A newly completed task supercedes the currently
@ -314,15 +301,10 @@ GROUP_NAMES = {
}
UNKNOWN_GROUP_NAME = "Treeherder group {} has no name; add it to " + __file__
BUILDBOT_ROUTE_TEMPLATES = [
"index.buildbot.branches.{project}.{job-name-buildbot}",
"index.buildbot.revisions.{head_rev}.{project}.{job-name-buildbot}",
]
V2_ROUTE_TEMPLATES = [
"index.gecko.v2.{project}.latest.{product}.{job-name-gecko-v2}",
"index.gecko.v2.{project}.pushdate.{build_date_long}.{product}.{job-name-gecko-v2}",
"index.gecko.v2.{project}.revision.{head_rev}.{product}.{job-name-gecko-v2}",
"index.gecko.v2.{project}.latest.{product}.{job-name}",
"index.gecko.v2.{project}.pushdate.{build_date_long}.{product}.{job-name}",
"index.gecko.v2.{project}.revision.{head_rev}.{product}.{job-name}",
]
# the roots of the treeherder routes, keyed by treeherder environment
@ -521,30 +503,17 @@ def add_index_routes(config, tasks):
continue
job_name = index['job-name']
# unpack the v2 name to v1 and buildbot names
if isinstance(job_name, basestring):
base_name, type_name = job_name.rsplit('-', 1)
job_name = {
'buildbot': base_name,
'gecko-v2': '{}-{}'.format(base_name, type_name),
}
if job_name['gecko-v2'] not in JOB_NAME_WHITELIST:
raise Exception(JOB_NAME_WHITELIST_ERROR.format(job_name['gecko-v2']))
if job_name not in JOB_NAME_WHITELIST:
raise Exception(JOB_NAME_WHITELIST_ERROR.format(job_name))
subs = config.params.copy()
for n in job_name:
subs['job-name-' + n] = job_name[n]
subs['job-name'] = job_name
subs['build_date_long'] = time.strftime("%Y.%m.%d.%Y%m%d%H%M%S",
time.gmtime(config.params['build_date']))
subs['product'] = index['product']
if 'buildbot' in job_name:
for tpl in BUILDBOT_ROUTE_TEMPLATES:
routes.append(tpl.format(**subs))
if 'gecko-v2' in job_name:
for tpl in V2_ROUTE_TEMPLATES:
routes.append(tpl.format(**subs))
for tpl in V2_ROUTE_TEMPLATES:
routes.append(tpl.format(**subs))
# The default behavior is to rank tasks according to their tier
extra_index = task.setdefault('extra', {}).setdefault('index', {})
@ -665,7 +634,7 @@ def check_v2_routes():
for mh, tg in [
('{index}', 'index'),
('{build_product}', '{product}'),
('{build_name}-{build_type}', '{job-name-gecko-v2}'),
('{build_name}-{build_type}', '{job-name}'),
('{year}.{month}.{day}.{pushdate}', '{build_date_long}')]:
routes = [r.replace(mh, tg) for r in routes]