Merge mozilla-central to inbound. a=merge CLOSED TREE

This commit is contained in:
Csoregi Natalia 2018-08-26 00:39:47 +03:00
commit 9f211d76e3
17 changed files with 265 additions and 28 deletions

View file

@ -456,7 +456,7 @@ OptionsPanel.prototype = {
});
}
if (this.target.activeTab) {
if (this.target.activeTab && !this.target.chrome) {
const [ response ] = await this.target.client.attachTab(this.target.activeTab._actor);
this._origJavascriptEnabled = !response.javascriptEnabled;
this.disableJSNode.checked = this._origJavascriptEnabled;

View file

@ -1,5 +1,8 @@
<!DOCTYPE html>
<head>
<style>
legend { padding: 0; }
</style>
<script>
function doTest() {
var l = document.createElement("legend");

View file

@ -6,7 +6,7 @@
<body>
<div>
<legend>The legend</legend>
<legend style="padding: 0">The legend</legend>
The rest of the div.
</div>

View file

@ -169,7 +169,7 @@
<div class="contents c3"><div>3</div></div>
</div>
<span class="c2 b"><legend class="inline c1">Legend</legend><legend class="inline c1">Legend</legend></span>
<span class="c2 b"><span class="inline c1">Legend</span><span class="inline c1">Legend</span></span>
<br clear="all">
<span class="c3">x<div class="inline c1">float:left</div></span>
<span class="c3">y<div class="inline c1">position:absolute</div></span>

View file

@ -14,7 +14,6 @@ legend { border: 1px solid; }
.before::before { content:"::before"; }
.nb legend.static { border: 1px solid; }
.nb legend { border-style:none; }
.p0 legend { padding:0; }
</style>
</head>
<body>
@ -30,11 +29,11 @@ legend { border: 1px solid; }
<fieldset class="test2 after"></fieldset>
<fieldset class="test2"><legend class="static"></legend></fieldset>
<fieldset class="test2"><legend class="static contents"></legend></fieldset>
<fieldset class="test2"><legend class="static" style="padding:0"></legend></fieldset>
<fieldset class="test2 p0"></fieldset>
<fieldset class="test3 p0"></fieldset>
<fieldset class="test2 p0"><legend class="static"></legend></fieldset>
<fieldset class="test3 p0"><legend class="static"></legend></fieldset>
<fieldset class="test2"><legend class="static"></legend></fieldset>
<fieldset class="test2"></fieldset>
<fieldset class="test3"></fieldset>
<fieldset class="test2"><legend class="static"></legend></fieldset>
<fieldset class="test3"><legend class="static"></legend></fieldset>
<script>
document.body.offsetHeight;
var tests = document.querySelectorAll('.test');

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<title>Reference for bug 1483499</title>
<style>
legend, .legendRef {
/* Here in the reference case, we explicitly specify padding, and we also
use a custom-styled div as the reference case for any legend element
that is not directly snapped into a fieldset border. */
background: yellow;
border: 1px solid brown;
padding: 0px 2px;
}
</style>
</head>
<body>
<!-- Test: legend default styling shouldn't be affected
by presence of a display:contents wrapper: -->
<fieldset>
<legend>DisplayContentsWrapper</legend>
</fieldset>
<br>
<!-- Test: legend should get the same 2px of inline-axis padding, even
if it's not inside of a fieldset at all. -->
<div class="legendRef">JustALegend</div>
<br>
<div class="legendRef">
<div class="legendRef">NestedLegend</div>
</div>
<br>
<fieldset>
<legend>
<div class="legendRef">
<div class="legendRef">NestedLegendInFieldset</div>
</div>
</legend>
</fieldset>
</body>
</html>

View file

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<title>Testcase for bug 1483499</title>
<style>
legend {
background: yellow;
border: 1px solid brown;
}
</style>
</head>
<body>
<!-- Test: legend default styling shouldn't be affected
by presence of a display:contents wrapper: -->
<fieldset>
<div style="display: contents">
<legend>DisplayContentsWrapper</legend>
</div>
</fieldset>
<br>
<!-- Test: legend should get the same 2px of inline-axis padding, even
if it's not inside of a fieldset at all. -->
<legend>JustALegend</legend>
<br>
<!-- ...and if it's nested, each nesting level will add 2px of padding. -->
<legend>
<legend>NestedLegend</legend>
</legend>
<br>
<fieldset>
<legend>
<legend>
<legend>NestedLegendInFieldset</legend>
</legend>
</legend>
</fieldset>
</body>
</html>

View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<title>Reference for bug 1483499</title>
<style>
html { writing-mode: vertical-rl }
legend, .legendRef {
/* Here in the reference case, we explicitly specify padding, and we also
use a custom-styled div as the reference case for any legend element
that is not directly snapped into a fieldset border. */
background: yellow;
border: 1px solid brown;
padding: 2px 0px;
}
</style>
</head>
<body>
<!-- Test: legend default styling shouldn't be affected
by presence of a display:contents wrapper: -->
<fieldset>
<legend>DisplayContentsWrapper</legend>
</fieldset>
<br>
<!-- Test: legend should get the same 2px of inline-axis padding, even
if it's not inside of a fieldset at all. -->
<div class="legendRef">JustALegend</div>
<br>
<div class="legendRef">
<div class="legendRef">NestedLegend</div>
</div>
<br>
<fieldset>
<legend>
<div class="legendRef">
<div class="legendRef">NestedLegendInFieldset</div>
</div>
</legend>
</fieldset>
</body>
</html>

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<title>Testcase for bug 1483499</title>
<style>
html { writing-mode: vertical-rl }
legend {
background: yellow;
border: 1px solid brown;
}
</style>
</head>
<body>
<!-- Test: legend default styling shouldn't be affected
by presence of a display:contents wrapper: -->
<fieldset>
<div style="display: contents">
<legend>DisplayContentsWrapper</legend>
</div>
</fieldset>
<br>
<!-- Test: legend should get the same 2px of inline-axis padding, even
if it's not inside of a fieldset at all. -->
<legend>JustALegend</legend>
<br>
<!-- ...and if it's nested, each nesting level will add 2px of padding. -->
<legend>
<legend>NestedLegend</legend>
</legend>
<br>
<fieldset>
<legend>
<legend>
<legend>NestedLegendInFieldset</legend>
</legend>
</legend>
</fieldset>
</body>
</html>

View file

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html><head>
<title>Testcase for bug 740743</title>
<title>Reference case for bug 740743</title>
<style type="text/css">
html,body {
@ -9,8 +9,9 @@
fieldset { padding: 2px; }
legend { padding: 0; }
span { background: lime; display: block;}
legend > span {
span {
background: lime;
display: block;
padding-left: 2px;
padding-right: 2px;
}

View file

@ -1,3 +1,5 @@
== legend.html legend-ref.html
== legend-padding-1.html legend-padding-1-ref.html
== legend-padding-2.html legend-padding-2-ref.html
fuzzy-if(Android,0-255,0-41) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == 1273433.html 1273433-ref.html # Bug 1392106
fails == 1339287.html 1339287-ref.html # bug 1383868

View file

@ -56,13 +56,13 @@
/* miscellaneous form elements */
fieldset > legend {
padding-inline-start: 2px;
padding-inline-end: 2px;
inline-size: -moz-fit-content;
}
legend {
display: block;
padding-inline-start: 2px;
padding-inline-end: 2px;
}
fieldset {

View file

@ -885,6 +885,8 @@ void TransportLayerDtls::Handshake() {
}
TL_SET_STATE(TS_OPEN);
RecordCipherTelemetry();
} else {
int32_t err = PR_GetError();
switch(err) {
@ -1332,4 +1334,65 @@ TransportLayerDtls::RecordHandshakeCompletionTelemetry(
}
}
void
TransportLayerDtls::RecordCipherTelemetry() {
uint16_t cipher;
nsresult rv = GetCipherSuite(&cipher);
if (NS_FAILED(rv)) {
MOZ_MTLOG(ML_ERROR, "Failed to get cipher suite");
return;
}
uint16_t t_cipher = 0;
switch (cipher) {
/* Old DHE ciphers: candidates for removal, see bug 1227519 */
case TLS_DHE_RSA_WITH_AES_128_CBC_SHA:
t_cipher = 1;
break;
case TLS_DHE_RSA_WITH_AES_256_CBC_SHA:
t_cipher = 2;
break;
/* Current ciphers */
case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA:
t_cipher = 3;
break;
case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:
t_cipher = 4;
break;
case TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA:
t_cipher = 5;
break;
case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:
t_cipher = 6;
break;
case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:
t_cipher = 7;
break;
case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:
t_cipher = 8;
break;
case TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256:
t_cipher = 9;
break;
case TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256:
t_cipher = 10;
break;
/* TLS 1.3 ciphers */
case TLS_AES_128_GCM_SHA256:
t_cipher = 11;
break;
case TLS_CHACHA20_POLY1305_SHA256:
t_cipher = 12;
break;
case TLS_AES_256_GCM_SHA384:
t_cipher = 13;
break;
}
Telemetry::Accumulate(Telemetry::WEBRTC_DTLS_CIPHER, t_cipher);
}
} // close namespace

View file

@ -161,6 +161,7 @@ class TransportLayerDtls final : public TransportLayer {
UniqueCERTCertificate& cert) const;
void RecordHandshakeCompletionTelemetry(TransportLayer::State endState);
void RecordCipherTelemetry();
RefPtr<DtlsIdentity> identity_;
// What ALPN identifiers are permitted.

View file

@ -1,16 +1,3 @@
[legend.html]
[in-body: paddingRight]
expected: FAIL
[in-body: paddingLeft]
expected: FAIL
[in-fieldset-second-child: width]
expected: FAIL
[in-fieldset-descendant: paddingRight]
expected: FAIL
[in-fieldset-descendant: paddingLeft]
expected: FAIL

View file

@ -3,4 +3,4 @@
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<title>CSS Test Reference</title>
<fieldset style="color: green">P<legend style="padding: 0">legend</legend>ASS</fieldset>
<fieldset style="color: green">P<legend>legend</legend>ASS</fieldset>

View file

@ -8653,6 +8653,15 @@
"n_buckets": 20,
"description": "The length of time (in milliseconds) it took for a server DTLS handshake to complete, given that it failed."
},
"WEBRTC_DTLS_CIPHER": {
"record_in_processes": ["content"],
"alert_emails": ["webrtc-dtls-telemetry-alerts@mozilla.com", "nohlmeier@mozilla.com"],
"bug_numbers": [1484024],
"expires_in_version": "66",
"kind": "enumerated",
"n_values": 14,
"description": "The DTLS cipher (as integer) negotiated for a RTCPeerConnection. See TransportLayerDtls::RecordCipherTelemetry for the meaning of the values"
},
"WEBRTC_ICE_FINAL_CONNECTION_STATE": {
"record_in_processes": ["main", "content"],
"alert_emails": ["webrtc-ice-telemetry-alerts@mozilla.com, nohlmeier@mozilla.com"],