Merge mozilla-central to autoland

--HG--
extra : rebase_source : 49e66077615cbb44d6e1e7d4e873f8654f20d9d0
This commit is contained in:
Dorel Luca 2018-03-06 20:42:47 +02:00
commit 3347027658
40 changed files with 35040 additions and 59474 deletions

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<blocklist lastupdate="1519826648080" xmlns="http://www.mozilla.org/2006/addons-blocklist">
<blocklist lastupdate="1520338780397" xmlns="http://www.mozilla.org/2006/addons-blocklist">
<emItems>
<emItem blockID="i334" id="{0F827075-B026-42F3-885D-98981EE7B1AE}">
<prefs/>
@ -2215,6 +2215,10 @@
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="0cd723fe-d33d-43a0-b84f-7a3cad253212" id="{42baa93e-0cff-4289-b79e-6ae88df668c4}">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
</emItems>
<pluginItems>
<pluginItem blockID="p332">

View File

@ -219,11 +219,21 @@ ReadPrincipalInfo(JSStructuredCloneReader* aReader,
return false;
}
#ifdef FUZZING
if (originNoSuffix.IsEmpty()) {
return false;
}
#endif
MOZ_DIAGNOSTIC_ASSERT(!originNoSuffix.IsEmpty());
aInfo = ContentPrincipalInfo(attrs, originNoSuffix, spec);
} else {
#ifdef FUZZING
return false;
#else
MOZ_CRASH("unexpected principal structured clone tag");
#endif
}
return true;

View File

@ -1,13 +1,13 @@
This is the debugger.html project output.
See https://github.com/devtools-html/debugger.html
Version 19.1
Version 19.2
Comparison: https://github.com/devtools-html/debugger.html/compare/release-19...release-19-1
Comparison: https://github.com/devtools-html/debugger.html/compare/release-19-1...release-19-2
Packages:
- babel-plugin-transform-es2015-modules-commonjs @6.26.0
- babel-preset-react @6.24.1
- react @15.6.2
- react-dom @15.6.2
- webpack @3.10.0
- react @16.2.0
- react-dom @16.2.0
- webpack @3.11.0

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -78,20 +78,20 @@ return /******/ (function(modules) { // webpackBootstrap
/***/ 1282:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(1630);
module.exports = __webpack_require__(3586);
/***/ }),
/***/ 1363:
/***/ 3204:
/***/ (function(module, exports, __webpack_require__) {
/* 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/. */
const networkRequest = __webpack_require__(1367);
const workerUtils = __webpack_require__(1368);
const networkRequest = __webpack_require__(3212);
const workerUtils = __webpack_require__(3213);
module.exports = {
networkRequest,
@ -100,7 +100,7 @@ module.exports = {
/***/ }),
/***/ 1367:
/***/ 3212:
/***/ (function(module, exports) {
/* This Source Code Form is subject to the terms of the Mozilla Public
@ -122,7 +122,7 @@ module.exports = networkRequest;
/***/ }),
/***/ 1368:
/***/ 3213:
/***/ (function(module, exports) {
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
@ -261,7 +261,7 @@ module.exports = {
/***/ }),
/***/ 1630:
/***/ 3586:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -271,7 +271,7 @@ var _prettyFast = __webpack_require__(802);
var _prettyFast2 = _interopRequireDefault(_prettyFast);
var _devtoolsUtils = __webpack_require__(1363);
var _devtoolsUtils = __webpack_require__(3204);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

View File

@ -267,20 +267,95 @@ module.exports = arrayMap;
/***/ 1284:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(1631);
module.exports = __webpack_require__(3587);
/***/ }),
/***/ 1363:
/***/ 14:
/***/ (function(module, exports) {
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return value != null && typeof value == 'object';
}
module.exports = isObjectLike;
/***/ }),
/***/ 259:
/***/ (function(module, exports, __webpack_require__) {
var toString = __webpack_require__(108);
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
reHasRegExpChar = RegExp(reRegExpChar.source);
/**
* Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
* "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to escape.
* @returns {string} Returns the escaped string.
* @example
*
* _.escapeRegExp('[lodash](https://lodash.com/)');
* // => '\[lodash\]\(https://lodash\.com/\)'
*/
function escapeRegExp(string) {
string = toString(string);
return (string && reHasRegExpChar.test(string))
? string.replace(reRegExpChar, '\\$&')
: string;
}
module.exports = escapeRegExp;
/***/ }),
/***/ 3204:
/***/ (function(module, exports, __webpack_require__) {
/* 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/. */
const networkRequest = __webpack_require__(1367);
const workerUtils = __webpack_require__(1368);
const networkRequest = __webpack_require__(3212);
const workerUtils = __webpack_require__(3213);
module.exports = {
networkRequest,
@ -289,7 +364,36 @@ module.exports = {
/***/ }),
/***/ 1367:
/***/ 3208:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var g;
// This works in non-strict mode
g = function () {
return this;
}();
try {
// This works if eval is allowed (see CSP)
g = g || Function("return this")() || (1, eval)("this");
} catch (e) {
// This works if the window reference is available
if (typeof window === "object") g = window;
}
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module.exports = g;
/***/ }),
/***/ 3212:
/***/ (function(module, exports) {
/* This Source Code Form is subject to the terms of the Mozilla Public
@ -311,7 +415,7 @@ module.exports = networkRequest;
/***/ }),
/***/ 1368:
/***/ 3213:
/***/ (function(module, exports) {
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
@ -450,43 +554,7 @@ module.exports = {
/***/ }),
/***/ 14:
/***/ (function(module, exports) {
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return value != null && typeof value == 'object';
}
module.exports = isObjectLike;
/***/ }),
/***/ 1402:
/***/ 3258:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -568,19 +636,19 @@ function buildQuery(originalQuery, modifiers, { isGlobal = false, ignoreSpaces =
/***/ }),
/***/ 1631:
/***/ 3587:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _getMatches = __webpack_require__(1632);
var _getMatches = __webpack_require__(3588);
var _getMatches2 = _interopRequireDefault(_getMatches);
var _projectSearch = __webpack_require__(1633);
var _projectSearch = __webpack_require__(3589);
var _devtoolsUtils = __webpack_require__(1363);
var _devtoolsUtils = __webpack_require__(3204);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@ -592,7 +660,7 @@ self.onmessage = workerHandler({ getMatches: _getMatches2.default, findSourceMat
/***/ }),
/***/ 1632:
/***/ 3588:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -603,7 +671,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = getMatches;
var _buildQuery = __webpack_require__(1402);
var _buildQuery = __webpack_require__(3258);
var _buildQuery2 = _interopRequireDefault(_buildQuery);
@ -632,7 +700,7 @@ function getMatches(query, text, modifiers) {
/***/ }),
/***/ 1633:
/***/ 3589:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -678,45 +746,6 @@ function findSourceMatches(source, queryText) {
return matches;
}
/***/ }),
/***/ 259:
/***/ (function(module, exports, __webpack_require__) {
var toString = __webpack_require__(108);
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
reHasRegExpChar = RegExp(reRegExpChar.source);
/**
* Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
* "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to escape.
* @returns {string} Returns the escaped string.
* @example
*
* _.escapeRegExp('[lodash](https://lodash.com/)');
* // => '\[lodash\]\(https://lodash\.com/\)'
*/
function escapeRegExp(string) {
string = toString(string);
return (string && reHasRegExpChar.test(string))
? string.replace(reRegExpChar, '\\$&')
: string;
}
module.exports = escapeRegExp;
/***/ }),
/***/ 6:
@ -834,34 +863,6 @@ function isSymbol(value) {
module.exports = isSymbol;
/***/ }),
/***/ 792:
/***/ (function(module, exports) {
var g;
// This works in non-strict mode
g = (function() {
return this;
})();
try {
// This works if eval is allowed (see CSP)
g = g || Function("return this")() || (1,eval)("this");
} catch(e) {
// This works if the window reference is available
if(typeof window === "object")
g = window;
}
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module.exports = g;
/***/ }),
/***/ 8:
@ -888,7 +889,7 @@ var freeGlobal = typeof global == 'object' && global && global.Object === Object
module.exports = freeGlobal;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(792)))
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3208)))
/***/ })

View File

@ -1760,10 +1760,12 @@ Element::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
if (!hadParent) {
uint32_t editableDescendantChange = EditableInclusiveDescendantCount(this);
if (editableDescendantChange != 0) {
// If we are binding a subtree root to the document, we need to update
// the editable descendant count of all the ancestors.
// If we are binding a subtree root to the document, we need to update
// the editable descendant count of all the ancestors.
// But we don't cross Shadow DOM boundary.
// (The expected behavior with Shadow DOM is unclear)
nsIContent* parent = GetParent();
while (parent) {
while (parent && parent->IsElement()) {
parent->ChangeEditableDescendantCount(editableDescendantChange);
parent = parent->GetParent();
}

View File

@ -907,10 +907,11 @@ CompareToRangeStart(nsINode* aCompareNode, int32_t aCompareOffset,
{
nsINode* start = aRange->GetStartContainer();
NS_ENSURE_STATE(aCompareNode && start);
// If the nodes that we're comparing are not in the same document,
// assume that aCompareNode will fall at the end of the ranges.
// If the nodes that we're comparing are not in the same document or in the
// same subtree, assume that aCompareNode will fall at the end of the ranges.
if (aCompareNode->GetComposedDoc() != start->GetComposedDoc() ||
!start->GetComposedDoc()) {
!start->GetComposedDoc() ||
aCompareNode->SubtreeRoot() != start->SubtreeRoot()) {
*aCmp = 1;
} else {
*aCmp = nsContentUtils::ComparePoints(aCompareNode, aCompareOffset,
@ -925,10 +926,11 @@ CompareToRangeEnd(nsINode* aCompareNode, int32_t aCompareOffset,
{
nsINode* end = aRange->GetEndContainer();
NS_ENSURE_STATE(aCompareNode && end);
// If the nodes that we're comparing are not in the same document,
// assume that aCompareNode will fall at the end of the ranges.
// If the nodes that we're comparing are not in the same document or in the
// same subtree, assume that aCompareNode will fall at the end of the ranges.
if (aCompareNode->GetComposedDoc() != end->GetComposedDoc() ||
!end->GetComposedDoc()) {
!end->GetComposedDoc() ||
aCompareNode->SubtreeRoot() != end->SubtreeRoot()) {
*aCmp = 1;
} else {
*aCmp = nsContentUtils::ComparePoints(aCompareNode, aCompareOffset,

View File

@ -134,6 +134,11 @@ StructuredCloneBlob::ReadStructuredCloneInternal(JSContext* aCx, JSStructuredClo
return false;
}
if (blobCount) {
#ifdef FUZZING
if (blobOffset >= aHolder->BlobImpls().Length()) {
return false;
}
#endif
BlobImpls().AppendElements(&aHolder->BlobImpls()[blobOffset], blobCount);
}

View File

@ -508,6 +508,11 @@ ReadBlob(JSContext* aCx,
StructuredCloneHolder* aHolder)
{
MOZ_ASSERT(aHolder);
#ifdef FUZZING
if (aIndex >= aHolder->BlobImpls().Length()) {
return nullptr;
}
#endif
MOZ_ASSERT(aIndex < aHolder->BlobImpls().Length());
RefPtr<BlobImpl> blobImpl = aHolder->BlobImpls()[aIndex];
@ -583,7 +588,9 @@ ReadDirectoryInternal(JSStructuredCloneReader* aReader,
MOZ_ASSERT(aHolder);
nsAutoString path;
path.SetLength(aPathLength);
if (NS_WARN_IF(!path.SetLength(aPathLength, fallible))) {
return nullptr;
}
size_t charSize = sizeof(nsString::char_type);
if (!JS_ReadBytes(aReader, (void*) path.BeginWriting(),
aPathLength * charSize)) {
@ -657,6 +664,11 @@ ReadFileList(JSContext* aCx,
// |aCount| is the number of BlobImpls to use from the |index|.
for (uint32_t i = 0; i < aCount; ++i) {
uint32_t pos = index + i;
#ifdef FUZZING
if (pos >= aHolder->BlobImpls().Length()) {
return nullptr;
}
#endif
MOZ_ASSERT(pos < aHolder->BlobImpls().Length());
RefPtr<BlobImpl> blobImpl = aHolder->BlobImpls()[pos];
@ -742,6 +754,11 @@ ReadFormData(JSContext* aCx,
}
if (tag == SCTAG_DOM_BLOB) {
#ifdef FUZZING
if (indexOrLengthOfString >= aHolder->BlobImpls().Length()) {
return nullptr;
}
#endif
MOZ_ASSERT(indexOrLengthOfString < aHolder->BlobImpls().Length());
RefPtr<BlobImpl> blobImpl =
@ -772,7 +789,9 @@ ReadFormData(JSContext* aCx,
MOZ_ASSERT(tag == 0);
nsAutoString value;
value.SetLength(indexOrLengthOfString);
if (NS_WARN_IF(!value.SetLength(indexOrLengthOfString, fallible))) {
return nullptr;
}
size_t charSize = sizeof(nsString::char_type);
if (!JS_ReadBytes(aReader, (void*) value.BeginWriting(),
indexOrLengthOfString * charSize)) {
@ -883,9 +902,14 @@ ReadWasmModule(JSContext* aCx,
StructuredCloneHolder* aHolder)
{
MOZ_ASSERT(aHolder);
MOZ_ASSERT(aIndex < aHolder->WasmModules().Length());
MOZ_ASSERT(aHolder->CloneScope() == StructuredCloneHolder::StructuredCloneScope::SameProcessSameThread ||
aHolder->CloneScope() == StructuredCloneHolder::StructuredCloneScope::SameProcessDifferentThread);
#ifdef FUZZING
if (aIndex >= aHolder->WasmModules().Length()) {
return nullptr;
}
#endif
MOZ_ASSERT(aIndex < aHolder->WasmModules().Length());
return aHolder->WasmModules()[aIndex]->createObject(aCx);
}
@ -917,6 +941,11 @@ ReadInputStream(JSContext* aCx,
StructuredCloneHolder* aHolder)
{
MOZ_ASSERT(aHolder);
#ifdef FUZZING
if (aIndex >= aHolder->InputStreams().Length()) {
return nullptr;
}
#endif
MOZ_ASSERT(aIndex < aHolder->InputStreams().Length());
nsCOMPtr<nsIInputStream> inputStream = aHolder->InputStreams()[aIndex];
@ -1097,6 +1126,11 @@ StructuredCloneHolder::CustomReadTransferHandler(JSContext* aCx,
MOZ_ASSERT(mSupportsTransferring);
if (aTag == SCTAG_DOM_MAP_MESSAGEPORT) {
#ifdef FUZZING
if (aExtraData >= mPortIdentifiers.Length()) {
return false;
}
#endif
MOZ_ASSERT(aExtraData < mPortIdentifiers.Length());
const MessagePortIdentifier& portIdentifier = mPortIdentifiers[aExtraData];
@ -1243,6 +1277,11 @@ StructuredCloneHolder::CustomFreeTransferHandler(uint32_t aTag,
if (aTag == SCTAG_DOM_MAP_MESSAGEPORT) {
MOZ_ASSERT(!aContent);
#ifdef FUZZING
if (aExtraData >= mPortIdentifiers.Length()) {
return;
}
#endif
MOZ_ASSERT(aExtraData < mPortIdentifiers.Length());
MessagePort::ForceClose(mPortIdentifiers[aExtraData]);
return;

View File

@ -283,6 +283,17 @@ nsINode* nsINode::GetRootNode(const GetRootNodeOptions& aOptions)
return SubtreeRoot();
}
nsINode*
nsINode::GetParentOrHostNode() const
{
if (mParent) {
return mParent;
}
const ShadowRoot* shadowRoot = ShadowRoot::FromNode(this);
return shadowRoot ? shadowRoot->GetHost() : nullptr;
}
nsINode*
nsINode::SubtreeRoot() const
{

View File

@ -1013,6 +1013,12 @@ public:
return mParent;
}
/**
* This is similar to above, but in case 'this' is ShadowRoot, we return its
* host element.
*/
nsINode* GetParentOrHostNode() const;
enum FlattenedParentType { eNotForStyle, eForStyle };
/**

View File

@ -1498,6 +1498,11 @@ ImageBitmap::ReadStructuredClone(JSContext* aCx,
// while destructors are running.
JS::Rooted<JS::Value> value(aCx);
{
#ifdef FUZZING
if (aIndex >= aClonedSurfaces.Length()) {
return nullptr;
}
#endif
RefPtr<layers::Image> img = CreateImageFromSurface(aClonedSurfaces[aIndex]);
RefPtr<ImageBitmap> imageBitmap = new ImageBitmap(aParent, img, alphaType);

View File

@ -133,7 +133,9 @@ ReadString(JSStructuredCloneReader* aReader, nsString& aString)
return false;
}
aString.SetLength(nameLength);
if (NS_WARN_IF(!aString.SetLength(nameLength, fallible))) {
return false;
}
size_t charSize = sizeof(nsString::char_type);
read = JS_ReadBytes(aReader, (void*) aString.BeginWriting(), nameLength * charSize);
if (!read) {

View File

@ -408,7 +408,7 @@ nsGenericHTMLElement::IntrinsicState() const
uint32_t
nsGenericHTMLElement::EditableInclusiveDescendantCount()
{
bool isEditable = IsInUncomposedDoc() && HasFlag(NODE_IS_EDITABLE) &&
bool isEditable = IsInComposedDoc() && HasFlag(NODE_IS_EDITABLE) &&
GetContentEditableValue() == eTrue;
return EditableDescendantCount() + isEditable;
}
@ -429,12 +429,14 @@ nsGenericHTMLElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
aDocument->
AddToNameTable(this, GetParsedAttr(nsGkAtoms::name)->GetAtomValue());
}
}
if (HasFlag(NODE_IS_EDITABLE) && GetContentEditableValue() == eTrue) {
nsCOMPtr<nsIHTMLDocument> htmlDocument = do_QueryInterface(aDocument);
if (htmlDocument) {
htmlDocument->ChangeContentEditableCount(this, +1);
}
if (HasFlag(NODE_IS_EDITABLE) && GetContentEditableValue() == eTrue &&
IsInComposedDoc()) {
nsCOMPtr<nsIHTMLDocument> htmlDocument =
do_QueryInterface(GetComposedDoc());
if (htmlDocument) {
htmlDocument->ChangeContentEditableCount(this, +1);
}
}
@ -459,8 +461,7 @@ nsGenericHTMLElement::UnbindFromTree(bool aDeep, bool aNullParent)
RemoveFromNameTable();
if (GetContentEditableValue() == eTrue) {
//XXXsmaug Fix this for Shadow DOM, bug 1066965.
nsCOMPtr<nsIHTMLDocument> htmlDocument = do_QueryInterface(GetUncomposedDoc());
nsCOMPtr<nsIHTMLDocument> htmlDocument = do_QueryInterface(GetComposedDoc());
if (htmlDocument) {
htmlDocument->ChangeContentEditableCount(this, -1);
}
@ -2737,8 +2738,7 @@ MakeContentDescendantsEditable(nsIContent *aContent, nsIDocument *aDocument)
void
nsGenericHTMLElement::ChangeEditableState(int32_t aChange)
{
//XXXsmaug Fix this for Shadow DOM, bug 1066965.
nsIDocument* document = GetUncomposedDoc();
nsIDocument* document = GetComposedDoc();
if (!document) {
return;
}
@ -2751,7 +2751,8 @@ nsGenericHTMLElement::ChangeEditableState(int32_t aChange)
}
nsIContent* parent = GetParent();
while (parent) {
// Don't update across Shadow DOM boundary.
while (parent && parent->IsElement()) {
parent->ChangeEditableDescendantCount(aChange);
parent = parent->GetParent();
}

View File

@ -506,7 +506,9 @@ ReadString(JSStructuredCloneReader* aReader, nsString& aString)
return false;
}
MOZ_ASSERT(zero == 0);
aString.SetLength(nameLength);
if (NS_WARN_IF(!aString.SetLength(nameLength, fallible))) {
return false;
}
size_t charSize = sizeof(nsString::char_type);
read = JS_ReadBytes(aReader, (void*) aString.BeginWriting(),
nameLength * charSize);

View File

@ -454,7 +454,7 @@ EditorBase::GetDesiredSpellCheckState()
// Some of the page content might be editable and some not, if spellcheck=
// is explicitly set anywhere, so if there's anything editable on the page,
// return true and let the spellchecker figure it out.
nsCOMPtr<nsIHTMLDocument> doc = do_QueryInterface(content->GetUncomposedDoc());
nsCOMPtr<nsIHTMLDocument> doc = do_QueryInterface(content->GetComposedDoc());
return doc && doc->IsEditingOn();
}

View File

@ -1090,7 +1090,7 @@ EditorEventListener::Focus(InternalFocusEvent* aFocusEvent)
return NS_OK;
}
nsIDOMEventTarget* target = aFocusEvent->GetDOMEventTarget();
nsIDOMEventTarget* target = aFocusEvent->GetOriginalDOMEventTarget();
nsCOMPtr<nsINode> node = do_QueryInterface(target);
NS_ENSURE_TRUE(node, NS_ERROR_UNEXPECTED);
@ -1102,13 +1102,15 @@ EditorEventListener::Focus(InternalFocusEvent* aFocusEvent)
}
if (node->IsContent()) {
nsIContent* content =
node->AsContent()->FindFirstNonChromeOnlyAccessContent();
// XXX If the focus event target is a form control in contenteditable
// element, perhaps, the parent HTML editor should do nothing by this
// handler. However, FindSelectionRoot() returns the root element of the
// contenteditable editor. So, the editableRoot value is invalid for
// the plain text editor, and it will be set to the wrong limiter of
// the selection. However, fortunately, actual bugs are not found yet.
nsCOMPtr<nsIContent> editableRoot = editorBase->FindSelectionRoot(node);
nsCOMPtr<nsIContent> editableRoot = editorBase->FindSelectionRoot(content);
// make sure that the element is really focused in case an earlier
// listener in the chain changed the focus.

View File

@ -8743,8 +8743,9 @@ HTMLEditRules::ConfirmSelectionInBody()
nsINode* temp = selNode;
// check that selNode is inside body
//XXXsmaug this code is insane.
while (temp && !temp->IsHTMLElement(nsGkAtoms::body)) {
temp = temp->GetParentNode();
temp = temp->GetParentOrHostNode();
}
// if we aren't in the body, force the issue
@ -8762,8 +8763,9 @@ HTMLEditRules::ConfirmSelectionInBody()
temp = selNode;
// check that selNode is inside body
//XXXsmaug this code is insane.
while (temp && !temp->IsHTMLElement(nsGkAtoms::body)) {
temp = temp->GetParentNode();
temp = temp->GetParentOrHostNode();
}
// if we aren't in the body, force the issue

View File

@ -381,13 +381,14 @@ HTMLEditor::FindSelectionRoot(nsINode* aNode)
aNode->IsContent(),
"aNode must be content or document node");
nsCOMPtr<nsIDocument> doc = aNode->GetUncomposedDoc();
nsCOMPtr<nsIDocument> doc = aNode->GetComposedDoc();
if (!doc) {
return nullptr;
}
nsCOMPtr<nsIContent> content;
if (doc->HasFlag(NODE_IS_EDITABLE) || !aNode->IsContent()) {
if (aNode->IsInUncomposedDoc() &&
(doc->HasFlag(NODE_IS_EDITABLE) || !aNode->IsContent())) {
content = doc->GetRootElement();
return content.forget();
}
@ -4891,7 +4892,11 @@ HTMLEditor::IsAcceptableInputEvent(WidgetGUIEvent* aGUIEvent)
return true;
}
nsCOMPtr<nsIDOMEventTarget> target = aGUIEvent->GetDOMEventTarget();
nsCOMPtr<nsIDOMEventTarget> target = aGUIEvent->GetOriginalDOMEventTarget();
nsCOMPtr<nsIContent> content = do_QueryInterface(target);
if (content) {
target = content->FindFirstNonChromeOnlyAccessContent();
}
NS_ENSURE_TRUE(target, false);
nsCOMPtr<nsIDocument> document = GetDocument();

View File

@ -762,7 +762,7 @@ EditorSpellCheck::UpdateCurrentDictionary(
RefPtr<DictionaryFetcher> fetcher =
new DictionaryFetcher(this, aCallback, mDictionaryFetcherGroup);
rootContent->GetLang(fetcher->mRootContentLang);
nsCOMPtr<nsIDocument> doc = rootContent->GetUncomposedDoc();
nsCOMPtr<nsIDocument> doc = rootContent->GetComposedDoc();
NS_ENSURE_STATE(doc);
doc->GetContentLanguage(fetcher->mRootDocContentLang);

View File

@ -1398,8 +1398,9 @@ nsresult mozInlineSpellChecker::DoSpellCheck(mozInlineSpellWordUtil& aWordUtil,
// Now check that we're still looking at a range that's under
// aWordUtil.GetRootNode()
nsINode* rootNode = aWordUtil.GetRootNode();
if (!nsContentUtils::ContentIsDescendantOf(beginNode, rootNode) ||
!nsContentUtils::ContentIsDescendantOf(endNode, rootNode)) {
if (!beginNode->IsInComposedDoc() || !endNode->IsInComposedDoc() ||
!nsContentUtils::ContentIsShadowIncludingDescendantOf(beginNode, rootNode) ||
!nsContentUtils::ContentIsShadowIncludingDescendantOf(endNode, rootNode)) {
// Just bail out and don't try to spell-check this
return NS_OK;
}

View File

@ -80,7 +80,7 @@ LiveSavedFrameCache::trace(JSTracer* trc)
}
bool
LiveSavedFrameCache::insert(JSContext* cx, FramePtr& framePtr, jsbytecode* pc,
LiveSavedFrameCache::insert(JSContext* cx, FramePtr& framePtr, const jsbytecode* pc,
HandleSavedFrame savedFrame)
{
MOZ_ASSERT(initialized());
@ -111,7 +111,7 @@ LiveSavedFrameCache::find(JSContext* cx, FrameIter& frameIter, MutableHandleSave
MOZ_ASSERT(maybeFramePtr.isSome());
FramePtr framePtr(*maybeFramePtr);
jsbytecode* pc = frameIter.pc();
const jsbytecode* pc = frameIter.pc();
size_t numberStillValid = 0;
frame.set(nullptr);

View File

@ -1175,11 +1175,11 @@ class LiveSavedFrameCache
private:
struct Entry
{
FramePtr framePtr;
jsbytecode* pc;
const FramePtr framePtr;
const jsbytecode* pc;
HeapPtr<SavedFrame*> savedFrame;
Entry(FramePtr& framePtr, jsbytecode* pc, SavedFrame* savedFrame)
Entry(const FramePtr& framePtr, const jsbytecode* pc, SavedFrame* savedFrame)
: framePtr(framePtr)
, pc(pc)
, savedFrame(savedFrame)
@ -1223,7 +1223,8 @@ class LiveSavedFrameCache
void trace(JSTracer* trc);
void find(JSContext* cx, FrameIter& frameIter, MutableHandleSavedFrame frame) const;
bool insert(JSContext* cx, FramePtr& framePtr, jsbytecode* pc, HandleSavedFrame savedFrame);
bool insert(JSContext* cx, FramePtr& framePtr, const jsbytecode* pc,
HandleSavedFrame savedFrame);
};
static_assert(sizeof(LiveSavedFrameCache) == sizeof(uintptr_t),

View File

@ -1163,4 +1163,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
static const int32_t kUnknownId = -1;
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1528661207354000);
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1528817024300000);

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
/*****************************************************************************/
#include <stdint.h>
const PRTime gPreloadListExpirationTime = INT64_C(1531080394244000);
const PRTime gPreloadListExpirationTime = INT64_C(1531236210688000);
%%
0-1.party, 1
0.me.uk, 1
@ -213,7 +213,6 @@ const PRTime gPreloadListExpirationTime = INT64_C(1531080394244000);
19216811.online, 1
192168ll.repair, 1
1921958389.rsc.cdn77.org, 1
1972969867.rsc.cdn77.org, 1
1981612088.rsc.cdn77.org, 1
19hundert84.de, 1
1a-diamantscheiben.de, 1
@ -233,6 +232,7 @@ const PRTime gPreloadListExpirationTime = INT64_C(1531080394244000);
1kando.com, 0
1km.ro, 1
1kmi.co, 1
1ll.uk, 1
1morebounce.co.uk, 1
1nfr.com, 0
1nian.vip, 1
@ -633,7 +633,6 @@ a-allard.be, 1
a-classinflatables.co.uk, 1
a-intel.com, 1
a-ix.net, 1
a-little-linux-box.at, 1
a-oben.org, 1
a-starbouncycastles.co.uk, 1
a1798.com, 1
@ -934,6 +933,7 @@ ada.gov, 1
adalis.org, 1
adam-kostecki.de, 1
adam-wilson.me, 1
adamas-magicus.ru, 1
adambalogh.net, 1
adambyers.com, 1
adamcoffee.net, 1
@ -1560,6 +1560,7 @@ allinone-ranking150.com, 1
allinonecyprus.com, 1
allis.studio, 1
alljamin.com, 1
allkindzabeats.com, 1
allladyboys.com, 1
allmebel.ru, 1
allmend-ru.de, 1
@ -1580,7 +1581,6 @@ allstarpartyinflatables.co.uk, 1
allstorebrasil.com.br, 1
allsync.com, 1
allsync.nl, 1
alltheducks.com, 1
allthethings.co.nz, 1
allthings.me, 1
allthingsblogging.com, 1
@ -1938,6 +1938,7 @@ anekdotes.com, 0
anendlesssupply.co.uk, 1
anetaben.nl, 1
anextraordinaryday.net, 1
anfenglish.com, 1
ange-de-bonheur444.com, 1
angel-body.com, 1
angelic47.com, 1
@ -2283,7 +2284,6 @@ aquarium-supplement.net, 1
aquaron.com, 1
aquaselect.eu, 1
aquatechnologygroup.com, 1
aquaundine.net, 1
aquavitaedayspa.com.au, 1
aquila.co.uk, 1
aquilaguild.com, 0
@ -3130,7 +3130,6 @@ babarkata.com, 1
babeleo.com, 1
babelfisch.eu, 1
babettelandmesser.de, 1
babursahvizeofisi.com, 1
baby-digne.com, 1
babyboom.pl, 1
babycamapp.com, 1
@ -3586,7 +3585,6 @@ befundonline.de, 1
begabungsfoerderung.info, 1
begbie.com, 1
beginner.nl, 1
beginwp.top, 1
behamzdarma.cz, 1
behoerden-online-dienste.de, 1
beichtgenerator.de, 0
@ -5363,7 +5361,6 @@ c16t.uk, 1
c2design.it, 1
c2o-library.net, 1
c2o2.xyz, 1
c3ie.com, 1
c3vo.de, 1
c3w.at, 1
c4.hk, 1
@ -5408,7 +5405,6 @@ cafechesscourt.com, 1
cafefresco.pe, 1
cafelandia.net, 1
cafeobscura.nl, 1
caferagazzi.de, 1
cafesg.net, 1
caffeinatedcode.com, 1
cainhosting.com, 0
@ -5653,6 +5649,7 @@ carloshmm.stream, 1
carlosjeurissen.com, 1
carlovanwyk.com, 1
carlsbouncycastlesandhottubs.co.uk, 1
carlscatering.com, 1
carnaticalifornia.com, 1
carnet-du-voyageur.com, 1
carnildo.com, 1
@ -6476,7 +6473,7 @@ cirugiasplasticas.com.mx, 1
cirujanooral.com, 1
cirurgicagervasio.com.br, 1
cirurgicalucena.com.br, 1
ciscodude.net, 1
ciscodude.net, 0
cisoaid.com, 1
ciss.ltd, 1
cisy.me, 1
@ -6536,7 +6533,6 @@ claimconnect.com, 1
claimconnect.us, 1
claimnote.com, 1
clairegold.com, 1
claireidrac.fr, 1
clairescastles.co.uk, 1
clanebouncycastles.com, 1
clanrose.org.uk, 1
@ -6622,7 +6618,6 @@ clinicadam.com, 1
clinicadelogopedia.net, 1
clinicalrehabilitation.info, 1
clinicaltrials.gov, 1
clinicasilos.com, 1
clinicminds.com, 1
cliniko.com, 1
cliniquevethuy.be, 1
@ -7163,6 +7158,7 @@ constructionjobs.com, 1
constructive.men, 1
consul.io, 1
consultcelerity.com, 1
consultorcr.net, 1
consultpetkov.com, 1
consumer.gov, 1
consumeractionlawgroup.com, 1
@ -7194,7 +7190,6 @@ controltickets.com.br, 1
contxt-agentur.de, 1
conv2pdf.com, 1
conve.eu, 1
convergemagazine.com, 1
convergence.fi, 1
convergencela.com, 1
convergnce.com, 1
@ -7257,7 +7252,6 @@ core-concepts.de, 1
core-networks.de, 1
core.org.pt, 0
coreapm.com, 1
coreapm.org, 1
corecdn.org, 1
corecodec.com, 1
coredump.gr, 1
@ -7674,7 +7668,6 @@ ctomp.io, 1
ctpe.net, 1
ctrld.me, 1
ctyi.me, 1
cu247secure.ie, 1
cub-bouncingcastles.co.uk, 1
cube-cloud.com, 1
cube.de, 1
@ -7714,6 +7707,7 @@ cunha.be, 1
cuni-cuni-club.com, 1
cuni-rec.com, 1
cuoc.org.uk, 1
cuongthach.com, 1
cuonic.com, 1
cup.al, 1
cupcake.io, 1
@ -8280,7 +8274,7 @@ dcpower.eu, 1
dcrdev.com, 1
dd.art.pl, 1
ddel.de, 1
dden.ca, 0
dden.ca, 1
dden.website, 1
dden.xyz, 1
ddepot.us, 0
@ -8615,6 +8609,7 @@ dethemium.com, 1
dethikiemtra.com, 1
detoxetmoi.com, 1
detoxsinutritie.ro, 1
detroit-english.de, 1
detroitstylepizza.com, 1
detroitzoo.org, 1
detskysad.com, 1
@ -8695,7 +8690,6 @@ devzero.io, 1
dewaard.de, 1
dewalch.net, 1
dewapress.com, 1
dewebwerf.nl, 1
dewinter.com, 1
dexalo.de, 1
dezeregio.nl, 1
@ -8923,7 +8917,6 @@ dipulse.it, 1
dir2epub.com, 1
dir2epub.org, 1
direct-sel.com, 1
direct2uk.com, 1
directebanking.com, 1
directinsure.in, 1
directlinkfunding.co.uk, 1
@ -9003,7 +8996,6 @@ dist.torproject.org, 0
distiduffer.org, 1
distinctivephotography.com.au, 1
distinguishedprisoner.com, 1
distinguishedwindows.co.uk, 1
distribuidoracristal.com.br, 1
distribuidorveterinario.es, 1
distrilogservices.com, 1
@ -9852,6 +9844,7 @@ ec-current.com, 1
ecco-verde.com, 0
eccoviasolutions.com, 1
eccux.com, 1
ecdn.cz, 1
ecelembrou.ovh, 1
ecfnorte.com.br, 1
echatta.net, 1
@ -10283,7 +10276,6 @@ elwave.org, 1
elwix.com, 1
elxsi.de, 1
elyasweb.com, 1
elyisus.info, 1
elysiria.fr, 1
elytronsecurity.com, 1
em-biotek.cz, 1
@ -10500,6 +10492,7 @@ enveloppenopmaat.nl, 1
envescent.com, 1
enviam.de, 1
enviatufoto.com, 1
enviaya.com.mx, 1
environment.ai, 1
environmentkirklees.org, 1
enviroprobasements.com, 1
@ -10917,6 +10910,7 @@ eternal-warriors.de, 1
eternalabyss.int.eu.org, 1
eternalsymbols.com, 1
eternit.roma.it, 1
eth-faucet.net, 1
eth0.nl, 1
etha.nz, 1
ethack.org, 1
@ -11141,7 +11135,6 @@ exclusivebouncycastles.co.uk, 1
exdamo.de, 1
exe-boss.tech, 1
exebouncycastles.co.uk, 1
exehack.net, 1
exeintel.com, 1
exekutori.com, 1
exembit.com, 1
@ -11175,7 +11168,6 @@ explodie.org, 1
explodingcamera.com, 1
exploflex.com.br, 1
exploit-db.com, 1
exploit.cz, 0
exploit.party, 1
exploit.ph, 1
exploited.cz, 1
@ -11536,7 +11528,6 @@ featuredmen.com, 0
feb.gov, 1
fecik.sk, 1
fed51.com, 1
fedemo.top, 1
federalinvestments.gov, 1
federaljobs.gov, 1
federalreserve.gov, 1
@ -12143,7 +12134,6 @@ forfunssake.co.uk, 1
forge-goerger.eu, 1
forglemmigej.net, 1
forgotten-legends.org, 1
forlagetmarx.dk, 1
formadmin.com, 1
formaliteo.com, 1
forman.store, 1
@ -12727,8 +12717,11 @@ gaitrehabilitation.com, 1
gaitresearch.com, 1
gajas18.com, 1
gakkainavi-epsilon.jp, 1
gakkainavi-epsilon.net, 1
gakkainavi.jp, 1
gakkainavi.net, 1
gakkainavi4.jp, 1
gakkainavi4.net, 1
gaku-architect.com, 1
gala.kiev.ua, 0
galactic-crew.org, 1
@ -12848,6 +12841,7 @@ gashalot.com, 1
gasnews.net, 1
gastauftritt.net, 1
gastoudererenda.nl, 1
gatapro.net, 0
gate2home.com, 1
gateaucreation.fr, 1
gatemoves.com, 1
@ -13135,7 +13129,7 @@ getnikola.com, 1
geto.ml, 1
getoutofdebt.org, 1
getpagespeed.com, 1
getpublii.com, 0
getpublii.com, 1
getpuck.com, 1
getrambling.com, 1
getresilience.org, 1
@ -13336,6 +13330,7 @@ glenshere.com, 1
glidingshop.cz, 1
glidingshop.de, 1
glidingshop.eu, 1
glittersjabloon.nl, 1
glloq.org, 1
glob-coin.com, 1
global-lights.ma, 1
@ -13733,6 +13728,7 @@ greve.xyz, 1
grexx.co.uk, 1
grexx.de, 1
grey.house, 1
greybit.net, 1
greyhash.se, 1
greysky.me, 1
greyskymedia.com, 1
@ -14579,7 +14575,6 @@ hexxagon.com, 1
heycms.com, 0
heyfringe.com, 1
heyjournal.com, 1
hf-tekst.nl, 1
hf51.nl, 1
hfbg.nl, 1
hfi.me, 0
@ -15295,7 +15290,6 @@ i1314.gdn, 1
i1place.com, 1
i28s.com, 1
i2b.ro, 1
i496.eu, 1
i4m1k0su.com, 1
i5y.co.uk, 1
i5y.org, 1
@ -16789,7 +16783,6 @@ jelmer.co.uk, 1
jelmer.uk, 1
jemangeducheval.com, 1
jembatankarir.com, 1
jemoticons.com, 1
jena.space, 1
jennedebleser.com, 0
jenniferchan.id.au, 1
@ -16813,7 +16806,6 @@ jeremycantu.com, 1
jeremycrews.com, 1
jeremyness.com, 1
jeremytcd.com, 1
jermann.biz, 1
jerodslay.com, 0
jeroendeneef.com, 1
jeroenensanne.wedding, 1
@ -17346,7 +17338,6 @@ justzz.xyz, 1
juszkiewicz.com.pl, 1
jutlander-netbank.dk, 1
jutlander.dk, 1
juul.xyz, 1
juventusclublugano.ch, 1
juventusmania1897.com, 1
juwelierstoopman.nl, 1
@ -17558,7 +17549,6 @@ kasadara.com, 1
kasei.im, 1
kashis.com.au, 1
kashmirobserver.net, 1
kasilag.me, 0
kasko.io, 1
kasnoffskinclinic.com, 1
kassa.at, 1
@ -17675,7 +17665,6 @@ kekgame.com, 1
kekku.li, 1
keksi.io, 1
kekz.org, 1
kela.jp, 1
keldan.fo, 1
kelgtermans-usedcars.be, 1
kellyandantony.com, 1
@ -18175,6 +18164,7 @@ konventseliten.se, 1
konyalian.com, 1
konzertheld.de, 1
koodimasin.ee, 1
koolikatsed.ee, 1
koop-bremen.de, 1
kooponline.eu, 1
koot.nl, 1
@ -18331,6 +18321,7 @@ kry.se, 1
kryglik.com, 1
krypsys.com, 1
krypt.com, 1
kryptera.se, 1
kryptomodkingz.com, 1
kryx.de, 1
ks-watch.de, 1
@ -18629,7 +18620,6 @@ lanroamer.de, 1
lansechensilu.com, 1
lanseyujie.com, 0
lanternalauth.com, 1
lanternhealth.org, 1
lantian.pub, 1
lanturtle.com, 1
lanuovariviera.it, 1
@ -19341,7 +19331,6 @@ lionlyrics.com, 1
lionsdeal.com, 1
lipartydepot.com, 1
lipex.com, 1
lipo.lol, 1
lipoabaltimore.org, 1
liqd.net, 1
liquid.cz, 1
@ -19517,7 +19506,7 @@ locationvoituresuede.com, 1
locatorplus.gov, 1
locauxrama.fr, 1
locchat.com, 1
locker.email, 1
locker.email, 0
locker3.com, 1
lockify.com, 1
lockpick.nl, 1
@ -20384,7 +20373,6 @@ markllego.com, 1
marko-fenster24.de, 1
markoh.co.uk, 1
markom.rs, 1
markow.io, 1
markprof.ru, 1
markrego.com, 1
markri.nl, 0
@ -20493,7 +20481,6 @@ master-net.org, 1
mastercardpac.com, 1
masterdemolitioninc.com, 1
masterdigitale.com, 1
masterhelenaroma.com, 1
masterofallscience.com, 1
masterpc.co.uk, 1
masterplc.com, 1
@ -20809,6 +20796,7 @@ medicinia.com.br, 1
medicinskavranje.edu.rs, 1
medicocompetente.it, 1
medicoresponde.com.br, 1
medifab.online, 1
medifi.com, 1
medinside.ch, 1
medinside.li, 1
@ -20882,7 +20870,6 @@ mehr-schulferien.de, 1
mehrleben.at, 1
mehrwert.de, 1
meierhofer.net, 1
meiju.video, 1
meikan.moe, 1
meillard-auto-ecole.ch, 1
meilleur.info, 1
@ -21119,7 +21106,6 @@ micasamgmt.com, 0
micbase.com, 1
michael-rigart.be, 1
michael-schefczyk.de, 1
michael-schilling.de, 1
michael-steinhauer.eu, 1
michaelasawyer.com, 1
michaelcullen.name, 1
@ -21878,7 +21864,7 @@ mplusm.eu, 1
mpn.poker, 1
mpnpokertour.com, 1
mpodraza.pl, 1
mpreserver.com, 1
mpreserver.com, 0
mprsco.eu, 1
mpserver12.org, 1
mpsgarage.com.au, 1
@ -21898,7 +21884,6 @@ mrca-sharp.com, 1
mrcoolevents.com, 1
mrd.ninja, 1
mrdayman.com, 1
mrdleisure.co.uk, 1
mremallin.ca, 1
mrevolution.eu, 1
mrhc.ru, 1
@ -22204,7 +22189,6 @@ mydevolo.com, 1
mydevolo.de, 1
mydigitalweek.com, 1
mydjsongbook.com, 1
mydmdi.com, 1
mydna.bio, 1
mydocserve.com, 1
mydreamlifelab.com, 1
@ -22689,7 +22673,7 @@ neartothesky.com, 1
neatous.cz, 1
neatous.net, 1
neave.tv, 1
neba.io, 0
neba.io, 1
nebelhauch.de, 1
nebelheim.de, 1
nebra.io, 1
@ -23140,6 +23124,7 @@ ninetaillabs.com, 1
ninetaillabs.xyz, 1
ninfora.com, 1
ning.so, 1
ninja-galerie.de, 1
ninofink.com, 1
ninov.de, 1
ninreiei.jp, 1
@ -23610,7 +23595,6 @@ octanio.com, 1
octav.name, 0
octo.im, 1
octod.tk, 1
octofox.de, 1
octohedralpvp.tk, 1
octohost.net, 1
octolopagon.games, 1
@ -23981,7 +23965,6 @@ openrainbow.net, 1
openrainbow.org, 1
openrealestate.co, 1
openresty.com, 1
openrtv.com, 1
opensource-cms.nl, 1
opensource-training.de, 1
openspa.webhop.info, 1
@ -26749,7 +26732,6 @@ really.io, 1
reallyreally.io, 1
realmofespionage.xyz, 1
realnewhomes.com, 1
realraghavgupta.com, 1
realum.com, 1
realum.de, 1
realum.eu, 1
@ -27083,11 +27065,9 @@ responer.com, 1
responsibledisclosure.nl, 0
respostas.com.br, 1
ressl.ch, 1
restaurant-mangal.ch, 1
restaurant-oregano.de, 1
restaurant-rosengarten.at, 1
restaurantesimonetti.com.br, 1
restaurantmangal.ch, 1
restauranttester.at, 1
rester-a-domicile.ch, 1
rester-autonome-chez-soi.ch, 1
@ -27463,6 +27443,7 @@ roksolana.be, 1
rokudenashi.de, 1
roland.io, 1
rolandkolodziej.com, 1
rolandreed.cn, 1
rolandszabo.com, 1
roleplayhome.com, 1
roligprylar.se, 1
@ -27532,7 +27513,6 @@ rosbass.ru, 1
rose-prism.org, 1
rosehosting.reviews, 1
roseitsolutions.co.uk, 1
roseitsolutions.uk, 1
roseliere.ch, 1
roseliere.com, 1
roseluna.com, 1
@ -27585,7 +27565,6 @@ rowlog.com, 1
rows.io, 1
roxiesbouncycastlehire.co.uk, 1
roxtri.cz, 1
royal-mangal.ch, 1
royal-rangers.de, 1
royalacademy.org.uk, 1
royalbluewa3.cc, 1
@ -27656,7 +27635,6 @@ rtfpessoa.xyz, 1
rtho.me, 1
rtrinflatables.co.uk, 1
rtsr.ch, 1
rtvi.com, 1
rtwcourse.com, 1
rtzoeller.com, 1
ru-sprachstudio.ch, 1
@ -28462,6 +28440,7 @@ seattleprivacy.org, 1
seattlewalkinbathtubs.com, 1
seb-mgl.de, 1
sebascelis.com, 1
sebastiaandouma.co.uk, 1
sebastiaandouma.com, 1
sebastian-janich.de, 1
sebastian-kraus.me, 1
@ -29017,8 +28996,6 @@ shirt2go.shop, 1
shirtsofholland.com, 1
shiseki.top, 1
shishamania.de, 1
shishkin.link, 1
shishkin.us, 1
shishlik.net, 1
shitagi-shop.com, 1
shitbeast.institute, 1
@ -29047,7 +29024,6 @@ shopcoupons.co.id, 1
shopcoupons.my, 1
shopcoupons.ph, 1
shopcoupons.sg, 1
shopdopastor.com.br, 1
shopifycloud.com, 1
shopkini.com, 1
shoplandia.co, 1
@ -29376,7 +29352,6 @@ sinquin.eu, 1
sinsojb.me, 1
sint-joris.nl, 1
sinterama.biz, 1
sintesysglobal.com, 1
sinuelovirtual.com.br, 1
sion.moe, 1
sipsik.net, 1
@ -29794,6 +29769,7 @@ social-events.net, 0
social-media-strategies.it, 1
socialdevelop.biz, 0
socialdj.de, 1
socialhams.net, 1
socialmedia.ro, 1
socialnitro.com, 1
socialnous.co, 1
@ -30090,6 +30066,7 @@ speechndraw.com, 1
speeddate.it, 0
speedof.me, 1
speedracer.ca, 1
speeds.vip, 1
speedsportofhull.co.uk, 1
speedtailors.com, 1
speedtest-russia.com, 1
@ -30172,7 +30149,6 @@ spornkuller.de, 1
sport-in-sundern.de, 1
sport-potreby.cz, 1
sport-potreby.sk, 1
sport-socken.net, 1
sport247.bet, 1
sporter.com, 1
sportflash.info, 1
@ -30243,6 +30219,7 @@ squareonebgc.com.ph, 1
squareup.com, 0
squawk.cc, 1
squeezemetrics.com, 1
squido.ch, 1
squidparty.com, 1
squids.space, 1
squirex2.com, 1
@ -30407,6 +30384,7 @@ starttraffic.uk, 1
startup.melbourne, 1
startupgenius.org, 1
startuplevel.com, 1
startuppeople.co.uk, 1
startupum.ru, 1
starwatches.eu, 1
starwins.co.uk, 1
@ -30625,7 +30603,6 @@ stonewuu.com, 1
stony.com, 1
stonystratford.org, 1
stopakwardhandshakes.org, 1
stopbreakupnow.org, 1
stopbullying.gov, 1
stopfraud.gov, 1
stopthethyroidmadness.com, 1
@ -30860,7 +30837,6 @@ sundayfundayjapan.com, 1
suneilpatel.com, 1
sunfeathers.net, 1
sunfireshop.com.br, 1
sunflyer.cn, 0
sunfox.cz, 1
sunfulong.blog, 1
sunfulong.me, 1
@ -31371,6 +31347,7 @@ tbonejs.org, 1
tbrindus.ca, 1
tbrss.com, 1
tbs-certificates.co.uk, 1
tbspace.de, 1
tbtech.cz, 1
tbuchloh.de, 1
tbys.us, 1
@ -31483,6 +31460,7 @@ technicabv.nl, 1
technicalbrothers.cf, 1
technicalforensic.com, 1
technicallyeasy.net, 1
techniclab.net, 1
technifocal.com, 1
technikrom.org, 1
technoinfogroup.it, 1
@ -31679,6 +31657,9 @@ testpornsite.com, 1
testsuite.org, 1
testuje.net, 1
tetedelacourse.ch, 1
tetrafinancial-commercial-business-equipment-financing.com, 1
tetrafinancial-energy-mining-equipment-financing.com, 1
tetrafinancial-healthcare-medical-equipment-financing.com, 1
tetraktus.org, 1
tetrarch.co, 1
tetsugakunomichi.jp, 1
@ -31807,7 +31788,6 @@ thecitizens.com, 1
thecitywarehouse.clothing, 1
theclimbingunit.com, 1
thecloudmigrator.com, 1
thecloudrevolution.net, 1
thecoffeepod.co.uk, 1
thecoffeesuperstore.com, 1
thecolumnist.net, 1
@ -31836,7 +31816,6 @@ thedisc.nl, 1
thediscovine.com, 1
thedocumentrefinery.com, 1
thedominatorsclan.com, 1
thedreamtravelgroup.co.uk, 1
thedronechart.com, 1
thedrunkencabbage.com, 1
thedutchmarketers.com, 1
@ -31846,6 +31825,7 @@ theeducationdirectory.org, 1
theepankar.com, 1
theevergreen.me, 1
theexpatriate.de, 1
theeyeopener.com, 1
thefanimatrix.net, 1
thefasterweb.com, 1
thefbstalker.com, 1
@ -31910,7 +31890,6 @@ themarshallproject.org, 1
themeaudit.com, 1
themecraft.studio, 1
themerchandiser.net, 1
themesurgeons.net, 1
themetacity.com, 1
themilanlife.com, 1
themillerslive.com, 1
@ -32080,7 +32059,6 @@ thinklikeanentrepreneur.com, 1
thinkmarketing.ca, 1
thinkquality.nl, 1
thinkrealty.com, 1
thinkswap.com, 1
thinktux.net, 1
thirdworld.moe, 1
thiry-automobiles.net, 1
@ -32202,7 +32180,7 @@ ticketsourcebeta.co.uk, 1
ticketsvergleichen.de, 1
tickit.ca, 1
tid.jp, 1
tidycustoms.net, 0
tidycustoms.net, 1
tie-online.org, 1
tielectric.ch, 1
tiendafetichista.com, 1
@ -32293,7 +32271,6 @@ tintencenter.com, 1
tintenfix.net, 1
tintenfux.de, 1
tintenland.de, 1
tintenprofi.de, 1
tiny.ee, 1
tinyhousefinance.com.au, 1
tinylan.com, 1
@ -32783,7 +32760,6 @@ traderjoe-cloud.de, 1
tradietrove.com.au, 1
tradinews.com, 1
tradinews.fr, 1
tradingbhavishya.com, 1
tradingrooms.com, 0
traditionsvivantesenimages.ch, 1
tradiz.org, 1
@ -33613,7 +33589,6 @@ urlaub-busreisen.de, 1
urlaub-leitner.at, 1
urlscan.io, 1
urltodomain.com, 1
urology.wiki, 1
urown.net, 1
ursa-minor-beta.org, 1
ursae.co, 1
@ -34068,6 +34043,7 @@ videov.tk, 1
vidister.de, 1
viditut.com, 1
vidkovaomara.si, 1
vidlyoficial.com, 1
vieaw.com, 1
vieclam24h.vn, 0
viekelis.lt, 0
@ -34466,7 +34442,6 @@ waelti.xxx, 1
waf.ninja, 1
waf.sexy, 1
wafa4hw.com, 1
wafairhaven.com.au, 1
wafelland.be, 1
waffle.at, 1
wafni.com, 1
@ -34692,7 +34667,6 @@ webdesignerinwarwickshire.co.uk, 1
webdesignlabor.ch, 1
webdesignplay.com, 1
webdesignplayground.io, 1
webdev-quiz.de, 1
webdevops.io, 1
webdosh.com, 1
webduck.nl, 0
@ -35646,6 +35620,7 @@ www68277.com, 1
wxcafe.net, 1
wxh.jp, 1
wxrlab.com, 1
wxster.com, 1
wy6.org, 1
wyam.io, 1
wybar.uk, 1
@ -36454,6 +36429,8 @@ zbrane-doplnky.cz, 1
zby.io, 1
zbyga.cz, 1
zbyte.it, 1
zcarot.com, 1
zcarrot.com, 1
zcgram.com, 1
zcon.nl, 1
zcr.ca, 1
@ -36657,7 +36634,6 @@ zorium.org, 1
zorki.nl, 1
zorntt.fr, 1
zorz.info, 1
zotero.org, 1
zouk.info, 1
zouyaoji.top, 1
zravypapir.cz, 1
@ -36732,6 +36708,7 @@ zyrillezuno.com, 1
zyul.ddns.net, 1
zyx.im, 0
zyzardx.com, 1
zzpd.nl, 1
zzsec.org, 1
zzw.ca, 1
%%

View File

@ -538,11 +538,18 @@ the Windows registry.
#### `--connect-existing`
Connecting to an existing Firefox instance. The instance must have
Marionette enabled.
Connect geckodriver to an existing Firefox instance. This means
geckodriver will abstain from the default of starting a new Firefox
session.
To enable the Marionette remote protocol you can pass the `--marionette`
flag to Firefox.
The existing Firefox instance must have [Marionette] enabled.
To enable the remote protocol in Firefox, you can pass the
`-marionette` flag. Unless the `marionette.port` preference
has been user-set, Marionette will listen on port 2828. So when
using `--connect-existing` it is likely you will also have to use
[`--marionette-port`] to set the correct port.
[`--marionette-port`]: #marionette-port
#### <code>--host <var>HOST</var></code>
@ -558,16 +565,25 @@ Set the Gecko and geckodriver log level. Possible values are `fatal`,
#### <code>--marionette-port <var>PORT</var></code>
Port to use for connecting to the Marionette remote protocol. By default
it will pick a free port assigned by the system.
Selects the port for geckodrivers connection to the [Marionette]
remote protocol.
In the default mode where geckodriver starts and manages the Firefox
process, it will pick a free port assigned by the system and set the
`marionette.port` preference in the profile.
When [`--connect-existing`] is used and the Firefox process is not
under geckodrivers control, it will simply connect to <var>PORT</var>.
[`--connect-existing`]: #connect-existing
#### <code>-p <var>PORT</var></code>/<code>--port <var>PORT</var></code>
Port to use for the WebDriver server. Defaults to 4444.
A helpful trick is that it is possible to bind to 0 to get the system
to atomically assign a free port.
A helpful trick is that it is possible to bind to 0 to get the
system to atomically assign a free port.
#### <code>--jsdebugger</code>
@ -577,11 +593,12 @@ useful for debugging [Marionette] internals.
[browser toolbox]: https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox
#### <code>-v<var>[v]</var></code>
Increases the logging verbosity by to debug level when passing a single
`-v`, or to trace level if `-vv` is passed. This is analogous to passing
`--log debug` and `--log trace`, respectively.
Increases the logging verbosity by to debug level when passing
a single `-v`, or to trace level if `-vv` is passed. This is
analogous to passing `--log debug` and `--log trace`, respectively.
Building
@ -610,10 +627,10 @@ the built executable with `./mach geckodriver -- --other --flags`.
[commands]: https://docs.rs/webdriver/newest/webdriver/command/index.html
[responses]: https://docs.rs/webdriver/newest/webdriver/response/index.html
[errors]: https://docs.rs/webdriver/newest/webdriver/error/enum.ErrorStatus.html
[Marionette protocol]: https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/Protocol
[Marionette protocol]: https://firefox-source-docs.mozilla.org/testing/marionette/marionette/Protocol.html
[WebDriver]: https://w3c.github.io/webdriver/webdriver-spec.html
[FirefoxDriver]: https://github.com/SeleniumHQ/selenium/wiki/FirefoxDriver
[Marionette]: http://searchfox.org/mozilla-central/source/testing/marionette/README
[Marionette]: https://firefox-source-docs.mozilla.org/testing/marionette/marionette/
[Firefox CI]: https://treeherder.mozilla.org/
[mozconfig]: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Configuring_Build_Options

View File

@ -1,206 +0,0 @@
Contributing
============
We are delighted that you want to help improve Marionette!
Marionette means different a few different things, depending
on who you talk to, but the overall scope of the project involves
these components:
* [_Marionette_] is a Firefox remote protocol to communicate with,
instrument, and control Gecko-based browsers such as Firefox
and Fennec. It is built in to Firefox and written in [XPCOM]
flavoured JavaScript.
It serves as the backend for the geckodriver WebDriver implementation,
and is used in the context of Firefox UI tests, reftesting,
Web Platform Tests, test harness bootstrapping, and in many
other far-reaching places where browser instrumentation is required.
* [_geckodriver_] provides the HTTP API described by the [WebDriver
protocol] to communicate with Gecko-based browsers such as
Firefox and Fennec. It is a standalone executable written in
Rust, and can be used with compatible W3C WebDriver clients.
* [_webdriver_] is a Rust crate providing interfaces, traits
and types, errors, type- and bounds checks, and JSON marshaling
for correctly parsing and emitting the [WebDriver protocol].
By participating in this project, you agree to abide by the Mozilla
[Community Participation Guidelines]. Here are some guidelines
for contributing high-quality and actionable bugs and code.
[_Marionette_]: ./README.md
[_geckodriver_]: ../geckodriver/README.md
[_webdriver_]: ../webdriver/README.md
[WebDriver protocol]: https://w3c.github.io/webdriver/webdriver-spec.html#protocol
[XPCOM]: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Guide
[Community Participation Guidelines]: https://www.mozilla.org/en-US/about/governance/policies/participation/
Writing code
============
Because there are many moving parts involved remote controlling
a web browser, it can be challenging to a new contributor to know
where to start. Please dont hesitate to [ask questions]!
The canonical source code repository is [mozilla-central]. Bugs are
filed in the [`Testing :: Marionette`] component on Bugzilla. We also
have a curated set of [good first bugs] you may consider attempting first.
We have collected a lot of good advice for working on Marionette
code in <doc/CodeStyle.md>, which we highly recommend you read.
There is more development documentation archived under <doc/index.rst>
that you may peruse at your convenience.
[ask questions]: #communication
[reach out to us]: #communication
[mozilla-central]: https://searchfox.org/mozilla-central/source/testing/marionette/
[good first bugs]: https://www.joshmatthews.net/bugsahoy/?automation=1&js=1
Building
--------
Marionette is built in to Firefox and ships in the official
Firefox binary. As Marionette is written in [XPCOM] flavoured
JavaScript, you may choose to rely on so called [artifact builds],
which will download pre-compiled Firefox blobs to your computer.
This means you dont have to compile Firefox locally, but does
come at the cost of having a good internet connection. To enable
[artifact builds] you may choose Firefox for Desktop Artifact
Mode when bootstrapping.
Once you have a clone of [mozilla-unified], you can set up your
development environment by running this command and following the
on-screen instructions:
% ./mach bootstrap
To perform a regular build, simply do:
% ./mach build
You can clean out the objdir using this command:
% ./mach clobber
Occasionally a clean build will be required after you fetch the
latest changes from mozilla-central. You will find that the the
build will error when this is the case. To automatically do clean
builds when this happens you may optionally add this line to the
_mozconfig_ file in your top source directory:
mk_add_options AUTOCLOBBER=1
If you compile Firefox frequently you will also want to enable
[ccache] and [sccache] if you develop on a macOS or Linux system:
mk_add_options 'export RUSTC_WRAPPER=sccache'
mk_add_options 'export CCACHE_CPP2=yes'
ac_add_options --with-ccache
[mozilla-unified]: https://hg.mozilla.org/mozilla-unified/
[artifact builds]: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Artifact_builds
[ccache]: https://ccache.samba.org/
[sccache]: https://github.com/mozilla/sccache
Running tests
-------------
We verify and test Marionette in a couple of different ways.
Marionette has a set of [xpcshell] unit tests located in
_testing/marionette/test_*.js_. These can be run this way:
% ./mach test testing/marionette/test_*.js
Because tests are run in parallell and xpcshell itself is quite
chatty, it can sometimes be useful to run the tests sequentially:
% ./mach test --sequential testing/marionette/test_error.js
These unit tests run as part of the _X_ jobs on Treeherder.
We also have a set of functional tests that make use of the Marionette
Python client. These start a Firefox process and tests the Marionette
protocol input and output. The following command will run all tests:
% ./mach test mn
But you can also run individual tests:
% ./mach test testing/marionette/harness/marionette_harness/tests/unit/test_navigation.py
When working on Marionette code it is often useful to surface the
stdout from Firefox:
% ./mach test --gecko-log - TEST
It is common to use this in conjunction with an option to increase
the Marionette log level:
% ./mach test --gecko-log - -vv TEST
A single `-v` enables debug logging, and a double `-vv` enables
trace logging.
As these are functional integration tests and pop up Firefox windows
sporadically, a helpful tip is to surpress the window whilst you
are running them by using Firefox [headless mode]:
% ./mach test -z TEST
`-z` is an alias for `--headless` and equivalent to setting the
`MOZ_HEADLESS` output variable. In addition to `MOZ_HEADLESS`
there is also `MOZ_HEADLESS_WIDTH` and `MOZ_HEADLESS_HEIGHT` for
controlling the dimensions of the no-op virtual display. This is
similar to using xvfb(1) which you may know from the X windowing system,
but has the additional benefit of also working on macOS and Windows.
We have a separate page documenting how to write good Python tests in
<doc/PythonTests.md>. These tests will run as part of the _Mn_
job on Treeherder.
In addition to these two test types that specifically test the
Marionette protocol, Marionette is used as the backend for the
[geckodriver] WebDriver implementation. It is served by a WPT test
suite which effectively tests conformance to the W3C specification.
This is a good try syntax to use when testing Marionette changes:
-b do -p linux,linux64,macosx64,win64,android-api-16 -u marionette-e10s,marionette-headless-e10s,xpcshell,web-platform-tests,firefox-ui-functional-local-e10s,firefox-ui-functional-remote-e10s -t none
[xpcshell]: https://developer.mozilla.org/en-US/docs/Mozilla/QA/Writing_xpcshell-based_unit_tests
[headless mode]: https://developer.mozilla.org/en-US/Firefox/Headless_mode
[geckodriver]: ../geckodriver/README.md
Submitting patches
------------------
You can submit patches by uploading .diff files to Bugzilla or by
sending them to [MozReview].
Once you have contributed a couple of patches, we are happy to
sponsor you in [becoming a Mozilla committer]. When you have been
granted commit access level 1 you will have permission to use the
[Firefox CI] to trigger your own “try runs” to test your changes.
[MozReview]: http://mozilla-version-control-tools.readthedocs.io/en/latest/mozreview.html
[becoming a Mozilla committer]: https://www.mozilla.org/en-US/about/governance/policies/commit/
[Firefox CI]: https://treeherder.mozilla.org/
Communication
=============
The mailing list for Marionette discussion is
tools-marionette@lists.mozilla.org ([subscribe], [archive]).
If you prefer real-time chat, there is often someone in the #ateam IRC
channel on irc.mozilla.org. Dont ask if you can ask a question, just
ask, and please wait for an answer as we might not be in your timezone.
[subscribe]: https://lists.mozilla.org/listinfo/tools-marionette
[archive]: https://groups.google.com/group/mozilla.tools.marionette

View File

@ -1,70 +1,23 @@
Marionette
==========
Marionette is the remote protocol that lets OOP programs communicate
with, instrument, and control Gecko.
#### marionette | ˌmarɪəˈnɛt |
##### noun
* a puppet worked by strings: the bird bobs up and down like a marionette.
Description
===========
* a person who is easily manipulated or controlled: many officers
dismissed him as the mayors marionette.
Marionette is an automation driver for Mozillas Gecko engine.
It can remotely control either the UI or the internal JavaScript of
Gecko-based browsers, such as Firefox and Fennec. It can control
both the chrome and the content document, giving a high level of
control and ability to replicate user interaction. In addition
to performing actions on the browser, Marionette can also ready
properties and attributes of the DOM.
Marionette is the remote protocol that lets out-of-process programs
communicate with, instrument, and control Gecko-based browsers.
It provides interfaces for interacting with both the internal
JavaScript runtime and UI elements of Gecko-based browsers, such
as Firefox and Fennec. It can control both the chrome- and content
documents, giving a high level of control and ability to replicate,
or emulate, user interaction.
Usage
=====
Head on to the [documentation] to find out more.
Marionette can be activated by passing the `-marionette` flag.
To start Firefox with the remote protocol turned on:
% firefox -marionette
1491228343089 Marionette INFO Listening on port 2828
This binds to a TCP socket, over which [clients] can communicate
with Marionette using the [protocol].
Clients
=======
Clients may be implemented in any language that is capable of writing
and receiving data over TCP socket. A [reference client] is provided.
Clients may be implemented both synchronously and asynchronously,
although the latter is impossible in protocol levels 2 and earlier
due to the lack of message sequencing.
Contributing
============
If you want to help improve Marionette, we have more information in
<CONTRIBUTING.md>. You will find additional development documentation at
<https://firefox-source-docs.mozilla.org/testing/marionette/marionette>.
Communication
=============
The mailing list for discussion is tools-marionette@lists.mozilla.org
([subscribe], [archive]). If you prefer real-time chat, there
is often someone in the #ateam IRC channel on irc.mozilla.org.
Dont ask if you can ask a question, just ask, and please wait
for an answer as we might not be in your timezone.
[clients]: #clients
[protocol]: #protocol
[command]: #command
[response]: #response
[error]: #error-object
[WebDriver standard]: https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors
[reference client]: client/
[subscribe]: https://lists.mozilla.org/listinfo/tools-marionette
[archive]: https://groups.google.com/group/mozilla.tools.marionette
[documentation]: https://firefox-source-docs.mozilla.org/testing/marionette/marionette/

View File

@ -0,0 +1,45 @@
Building
========
Marionette is built in to Firefox and ships in the official
Firefox binary. As Marionette is written in [XPCOM] flavoured
JavaScript, you may choose to rely on so called [artifact builds],
which will download pre-compiled Firefox blobs to your computer.
This means you dont have to compile Firefox locally, but does
come at the cost of having a good internet connection. To enable
[artifact builds] you may choose Firefox for Desktop Artifact
Mode when bootstrapping.
Once you have a clone of [mozilla-unified], you can set up your
development environment by running this command and following the
on-screen instructions:
% ./mach bootstrap
To perform a regular build, simply do:
% ./mach build
You can clean out the objdir using this command:
% ./mach clobber
Occasionally a clean build will be required after you fetch the
latest changes from mozilla-central. You will find that the the
build will error when this is the case. To automatically do clean
builds when this happens you may optionally add this line to the
_mozconfig_ file in your top source directory:
mk_add_options AUTOCLOBBER=1
If you compile Firefox frequently you will also want to enable
[ccache] and [sccache] if you develop on a macOS or Linux system:
mk_add_options 'export RUSTC_WRAPPER=sccache'
mk_add_options 'export CCACHE_CPP2=yes'
ac_add_options --with-ccache
[mozilla-unified]: https://hg.mozilla.org/mozilla-unified/
[artifact builds]: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Artifact_builds
[ccache]: https://ccache.samba.org/
[sccache]: https://github.com/mozilla/sccache

View File

@ -0,0 +1,74 @@
Contributing
============
We are delighted that you want to help improve Marionette!
Marionette means different a few different things, depending
on who you talk to, but the overall scope of the project involves
these components:
* [_Marionette_] is a Firefox remote protocol to communicate with,
instrument, and control Gecko-based browsers such as Firefox
and Fennec. It is built in to Firefox and written in [XPCOM]
flavoured JavaScript.
It serves as the backend for the geckodriver WebDriver implementation,
and is used in the context of Firefox UI tests, reftesting,
Web Platform Tests, test harness bootstrapping, and in many
other far-reaching places where browser instrumentation is required.
* [_geckodriver_] provides the HTTP API described by the [WebDriver
protocol] to communicate with Gecko-based browsers such as
Firefox and Fennec. It is a standalone executable written in
Rust, and can be used with compatible W3C WebDriver clients.
* [_webdriver_] is a Rust crate providing interfaces, traits
and types, errors, type- and bounds checks, and JSON marshaling
for correctly parsing and emitting the [WebDriver protocol].
By participating in this project, you agree to abide by the Mozilla
[Community Participation Guidelines]. Here are some guidelines
for contributing high-quality and actionable bugs and code.
[_Marionette_]: ./index.html
[_geckodriver_]: ../geckodriver
[_webdriver_]: https://searchfox.org/mozilla-central/source/testing/webdriver/README.md
[WebDriver protocol]: https://w3c.github.io/webdriver/webdriver-spec.html#protocol
[XPCOM]: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Guide
[Community Participation Guidelines]: https://www.mozilla.org/en-US/about/governance/policies/participation/
Writing code
------------
Because there are many moving parts involved remote controlling
a web browser, it can be challenging to a new contributor to know
where to start. Please dont hesitate to [ask questions]!
The canonical source code repository is [mozilla-central]. Bugs are
filed in the `Testing :: Marionette` component on Bugzilla. We also
have a curated set of [good first bugs] you may consider attempting first.
We have collected a lot of good advice for working on Marionette
code in our [code style document], which we highly recommend you read.
[ask questions]: #communication
[reach out to us]: #communication
[mozilla-central]: https://searchfox.org/mozilla-central/source/testing/marionette/
[good first bugs]: https://www.joshmatthews.net/bugsahoy/?automation=1&js=1
[code style document]: CodeStyle.html
Next steps
----------
* [Building](Building.html)
* [Debugging](Debugging.html)
* [Testing](Testing.html)
* [Patching](Patches.html)
Other resources
---------------
* [Code style](CodeStyle.html)
* [Internals](internals/)

View File

@ -0,0 +1,14 @@
Submitting patches
==================
You can submit patches by uploading .diff files to Bugzilla or by
sending them to [MozReview].
Once you have contributed a couple of patches, we are happy to
sponsor you in [becoming a Mozilla committer]. When you have been
granted commit access level 1 you will have permission to use the
[Firefox CI] to trigger your own “try runs” to test your changes.
[MozReview]: http://mozilla-version-control-tools.readthedocs.io/en/latest/mozreview.html
[becoming a Mozilla committer]: https://www.mozilla.org/en-US/about/governance/policies/commit/
[Firefox CI]: https://treeherder.mozilla.org/

View File

@ -108,3 +108,15 @@ and it is structured like this:
All the fields of the error object are required, so the stacktrace and
message fields may be empty strings. The error field is guaranteed
to be one of the JSON error codes as laid out by the [WebDriver standard].
Clients
-------
Clients may be implemented in any language that is capable of writing
and receiving data over TCP socket. A [reference client] is provided.
Clients may be implemented both synchronously and asynchronously,
although the latter is impossible in protocol levels 2 and earlier
due to the lack of message sequencing.
[reference client]: https://searchfox.org/mozilla-central/source/testing/marionette/client/

View File

@ -0,0 +1,68 @@
Running tests
=============
We verify and test Marionette in a couple of different ways.
Marionette has a set of [xpcshell] unit tests located in
_testing/marionette/test_*.js_. These can be run this way:
% ./mach test testing/marionette/test_*.js
Because tests are run in parallell and xpcshell itself is quite
chatty, it can sometimes be useful to run the tests sequentially:
% ./mach test --sequential testing/marionette/test_error.js
These unit tests run as part of the _X_ jobs on Treeherder.
We also have a set of functional tests that make use of the Marionette
Python client. These start a Firefox process and tests the Marionette
protocol input and output. The following command will run all tests:
% ./mach test mn
But you can also run individual tests:
% ./mach test testing/marionette/harness/marionette_harness/tests/unit/test_navigation.py
When working on Marionette code it is often useful to surface the
stdout from Firefox:
% ./mach test --gecko-log - TEST
It is common to use this in conjunction with an option to increase
the Marionette log level:
% ./mach test --gecko-log - -vv TEST
A single `-v` enables debug logging, and a double `-vv` enables
trace logging.
As these are functional integration tests and pop up Firefox windows
sporadically, a helpful tip is to surpress the window whilst you
are running them by using Firefox [headless mode]:
% ./mach test -z TEST
`-z` is an alias for `--headless` and equivalent to setting the
`MOZ_HEADLESS` output variable. In addition to `MOZ_HEADLESS`
there is also `MOZ_HEADLESS_WIDTH` and `MOZ_HEADLESS_HEIGHT` for
controlling the dimensions of the no-op virtual display. This is
similar to using xvfb(1) which you may know from the X windowing system,
but has the additional benefit of also working on macOS and Windows.
We have a separate page documenting how to write good Python tests in
<doc/PythonTests.md>. These tests will run as part of the _Mn_
job on Treeherder.
In addition to these two test types that specifically test the
Marionette protocol, Marionette is used as the backend for the
[geckodriver] WebDriver implementation. It is served by a WPT test
suite which effectively tests conformance to the W3C specification.
This is a good try syntax to use when testing Marionette changes:
-b do -p linux,linux64,macosx64,win64,android-api-16 -u marionette-e10s,marionette-headless-e10s,xpcshell,web-platform-tests,firefox-ui-functional-local-e10s,firefox-ui-functional-remote-e10s -t none
[xpcshell]: https://developer.mozilla.org/en-US/docs/Mozilla/QA/Writing_xpcshell-based_unit_tests
[headless mode]: https://developer.mozilla.org/en-US/Firefox/Headless_mode
[geckodriver]: ../geckodriver/README.md

View File

@ -2,15 +2,30 @@
Marionette
==========
Marionette is the remote protocol that lets OOP programs communicate
with, instrument, and control Gecko.
Marionette is the remote protocol that lets out-of-process programs
communicate with, instrument, and control Gecko-based browsers.
It can remotely control either the UI or the internal JavaScript of
Gecko-based browsers, such as Firefox and Fennec. It can control
both the chrome and the content document, giving a high level of
control and ability to replicate user interaction. In addition
to performing actions on the browser, Marionette can also ready
properties and attributes of the DOM.
It provides interfaces for interacting with both the internal
JavaScript runtime and UI elements of Gecko-based browsers, such
as Firefox and Fennec. It can control both the chrome- and content
documents, giving a high level of control and ability to replicate,
or emulate, user interaction.
Usage
=====
Marionette can be activated by passing the `-marionette` flag. To
start Firefox with the remote protocol turned on::
% firefox -marionette
1491228343089 Marionette INFO Listening on port 2828
This binds to a TCP socket, over which clients can communicate with
Marionette using the `protocol`_.
.. _protocol: Protocol.html
For users
@ -19,9 +34,9 @@ For users
.. toctree::
:maxdepth: 1
`Marionette README`_
Intro.md
Protocol.md
PythonTests.md
See also:
@ -30,7 +45,6 @@ See also:
* Documentation for `Firefox Puppeteer`_, which is used to in-tree
to write Firefox UI tests.
.. _Marionette README: https://searchfox.org/mozilla-central/source/testing/marionette/README.md
.. _Marionette Python client: http://marionette-client.readthedocs.io
.. _Firefox Puppeteer: http://firefox-puppeteer.readthedocs.io
@ -41,15 +55,14 @@ For developers
.. toctree::
:maxdepth: 1
`Contributing to Marionette`_
NewContributors.md
Contributing.md
Debugging.md
PythonTests.md
Testing.md
CodeStyle.md
Patching.md
SeleniumAtoms.md
internals/index
.. _Contributing to Marionette: https://searchfox.org/mozilla-central/source/testing/marionette/CONTRIBUTING.md
Bugs
====
@ -60,11 +73,12 @@ Bugs are tracked in the `Testing :: Marionette` component.
Communication
=============
The mailing list for discussion is tools-marionette@lists.mozilla.org
(subscribe_, archive_). If you prefer real-time chat, there
is often someone in the #ateam IRC channel on irc.mozilla.org.
Dont ask if you can ask a question, just ask, and please wait
for an answer as we might not be in your timezone.
The mailing list for Marionette discussion is
tools-marionette@lists.mozilla.org (`subscribe`_, `archive`_).
If you prefer real-time chat, there is often someone in the #ateam IRC
channel on irc.mozilla.org. Dont ask if you can ask a question, just
ask, and please wait for an answer as we might not be in your timezone.
.. _subscribe: https://lists.mozilla.org/listinfo/tools-marionette
.. _archive: https://groups.google.com/group/mozilla.tools.marionette

View File

@ -411,8 +411,12 @@ nsRFPService::RandomMidpoint(long long aClampedTimeUSec,
}
// Offset the appropriate index into the hash output, and then turn it into a random midpoint
// between 0 and aResolutionUSec
int byteOffset = ((aClampedTimeUSec - extraClampedTime) / aResolutionUSec) * 4;
// between 0 and aResolutionUSec. Sometimes out input time is negative, we ride the negative
// out to the end until we start doing pointer math. (We also triple check we're in bounds.)
int byteOffset = abs(((aClampedTimeUSec - extraClampedTime) / aResolutionUSec) * 4);
if (MOZ_UNLIKELY(byteOffset > (HASH_DIGEST_SIZE_BYTES - 4))) {
byteOffset = 0;
}
uint32_t deterministiclyRandomValue = *BitwiseCast<uint32_t*>(PromiseFlatCString(hashResult).get() + byteOffset);
deterministiclyRandomValue %= aResolutionUSec;
*aMidpointOut = deterministiclyRandomValue;

View File

@ -257,11 +257,4 @@
<children includes="menupopup|template"/>
</content>
</binding>
<binding id="menubutton-item" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
<content>
<xul:label class="menubutton-text" flex="1" xbl:inherits="value=label,accesskey,crop" crop="right"/>
<children includes="menupopup"/>
</content>
</binding>
</bindings>

View File

@ -368,10 +368,6 @@ menuitem[type="radio"] {
-moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic");
}
menuitem.menuitem-non-iconic {
-moz-binding: url("chrome://global/content/bindings/menu.xml#menubutton-item");
}
menucaption {
-moz-binding: url("chrome://global/content/bindings/menu.xml#menucaption");
}