mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Merge mozilla-central to autoland. a=merge CLOSED TREE
This commit is contained in:
commit
7af32578dd
@ -274,7 +274,7 @@ select[size="1"] {
|
||||
background-color: -moz-Combobox;
|
||||
color: -moz-ComboboxText;
|
||||
vertical-align: baseline;
|
||||
padding: 0;
|
||||
padding: unset;
|
||||
-moz-appearance: menulist;
|
||||
}
|
||||
|
||||
@ -331,9 +331,9 @@ select:empty {
|
||||
padding-block-end: 1px;
|
||||
padding-inline-start: 4px;
|
||||
padding-inline-end: 0;
|
||||
color: inherit;
|
||||
color: unset;
|
||||
white-space: nowrap;
|
||||
text-align: inherit;
|
||||
text-align: unset;
|
||||
-moz-user-select: none;
|
||||
/* Make sure to size correctly if the combobox has a non-auto block-size. */
|
||||
block-size: 100% ! important;
|
||||
@ -380,7 +380,7 @@ optgroup {
|
||||
line-height: normal !important;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
font-size: inherit;
|
||||
font-size: unset;
|
||||
-moz-user-select: none;
|
||||
text-indent: 0;
|
||||
white-space: nowrap !important;
|
||||
@ -432,7 +432,7 @@ select:disabled:disabled /* Need the pseudo-class twice to have the specificity
|
||||
{
|
||||
color: GrayText;
|
||||
background-color: ThreeDLightShadow;
|
||||
cursor: inherit;
|
||||
cursor: unset;
|
||||
}
|
||||
|
||||
input:disabled,
|
||||
@ -449,7 +449,7 @@ optgroup:disabled {
|
||||
input[type="hidden"] {
|
||||
-moz-appearance: none;
|
||||
display: none !important;
|
||||
padding: 0;
|
||||
padding: unset;
|
||||
border: 0;
|
||||
cursor: auto;
|
||||
-moz-user-focus: ignore;
|
||||
@ -459,7 +459,7 @@ input[type="hidden"] {
|
||||
/* image buttons */
|
||||
input[type="image"] {
|
||||
-moz-appearance: none;
|
||||
padding: 0;
|
||||
padding: unset;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
font-family: sans-serif;
|
||||
@ -469,7 +469,7 @@ input[type="image"] {
|
||||
}
|
||||
|
||||
input[type="image"]:disabled {
|
||||
cursor: inherit;
|
||||
cursor: unset;
|
||||
}
|
||||
|
||||
input[type="image"]:-moz-focusring {
|
||||
@ -483,7 +483,7 @@ input[type="file"] {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
overflow-clip-box: padding-box;
|
||||
color: inherit;
|
||||
color: unset;
|
||||
|
||||
/* Revert rules which apply on all inputs. */
|
||||
-moz-appearance: none;
|
||||
@ -492,7 +492,7 @@ input[type="file"] {
|
||||
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
padding: unset;
|
||||
}
|
||||
|
||||
input[type="file"] > xul|label {
|
||||
@ -500,9 +500,9 @@ input[type="file"] > xul|label {
|
||||
padding-inline-start: 5px;
|
||||
text-align: match-parent;
|
||||
|
||||
color: inherit;
|
||||
font-size: inherit;
|
||||
letter-spacing: inherit;
|
||||
color: unset;
|
||||
font-size: unset;
|
||||
letter-spacing: unset;
|
||||
|
||||
/*
|
||||
* Force the text to have LTR directionality. Otherwise filenames containing
|
||||
@ -514,9 +514,9 @@ input[type="file"] > xul|label {
|
||||
/* button part of file selector */
|
||||
input[type="file"] > button[type="button"] {
|
||||
block-size: inherit;
|
||||
font-size: inherit;
|
||||
letter-spacing: inherit;
|
||||
cursor: inherit;
|
||||
font-size: unset;
|
||||
letter-spacing: unset;
|
||||
cursor: unset;
|
||||
}
|
||||
|
||||
/* colored part of the color selector button */
|
||||
@ -582,7 +582,7 @@ input[type="checkbox"]:disabled,
|
||||
input[type="checkbox"]:disabled:active,
|
||||
input[type="checkbox"]:disabled:hover,
|
||||
input[type="checkbox"]:disabled:hover:active {
|
||||
cursor: inherit;
|
||||
cursor: unset;
|
||||
}
|
||||
|
||||
% On Mac, the native theme takes care of this.
|
||||
@ -649,7 +649,7 @@ input[type="color"] {
|
||||
|
||||
button {
|
||||
/* Buttons should lay out like "normal" html, mostly */
|
||||
white-space: inherit;
|
||||
white-space: unset;
|
||||
text-indent: 0;
|
||||
/* But no text-decoration reaching inside, by default */
|
||||
display: inline-block;
|
||||
@ -767,7 +767,7 @@ input[type="submit"]:disabled {
|
||||
padding-block-end: 0px;
|
||||
padding-inline-start: 8px;
|
||||
border: 2px outset ThreeDLightShadow;
|
||||
cursor: inherit;
|
||||
cursor: unset;
|
||||
}
|
||||
|
||||
button:disabled:active, button:disabled,
|
||||
@ -1058,12 +1058,12 @@ input[type=number]::-moz-number-text {
|
||||
* above. We want to inherit its value from its <input type=number>
|
||||
* ancestor, not have that general CSS rule reset it.
|
||||
*/
|
||||
text-align: inherit;
|
||||
text-align: unset;
|
||||
text-decoration: inherit;
|
||||
ime-mode: inherit;
|
||||
flex: 1;
|
||||
min-inline-size: 0;
|
||||
padding: 0;
|
||||
padding: unset;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
@ -472,7 +472,7 @@ table > tr {
|
||||
td {
|
||||
display: table-cell;
|
||||
vertical-align: inherit;
|
||||
text-align: inherit;
|
||||
text-align: unset;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
@ -729,7 +729,7 @@ area {
|
||||
iframe:fullscreen {
|
||||
/* iframes in full-screen mode don't show a border. */
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
padding: unset !important;
|
||||
}
|
||||
|
||||
/* media elements */
|
||||
@ -899,7 +899,7 @@ rtc:lang(zh-TW), rt:lang(zh-TW) {
|
||||
-moz-min-font-size-ratio: 30%;
|
||||
}
|
||||
rtc > rt {
|
||||
font-size: inherit;
|
||||
font-size: unset;
|
||||
}
|
||||
ruby, rb, rt, rtc {
|
||||
unicode-bidi: isolate;
|
||||
|
@ -22,7 +22,7 @@ li ul, li ol, li dir, li menu {
|
||||
ol ul, ol ol, ol dir, ol menu, ol li,
|
||||
dir ul, dir ol, dir dir, dir menu, dir li,
|
||||
menu ul, menu ol, menu dir, menu menu, menu li {
|
||||
list-style-position: inherit;
|
||||
list-style-position: unset;
|
||||
}
|
||||
|
||||
|
||||
|
@ -5224,11 +5224,14 @@ SVGTextFrame::DoGlyphPositioning()
|
||||
SVGTextContentElement* element = static_cast<SVGTextContentElement*>(GetContent());
|
||||
nsSVGLength2* textLengthAttr =
|
||||
element->GetAnimatedLength(nsGkAtoms::textLength);
|
||||
uint16_t lengthAdjust =
|
||||
element->EnumAttributes()[SVGTextContentElement::LENGTHADJUST].GetAnimValue();
|
||||
bool adjustingTextLength = textLengthAttr->IsExplicitlySet();
|
||||
float expectedTextLength = textLengthAttr->GetAnimValue(element);
|
||||
|
||||
if (adjustingTextLength && expectedTextLength < 0.0f) {
|
||||
// If textLength="" is less than zero, ignore it.
|
||||
if (adjustingTextLength &&
|
||||
(expectedTextLength < 0.0f || lengthAdjust == LENGTHADJUST_UNKNOWN)) {
|
||||
// If textLength="" is less than zero or lengthAdjust is unknown, ignore it.
|
||||
adjustingTextLength = false;
|
||||
}
|
||||
|
||||
@ -5277,8 +5280,6 @@ SVGTextFrame::DoGlyphPositioning()
|
||||
float actualTextLength =
|
||||
static_cast<float>(presContext->AppUnitsToGfxUnits(frameLength) * factor);
|
||||
|
||||
uint16_t lengthAdjust =
|
||||
element->EnumAttributes()[SVGTextContentElement::LENGTHADJUST].GetAnimValue();
|
||||
switch (lengthAdjust) {
|
||||
case LENGTHADJUST_SPACINGANDGLYPHS:
|
||||
// Scale the glyphs and their positions.
|
||||
|
2
layout/svg/crashtests/1474982.html
Normal file
2
layout/svg/crashtests/1474982.html
Normal file
@ -0,0 +1,2 @@
|
||||
<svg>
|
||||
<text lengthAdjust="" textLength="0">A</text>
|
After Width: | Height: | Size: 52 B |
@ -209,6 +209,7 @@ pref(dom.webcomponents.shadowdom.enabled,true) load 1421807-2.html
|
||||
load 1422226.html
|
||||
load 1443092.html
|
||||
load 1467552-1.html
|
||||
load 1474982.html
|
||||
load conditional-outer-svg-nondirty-reflow-assert.xhtml
|
||||
load extref-test-1.xhtml
|
||||
load blob-merging-and-retained-display-list.html
|
||||
|
@ -1 +1 @@
|
||||
fe738aae0bcc
|
||||
2c85f81f9b5e
|
||||
|
@ -10,3 +10,4 @@
|
||||
*/
|
||||
|
||||
#error "Do not include this header file."
|
||||
|
||||
|
79
security/nss/gtests/pk11_gtest/pk11_cipherop_unittest.cc
Normal file
79
security/nss/gtests/pk11_gtest/pk11_cipherop_unittest.cc
Normal file
@ -0,0 +1,79 @@
|
||||
// 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/.
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include <prinit.h>
|
||||
#include <nss.h>
|
||||
#include <pk11pub.h>
|
||||
|
||||
static const size_t kKeyLen = 128/8;
|
||||
|
||||
namespace nss_test {
|
||||
|
||||
//
|
||||
// The ciper tests using the bltest command cover a great deal of testing.
|
||||
// However, Bug 1489691 revealed a corner case which is covered here.
|
||||
// This test will make multiple calls to PK11_CipherOp using the same
|
||||
// cipher context with data that is not cipher block aligned.
|
||||
//
|
||||
|
||||
static SECStatus GetBytes(PK11Context *ctx, uint8_t *bytes, size_t len)
|
||||
{
|
||||
std::vector<uint8_t> in(len, 0);
|
||||
|
||||
int outlen;
|
||||
SECStatus rv = PK11_CipherOp(ctx, bytes, &outlen, len, &in[0], len);
|
||||
if (static_cast<size_t>(outlen) != len) {
|
||||
return SECFailure;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
TEST(Pkcs11CipherOp, SingleCtxMultipleUnalignedCipherOps) {
|
||||
PK11SlotInfo* slot;
|
||||
PK11SymKey* key;
|
||||
PK11Context* ctx;
|
||||
|
||||
NSSInitContext* globalctx = NSS_InitContext("", "", "", "", NULL,
|
||||
NSS_INIT_READONLY | NSS_INIT_NOCERTDB | NSS_INIT_NOMODDB |
|
||||
NSS_INIT_FORCEOPEN | NSS_INIT_NOROOTINIT);
|
||||
|
||||
const CK_MECHANISM_TYPE cipher = CKM_AES_CTR;
|
||||
|
||||
slot = PK11_GetInternalSlot();
|
||||
ASSERT_TRUE(slot);
|
||||
|
||||
// Use arbitrary bytes for the AES key
|
||||
uint8_t key_bytes[kKeyLen];
|
||||
for (size_t i = 0; i < kKeyLen; i++) {
|
||||
key_bytes[i] = i;
|
||||
}
|
||||
|
||||
SECItem keyItem = { siBuffer, key_bytes, kKeyLen };
|
||||
|
||||
// The IV can be all zeros since we only encrypt once with
|
||||
// each AES key.
|
||||
CK_AES_CTR_PARAMS param = { 128, {} };
|
||||
SECItem paramItem = { siBuffer, reinterpret_cast<unsigned char*>(¶m), sizeof(CK_AES_CTR_PARAMS) };
|
||||
|
||||
key = PK11_ImportSymKey(slot, cipher, PK11_OriginUnwrap,
|
||||
CKA_ENCRYPT, &keyItem, NULL);
|
||||
ctx = PK11_CreateContextBySymKey(cipher, CKA_ENCRYPT, key, ¶mItem);
|
||||
ASSERT_TRUE(key);
|
||||
ASSERT_TRUE(ctx);
|
||||
|
||||
uint8_t outbuf[128];
|
||||
ASSERT_EQ(GetBytes(ctx, outbuf, 7), SECSuccess);
|
||||
ASSERT_EQ(GetBytes(ctx, outbuf, 17), SECSuccess);
|
||||
|
||||
PK11_FreeSymKey(key);
|
||||
PK11_FreeSlot(slot);
|
||||
PK11_DestroyContext(ctx, PR_TRUE);
|
||||
NSS_ShutdownContext(globalctx);
|
||||
}
|
||||
|
||||
} // namespace nss_test
|
@ -14,6 +14,7 @@
|
||||
'pk11_aeskeywrap_unittest.cc',
|
||||
'pk11_aes_gcm_unittest.cc',
|
||||
'pk11_chacha20poly1305_unittest.cc',
|
||||
'pk11_cipherop_unittest.cc',
|
||||
'pk11_curve25519_unittest.cc',
|
||||
'pk11_ecdsa_unittest.cc',
|
||||
'pk11_encrypt_derive_unittest.cc',
|
||||
|
@ -219,15 +219,18 @@ CTR_Update_HW_AES(CTRContext *ctr, unsigned char *outbuf,
|
||||
PORT_Assert(ctr->bufPtr == blocksize);
|
||||
}
|
||||
|
||||
intel_aes_ctr_worker(((AESContext *)(ctr->context))->Nr)(
|
||||
ctr, outbuf, outlen, maxout, inbuf, inlen, blocksize);
|
||||
/* XXX intel_aes_ctr_worker should set *outlen. */
|
||||
PORT_Assert(*outlen == 0);
|
||||
fullblocks = (inlen / blocksize) * blocksize;
|
||||
*outlen += fullblocks;
|
||||
outbuf += fullblocks;
|
||||
inbuf += fullblocks;
|
||||
inlen -= fullblocks;
|
||||
if (inlen >= blocksize) {
|
||||
rv = intel_aes_ctr_worker(((AESContext *)(ctr->context))->Nr)(
|
||||
ctr, outbuf, outlen, maxout, inbuf, inlen, blocksize);
|
||||
if (rv != SECSuccess) {
|
||||
return SECFailure;
|
||||
}
|
||||
fullblocks = (inlen / blocksize) * blocksize;
|
||||
*outlen += fullblocks;
|
||||
outbuf += fullblocks;
|
||||
inbuf += fullblocks;
|
||||
inlen -= fullblocks;
|
||||
}
|
||||
|
||||
if (inlen == 0) {
|
||||
return SECSuccess;
|
||||
|
Loading…
Reference in New Issue
Block a user