mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
Merge inbound to mozilla-central. a=merge
This commit is contained in:
commit
d1376bd7ec
@ -58,7 +58,6 @@ module.exports = {
|
||||
"no-restricted-modules": "off",
|
||||
"no-return-assign": "error",
|
||||
"no-script-url": "off",
|
||||
"no-sequences": "error",
|
||||
"no-shadow": "error",
|
||||
"no-space-before-semi": "off",
|
||||
"no-sync": "off",
|
||||
|
@ -42,7 +42,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=483573
|
||||
this.target = aAcc;
|
||||
this.getID = function nameChecker_getID() {
|
||||
return "name change handling";
|
||||
},
|
||||
};
|
||||
this.check = function nameChecker_check(aEvent) {
|
||||
is(aEvent.accessible.name, aName,
|
||||
"Wrong name of " + prettyName(aEvent.accessible) + " on focus");
|
||||
|
@ -191,14 +191,18 @@
|
||||
];
|
||||
gQueue.push(new changeText("p12", newStr, events));
|
||||
|
||||
newStr = "a" + longStr2 + "b", insStr = longStr2, rmStr = longStr1;
|
||||
newStr = "a" + longStr2 + "b";
|
||||
insStr = longStr2;
|
||||
rmStr = longStr1;
|
||||
events = [
|
||||
[ kRemoval, rmStr, 1 ],
|
||||
[ kInsertion, insStr, 1]
|
||||
];
|
||||
gQueue.push(new changeText("p12", newStr, events));
|
||||
|
||||
newStr = "ab", insStr = "", rmStr = longStr2;
|
||||
newStr = "ab";
|
||||
insStr = "";
|
||||
rmStr = longStr2;
|
||||
events = [
|
||||
[ kRemoval, rmStr, 1 ],
|
||||
[ kInsertion, insStr, 1, kUnexpected ]
|
||||
|
@ -41,7 +41,8 @@
|
||||
anchor = getAccessible("bottom3");
|
||||
[x, /* y */] = getPos(anchor);
|
||||
var [parentX, parentY] = getPos(anchor.parent);
|
||||
scrollToX = parentX - docX, scrollToY = parentY - docY;
|
||||
scrollToX = parentX - docX;
|
||||
scrollToY = parentY - docY;
|
||||
|
||||
anchor.scrollToPoint(COORDTYPE_PARENT_RELATIVE, scrollToX, scrollToY);
|
||||
testPos(anchor, [x, docY]);
|
||||
|
@ -601,7 +601,7 @@ async function setupDownloads() {
|
||||
source: "https://bugzilla.mozilla.org/show_bug.cgi?id=480169",
|
||||
target: "fakefile-10-minutes",
|
||||
});
|
||||
download.startTime = new Date(now_mSec - 10 * kMsecPerMin), // 10 minutes ago
|
||||
download.startTime = new Date(now_mSec - 10 * kMsecPerMin); // 10 minutes ago
|
||||
download.canceled = true;
|
||||
await publicList.add(download);
|
||||
|
||||
@ -609,7 +609,7 @@ async function setupDownloads() {
|
||||
source: "https://bugzilla.mozilla.org/show_bug.cgi?id=453440",
|
||||
target: "fakefile-1-hour",
|
||||
});
|
||||
download.startTime = new Date(now_mSec - 45 * kMsecPerMin), // 45 minutes ago
|
||||
download.startTime = new Date(now_mSec - 45 * kMsecPerMin); // 45 minutes ago
|
||||
download.canceled = true;
|
||||
await publicList.add(download);
|
||||
|
||||
@ -617,7 +617,7 @@ async function setupDownloads() {
|
||||
source: "https://bugzilla.mozilla.org/show_bug.cgi?id=480169",
|
||||
target: "fakefile-1-hour-10-minutes",
|
||||
});
|
||||
download.startTime = new Date(now_mSec - 70 * kMsecPerMin), // 70 minutes ago
|
||||
download.startTime = new Date(now_mSec - 70 * kMsecPerMin); // 70 minutes ago
|
||||
download.canceled = true;
|
||||
await publicList.add(download);
|
||||
|
||||
@ -625,7 +625,7 @@ async function setupDownloads() {
|
||||
source: "https://bugzilla.mozilla.org/show_bug.cgi?id=453440",
|
||||
target: "fakefile-2-hour",
|
||||
});
|
||||
download.startTime = new Date(now_mSec - 90 * kMsecPerMin), // 90 minutes ago
|
||||
download.startTime = new Date(now_mSec - 90 * kMsecPerMin); // 90 minutes ago
|
||||
download.canceled = true;
|
||||
await publicList.add(download);
|
||||
|
||||
@ -633,7 +633,7 @@ async function setupDownloads() {
|
||||
source: "https://bugzilla.mozilla.org/show_bug.cgi?id=480169",
|
||||
target: "fakefile-2-hour-10-minutes",
|
||||
});
|
||||
download.startTime = new Date(now_mSec - 130 * kMsecPerMin), // 130 minutes ago
|
||||
download.startTime = new Date(now_mSec - 130 * kMsecPerMin); // 130 minutes ago
|
||||
download.canceled = true;
|
||||
await publicList.add(download);
|
||||
|
||||
@ -641,7 +641,7 @@ async function setupDownloads() {
|
||||
source: "https://bugzilla.mozilla.org/show_bug.cgi?id=453440",
|
||||
target: "fakefile-4-hour",
|
||||
});
|
||||
download.startTime = new Date(now_mSec - 180 * kMsecPerMin), // 180 minutes ago
|
||||
download.startTime = new Date(now_mSec - 180 * kMsecPerMin); // 180 minutes ago
|
||||
download.canceled = true;
|
||||
await publicList.add(download);
|
||||
|
||||
@ -649,7 +649,7 @@ async function setupDownloads() {
|
||||
source: "https://bugzilla.mozilla.org/show_bug.cgi?id=480169",
|
||||
target: "fakefile-4-hour-10-minutes",
|
||||
});
|
||||
download.startTime = new Date(now_mSec - 250 * kMsecPerMin), // 250 minutes ago
|
||||
download.startTime = new Date(now_mSec - 250 * kMsecPerMin); // 250 minutes ago
|
||||
download.canceled = true;
|
||||
await publicList.add(download);
|
||||
|
||||
@ -664,7 +664,7 @@ async function setupDownloads() {
|
||||
source: "https://bugzilla.mozilla.org/show_bug.cgi?id=453440",
|
||||
target: "fakefile-today",
|
||||
});
|
||||
download.startTime = today, // 12:00:01 AM this morning
|
||||
download.startTime = today; // 12:00:01 AM this morning
|
||||
download.canceled = true;
|
||||
await publicList.add(download);
|
||||
|
||||
@ -676,7 +676,7 @@ async function setupDownloads() {
|
||||
source: "https://bugzilla.mozilla.org/show_bug.cgi?id=453440",
|
||||
target: "fakefile-old",
|
||||
});
|
||||
download.startTime = lastYear,
|
||||
download.startTime = lastYear;
|
||||
download.canceled = true;
|
||||
await publicList.add(download);
|
||||
|
||||
|
@ -11,7 +11,6 @@ module.exports = {
|
||||
"no-fallthrough": ["error", { "commentPattern": ".*[Ii]ntentional(?:ly)?\\s+fall(?:ing)?[\\s-]*through.*" }],
|
||||
"no-multi-str": "error",
|
||||
"no-return-assign": "error",
|
||||
"no-sequences": "error",
|
||||
"no-shadow": "error",
|
||||
"no-throw-literal": "error",
|
||||
"no-unused-vars": ["error", { "args": "after-used", "vars": "all" }],
|
||||
|
@ -171,7 +171,6 @@ module.exports = {
|
||||
"no-restricted-syntax": 0,
|
||||
"no-return-assign": [2, "except-parens"],
|
||||
"no-script-url": 2,
|
||||
"no-sequences": 2,
|
||||
"no-shadow": 2,
|
||||
"no-spaced-func": 2,
|
||||
"no-sync": 0,
|
||||
|
@ -274,7 +274,6 @@ var paymentDialogWrapper = {
|
||||
dependentLocality = "",
|
||||
postalCode = "",
|
||||
sortingCode = "",
|
||||
languageCode = "",
|
||||
organization = "",
|
||||
recipient = "",
|
||||
phone = "",
|
||||
@ -294,7 +293,6 @@ var paymentDialogWrapper = {
|
||||
dependentLocality,
|
||||
postalCode,
|
||||
sortingCode,
|
||||
languageCode,
|
||||
organization,
|
||||
recipient,
|
||||
phone);
|
||||
|
@ -90,7 +90,6 @@ add_task(async function test_createPaymentAddress_basic() {
|
||||
dependentLocality: "N/A",
|
||||
postalCode: "94041",
|
||||
sortingCode: "1234",
|
||||
languageCode: "en-CA",
|
||||
organization: "Mozilla Corporation",
|
||||
recipient: "John Smith",
|
||||
phone: "+15195555555",
|
||||
|
@ -32,7 +32,7 @@ add_UITour_task(async function test_info_icon() {
|
||||
is(icon.src, imageURL, "Popup should have correct icon shown");
|
||||
|
||||
is(buttons.hasChildNodes(), false, "Popup should have no buttons");
|
||||
}),
|
||||
});
|
||||
|
||||
add_UITour_task(async function test_info_buttons_1() {
|
||||
let popup = document.getElementById("UITourTooltip");
|
||||
@ -119,7 +119,7 @@ add_UITour_task(async function test_info_buttons_2() {
|
||||
let returnValue = await waitForCallbackResultPromise();
|
||||
|
||||
is(returnValue.result, "button2", "Correct callback should have been called");
|
||||
}),
|
||||
});
|
||||
|
||||
add_UITour_task(async function test_info_close_button() {
|
||||
let closeButton = document.getElementById("UITourTooltipClose");
|
||||
@ -131,7 +131,7 @@ add_UITour_task(async function test_info_close_button() {
|
||||
let returnValue = await waitForCallbackResultPromise();
|
||||
|
||||
is(returnValue.result, "closeButton", "Close button callback called");
|
||||
}),
|
||||
});
|
||||
|
||||
add_UITour_task(async function test_info_target_callback() {
|
||||
let popup = document.getElementById("UITourTooltip");
|
||||
@ -150,7 +150,7 @@ add_UITour_task(async function test_info_target_callback() {
|
||||
await hideInfoPromise();
|
||||
|
||||
popup.removeAttribute("animate");
|
||||
}),
|
||||
});
|
||||
|
||||
add_UITour_task(async function test_getConfiguration_selectedSearchEngine() {
|
||||
await new Promise((resolve) => {
|
||||
|
@ -782,6 +782,11 @@ sitedata-cookies-exceptions =
|
||||
.label = Exceptions…
|
||||
.accesskey = E
|
||||
|
||||
# This is a warning message shown next to a yellow warning icon when the Cookies and Site Data subsection
|
||||
# in Preferences has been disabled due to Content Blocking being disabled. It is displayed next to the
|
||||
# Cookies and Site Data section.
|
||||
sitedata-warning-your-settings-prevent-changes = Your settings in Content Blocking are preventing changes to Cookies and Site Data settings.
|
||||
|
||||
## Privacy Section - Address Bar
|
||||
|
||||
addressbar-header = Address Bar
|
||||
|
@ -132,7 +132,7 @@ class AsyncTabSwitcher {
|
||||
// For telemetry, keeps track of what most recently cleared
|
||||
// the loadTimer, which can tell us something about the cause
|
||||
// of tab switch spinners.
|
||||
this._loadTimerClearedBy = "none",
|
||||
this._loadTimerClearedBy = "none";
|
||||
|
||||
this._useDumpForLogging = false;
|
||||
this._logInit = false;
|
||||
|
@ -521,7 +521,6 @@ class Automation(object):
|
||||
|
||||
# copy env so we don't munge the caller's environment
|
||||
env = dict(env);
|
||||
env["NO_EM_RESTART"] = "1"
|
||||
tmpfd, processLog = tempfile.mkstemp(suffix='pidlog')
|
||||
os.close(tmpfd)
|
||||
env["MOZ_PROCESS_LOG"] = processLog
|
||||
|
@ -350,8 +350,6 @@ module.exports = {
|
||||
"no-return-assign": "error",
|
||||
// Allow use of javascript: urls.
|
||||
"no-script-url": "off",
|
||||
// Disallow use of comma operator.
|
||||
"no-sequences": "error",
|
||||
// Warn about declaration of variables already declared in the outer scope.
|
||||
// This isn't an error because it sometimes is useful to use the same name
|
||||
// in a small helper function rather than having to come up with another
|
||||
|
@ -41,8 +41,6 @@ loader.lazyRequireGetter(this, "getHighlighterUtils",
|
||||
"devtools/client/framework/toolbox-highlighter-utils", true);
|
||||
loader.lazyRequireGetter(this, "Selection",
|
||||
"devtools/client/framework/selection", true);
|
||||
loader.lazyRequireGetter(this, "InspectorFront",
|
||||
"devtools/shared/fronts/inspector", true);
|
||||
loader.lazyRequireGetter(this, "flags",
|
||||
"devtools/shared/flags");
|
||||
loader.lazyRequireGetter(this, "KeyShortcuts",
|
||||
@ -2712,7 +2710,7 @@ Toolbox.prototype = {
|
||||
initInspector: function() {
|
||||
if (!this._initInspector) {
|
||||
this._initInspector = (async function() {
|
||||
this._inspector = InspectorFront(this._target.client, this._target.form);
|
||||
this._inspector = this.target.getFront("inspector");
|
||||
const pref = "devtools.inspector.showAllAnonymousContent";
|
||||
const showAllAnonymousContent = Services.prefs.getBoolPref(pref);
|
||||
this._walker = await this._inspector.getWalker({ showAllAnonymousContent });
|
||||
@ -2800,7 +2798,6 @@ Toolbox.prototype = {
|
||||
await this.highlighterUtils.stopPicker();
|
||||
}
|
||||
|
||||
await this._inspector.destroy();
|
||||
if (this._highlighter) {
|
||||
// Note that if the toolbox is closed, this will work fine, but will fail
|
||||
// in case the browser is closed and will trigger a noSuchActor message.
|
||||
|
@ -327,7 +327,12 @@ class FlexboxInspector {
|
||||
// Clear the flexbox panel if there is no flex container for the current node
|
||||
// selection.
|
||||
if (!flexboxFront) {
|
||||
this.store.dispatch(clearFlexbox());
|
||||
try {
|
||||
this.store.dispatch(clearFlexbox());
|
||||
} catch (e) {
|
||||
// This call might fail if called asynchrously after the toolbox is finished
|
||||
// closing.
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -248,9 +248,15 @@ class GridInspector {
|
||||
}
|
||||
|
||||
if (!gridFronts.length) {
|
||||
this.store.dispatch(updateGrids([]));
|
||||
this.inspector.emit("grid-panel-updated");
|
||||
return;
|
||||
try {
|
||||
this.store.dispatch(updateGrids([]));
|
||||
this.inspector.emit("grid-panel-updated");
|
||||
return;
|
||||
} catch (e) {
|
||||
// This call might fail if called asynchrously after the toolbox is finished
|
||||
// closing.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const currentUrl = this.inspector.target.url;
|
||||
|
@ -2024,7 +2024,7 @@ Inspector.prototype = {
|
||||
this.telemetry.scalarSet(TELEMETRY_EYEDROPPER_OPENED, 1);
|
||||
this.eyeDropperButton.classList.add("checked");
|
||||
this.startEyeDropperListeners();
|
||||
return this.inspector.pickColorFromPage(this.toolbox, {copyOnSelect: true})
|
||||
return this.inspector.pickColorFromPage({copyOnSelect: true})
|
||||
.catch(console.error);
|
||||
},
|
||||
|
||||
|
@ -31,7 +31,6 @@
|
||||
const { Cu } = require("chrome");
|
||||
|
||||
loader.lazyRequireGetter(this, "gDevToolsBrowser", "devtools/client/framework/devtools-browser", true);
|
||||
loader.lazyRequireGetter(this, "CommandUtils", "devtools/client/shared/developer-toolbar", true);
|
||||
loader.lazyRequireGetter(this, "TargetFactory", "devtools/client/framework/target", true);
|
||||
loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsive.html/manager", true);
|
||||
loader.lazyRequireGetter(this, "openDocLink", "devtools/client/shared/link", true);
|
||||
@ -96,11 +95,12 @@ exports.menuitems = [
|
||||
},
|
||||
{ id: "menu_eyedropper",
|
||||
l10nKey: "eyedropper",
|
||||
oncommand(event) {
|
||||
async oncommand(event) {
|
||||
const window = event.target.ownerDocument.defaultView;
|
||||
const target = TargetFactory.forTab(window.gBrowser.selectedTab);
|
||||
|
||||
CommandUtils.executeOnTarget(target, "eyedropper --frommenu");
|
||||
await target.makeRemote();
|
||||
const inspectorFront = await target.getFront("inspector");
|
||||
inspectorFront.pickColorFromPage({copyOnSelect: true, fromMenu: true});
|
||||
},
|
||||
checkbox: true
|
||||
},
|
||||
|
@ -174,7 +174,7 @@ class SwatchColorPickerTooltip extends SwatchBasedEditorTooltip {
|
||||
// resolves. Flip the flag early to avoid issues with onTooltipHidden().
|
||||
this.eyedropperOpen = true;
|
||||
|
||||
inspector.pickColorFromPage(toolbox, {copyOnSelect: false}).then(() => {
|
||||
inspector.pickColorFromPage({copyOnSelect: false}).then(() => {
|
||||
// close the colorpicker tooltip so that only the eyedropper is open.
|
||||
this.hide();
|
||||
|
||||
|
@ -233,6 +233,13 @@ ul.children + .tag-line::before {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.expandable.collapsed .markup-expand-badge {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
vertical-align: -3px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.expandable.collapsed .markup-expand-badge::before {
|
||||
/* Display an ellipsis character in collapsed nodes that can be expanded. */
|
||||
content: "";
|
||||
@ -243,11 +250,9 @@ ul.children + .tag-line::before {
|
||||
border: 1px solid var(--markup-badge-border-color);
|
||||
color: var(--markup-badge-color);
|
||||
fill: var(--markup-badge-interactive-color);
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
display: block;
|
||||
width: 12px;
|
||||
height: 8px;
|
||||
margin: 0 2px;
|
||||
line-height: 3px;
|
||||
border-radius: 3px;
|
||||
-moz-context-properties: fill;
|
||||
@ -403,10 +408,11 @@ ul.children + .tag-line::before {
|
||||
/* Markup Badges */
|
||||
.markup-badge {
|
||||
display: inline-block;
|
||||
/* 9px text is too blurry on low-resolution screens */
|
||||
font-size: 10px;
|
||||
font-weight: normal;
|
||||
line-height: 11px;
|
||||
vertical-align: 1px;
|
||||
vertical-align: 0.5px;
|
||||
border: 1px solid var(--markup-badge-border-color);
|
||||
border-radius: 3px;
|
||||
padding: 0px 2px;
|
||||
@ -419,6 +425,7 @@ ul.children + .tag-line::before {
|
||||
@media (min-resolution: 1.1dppx) {
|
||||
.markup-badge {
|
||||
font-size: 9px;
|
||||
vertical-align: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -287,6 +287,10 @@
|
||||
-moz-context-properties: fill;
|
||||
}
|
||||
|
||||
#command-button-responsive.checked::before {
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
#command-button-scratchpad::before {
|
||||
background-image: var(--command-scratchpad-image);
|
||||
}
|
||||
|
@ -85,7 +85,6 @@ exports.InspectorActor = protocol.ActorClassWithSpec(inspectorSpec, {
|
||||
|
||||
destroy: function() {
|
||||
protocol.Actor.prototype.destroy.call(this);
|
||||
|
||||
this.destroyEyeDropper();
|
||||
|
||||
this._highlighterPromise = null;
|
||||
|
@ -3,6 +3,11 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const Telemetry = require("devtools/client/shared/telemetry");
|
||||
const telemetry = new Telemetry();
|
||||
const TELEMETRY_EYEDROPPER_OPENED = "DEVTOOLS_EYEDROPPER_OPENED_COUNT";
|
||||
const TELEMETRY_EYEDROPPER_OPENED_MENU = "DEVTOOLS_MENU_EYEDROPPER_OPENED_COUNT";
|
||||
|
||||
const {
|
||||
Front,
|
||||
FrontClassWithSpec,
|
||||
@ -17,8 +22,6 @@ const {
|
||||
const defer = require("devtools/shared/defer");
|
||||
loader.lazyRequireGetter(this, "nodeConstants",
|
||||
"devtools/shared/dom-node-constants");
|
||||
loader.lazyRequireGetter(this, "CommandUtils",
|
||||
"devtools/client/shared/developer-toolbar", true);
|
||||
|
||||
/**
|
||||
* Client side of the DOM walker.
|
||||
@ -484,14 +487,13 @@ var InspectorFront = FrontClassWithSpec(inspectorSpec, {
|
||||
impl: "_getPageStyle"
|
||||
}),
|
||||
|
||||
pickColorFromPage: custom(async function(toolbox, options) {
|
||||
if (toolbox) {
|
||||
// If the eyedropper was already started using the gcli command, hide it so we don't
|
||||
// end up with 2 instances of the eyedropper on the page.
|
||||
CommandUtils.executeOnTarget(toolbox.target, "eyedropper --hide");
|
||||
}
|
||||
|
||||
pickColorFromPage: custom(async function(options) {
|
||||
await this._pickColorFromPage(options);
|
||||
if (options && options.fromMenu) {
|
||||
telemetry.getHistogramById(TELEMETRY_EYEDROPPER_OPENED_MENU).add(true);
|
||||
} else {
|
||||
telemetry.getHistogramById(TELEMETRY_EYEDROPPER_OPENED).add(true);
|
||||
}
|
||||
}, {
|
||||
impl: "_pickColorFromPage"
|
||||
})
|
||||
|
@ -82,7 +82,6 @@
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDocumentLoaderFactory.h"
|
||||
#include "nsIDOMStorage.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIEditingSession.h"
|
||||
#include "nsIExternalProtocolService.h"
|
||||
|
@ -516,6 +516,3 @@ counterlist.inputs = ['UseCounters.conf']
|
||||
|
||||
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
||||
CXXFLAGS += ['-Wno-error=shadow']
|
||||
|
||||
if CONFIG['CC_TYPE'] == 'clang-cl':
|
||||
AllowCompilerWarnings() # workaround for bug 1090497
|
||||
|
@ -4308,14 +4308,13 @@ nsDOMWindowUtils::RemoveManuallyManagedState(Element* aElement,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::GetStorageUsage(nsIDOMStorage* aStorage, int64_t* aRetval)
|
||||
nsDOMWindowUtils::GetStorageUsage(Storage* aStorage, int64_t* aRetval)
|
||||
{
|
||||
RefPtr<Storage> storage = static_cast<Storage*>(aStorage);
|
||||
if (!storage) {
|
||||
if (!aStorage) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
*aRetval = storage->GetOriginQuotaUsage();
|
||||
*aRetval = aStorage->GetOriginQuotaUsage();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -12641,6 +12641,11 @@ nsIDocument::SetUserHasInteracted(bool aUserHasInteracted)
|
||||
("Document %p has been interacted by user.", this));
|
||||
mUserHasInteracted = aUserHasInteracted;
|
||||
|
||||
nsCOMPtr<nsILoadInfo> loadInfo = mChannel ? mChannel->GetLoadInfo() : nullptr;
|
||||
if (loadInfo) {
|
||||
loadInfo->SetDocumentHasUserInteracted(aUserHasInteracted);
|
||||
}
|
||||
|
||||
if (aUserHasInteracted) {
|
||||
MaybeAllowStorageForOpener();
|
||||
}
|
||||
|
@ -4795,7 +4795,7 @@ nsGlobalWindowInner::GetSessionStorage(ErrorResult& aError)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMStorage> storage;
|
||||
RefPtr<Storage> storage;
|
||||
aError = storageManager->CreateStorage(this, principal, documentURI,
|
||||
IsPrivateBrowsing(),
|
||||
getter_AddRefs(storage));
|
||||
@ -4803,7 +4803,7 @@ nsGlobalWindowInner::GetSessionStorage(ErrorResult& aError)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
mSessionStorage = static_cast<Storage*>(storage.get());
|
||||
mSessionStorage = storage;
|
||||
MOZ_ASSERT(mSessionStorage);
|
||||
|
||||
MOZ_LOG(gDOMLeakPRLogInner, LogLevel::Debug,
|
||||
@ -4856,7 +4856,7 @@ nsGlobalWindowInner::GetLocalStorage(ErrorResult& aError)
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMStorage> storage;
|
||||
RefPtr<Storage> storage;
|
||||
aError = storageManager->CreateStorage(this, principal, documentURI,
|
||||
IsPrivateBrowsing(),
|
||||
getter_AddRefs(storage));
|
||||
@ -4864,7 +4864,7 @@ nsGlobalWindowInner::GetLocalStorage(ErrorResult& aError)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
mLocalStorage = static_cast<Storage*>(storage.get());
|
||||
mLocalStorage = storage;
|
||||
MOZ_ASSERT(mLocalStorage);
|
||||
}
|
||||
|
||||
@ -5684,7 +5684,7 @@ nsGlobalWindowInner::ObserveStorageNotification(StorageEvent* aEvent,
|
||||
eventType.AssignLiteral("storage");
|
||||
|
||||
if (!NS_strcmp(aStorageType, u"sessionStorage")) {
|
||||
nsCOMPtr<nsIDOMStorage> changingStorage = aEvent->GetStorageArea();
|
||||
RefPtr<Storage> changingStorage = aEvent->GetStorageArea();
|
||||
MOZ_ASSERT(changingStorage);
|
||||
|
||||
bool check = false;
|
||||
|
@ -2046,10 +2046,10 @@ nsGlobalWindowOuter::PreloadLocalStorage()
|
||||
// private browsing windows do not persist local storage to disk so we should
|
||||
// only try to precache storage when we're not a private browsing window.
|
||||
if (principal->GetPrivateBrowsingId() == 0) {
|
||||
nsCOMPtr<nsIDOMStorage> storage;
|
||||
RefPtr<Storage> storage;
|
||||
rv = storageManager->PrecacheStorage(principal, getter_AddRefs(storage));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mLocalStorage = static_cast<Storage*>(storage.get());
|
||||
mLocalStorage = storage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ function* testSteps()
|
||||
is(objectStore.keyPath, info.options && info.options.keyPath ?
|
||||
info.options.keyPath : null,
|
||||
"Bad keyPath");
|
||||
if (objectStore.indexNames.length, 0, "Bad indexNames");
|
||||
is(objectStore.indexNames.length, 0, "Bad indexNames");
|
||||
|
||||
ok(event.target.transaction, "event has a transaction");
|
||||
ok(event.target.transaction.db === db, "transaction has the right db");
|
||||
|
@ -42,7 +42,6 @@ interface nsITranslationNodeList;
|
||||
interface nsIJSRAIIHelper;
|
||||
interface nsIContentPermissionRequest;
|
||||
interface nsIObserver;
|
||||
interface nsIDOMStorage;
|
||||
|
||||
webidl Animation;
|
||||
webidl DOMRect;
|
||||
@ -51,6 +50,7 @@ webidl EventTarget;
|
||||
webidl Event;
|
||||
webidl Node;
|
||||
webidl NodeList;
|
||||
webidl Storage;
|
||||
|
||||
[scriptable, uuid(4d6732ca-9da7-4176-b8a1-8dde15cd0bf9)]
|
||||
interface nsIDOMWindowUtils : nsISupports {
|
||||
@ -1901,7 +1901,7 @@ interface nsIDOMWindowUtils : nsISupports {
|
||||
* @param aStorage
|
||||
* The storage object to get usage data for.
|
||||
*/
|
||||
int64_t getStorageUsage(in nsIDOMStorage aStorage);
|
||||
int64_t getStorageUsage(in Storage aStorage);
|
||||
|
||||
/**
|
||||
* Returns the directionality of a string using the first-strong character
|
||||
|
@ -17,7 +17,6 @@ interface nsIPaymentAddress : nsISupports
|
||||
readonly attribute AString dependentLocality;
|
||||
readonly attribute AString postalCode;
|
||||
readonly attribute AString sortingCode;
|
||||
readonly attribute AString languageCode;
|
||||
readonly attribute AString organization;
|
||||
readonly attribute AString recipient;
|
||||
readonly attribute AString phone;
|
||||
@ -29,7 +28,6 @@ interface nsIPaymentAddress : nsISupports
|
||||
in AString aDependentLocality,
|
||||
in AString aPostalCode,
|
||||
in AString aSortingCode,
|
||||
in AString aLanguageCode,
|
||||
in AString aOrganization,
|
||||
in AString aRecipient,
|
||||
in AString aPhone);
|
||||
|
@ -8,7 +8,6 @@ with Files("**"):
|
||||
BUG_COMPONENT = ("Core", "DOM")
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'nsIDOMStorage.idl',
|
||||
'nsIDOMStorageManager.idl',
|
||||
'nsIStorageActivityService.idl',
|
||||
]
|
||||
|
@ -1,16 +0,0 @@
|
||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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 "domstubs.idl"
|
||||
|
||||
/**
|
||||
* Empty interface for client side storage. DOMStorage is now ported to WebIDL
|
||||
* but we still need an XPConnect interface for casting.
|
||||
*/
|
||||
|
||||
[scriptable, uuid(425a33f0-e0e9-45e7-a95f-9908bd6ae988)]
|
||||
interface nsIDOMStorage : nsISupports
|
||||
{
|
||||
};
|
@ -5,10 +5,11 @@
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIDOMStorage;
|
||||
interface nsIPrincipal;
|
||||
interface mozIDOMWindow;
|
||||
|
||||
webidl Storage;
|
||||
|
||||
/**
|
||||
* General purpose interface that has two implementations, for localStorage
|
||||
* resp. sessionStorage with "@mozilla.org/dom/localStorage-manager;1" resp.
|
||||
@ -28,7 +29,7 @@ interface nsIDOMStorageManager : nsISupports
|
||||
* existence and kept alive by the timer so that it could be returned if a
|
||||
* call to createStorage was made due to a request by the page.)
|
||||
*/
|
||||
nsIDOMStorage precacheStorage(in nsIPrincipal aPrincipal);
|
||||
Storage precacheStorage(in nsIPrincipal aPrincipal);
|
||||
|
||||
/**
|
||||
* Returns instance of DOM storage object for given principal.
|
||||
@ -44,10 +45,10 @@ interface nsIDOMStorageManager : nsISupports
|
||||
* @param aPrivate
|
||||
* Whether the demanding document is running in Private Browsing mode or not.
|
||||
*/
|
||||
nsIDOMStorage createStorage(in mozIDOMWindow aWindow,
|
||||
in nsIPrincipal aPrincipal,
|
||||
in DOMString aDocumentURI,
|
||||
[optional] in bool aPrivate);
|
||||
Storage createStorage(in mozIDOMWindow aWindow,
|
||||
in nsIPrincipal aPrincipal,
|
||||
in DOMString aDocumentURI,
|
||||
[optional] in bool aPrivate);
|
||||
/**
|
||||
* Returns instance of DOM storage object for given principal.
|
||||
* If there is no storage managed for the scope, then null is returned and
|
||||
@ -61,9 +62,9 @@ interface nsIDOMStorageManager : nsISupports
|
||||
* @param aPrivate
|
||||
* Whether the demanding document is running in Private Browsing mode or not.
|
||||
*/
|
||||
nsIDOMStorage getStorage(in mozIDOMWindow aWindow,
|
||||
in nsIPrincipal aPrincipal,
|
||||
[optional] in bool aPrivate);
|
||||
Storage getStorage(in mozIDOMWindow aWindow,
|
||||
in nsIPrincipal aPrincipal,
|
||||
[optional] in bool aPrivate);
|
||||
|
||||
/**
|
||||
* Clones given storage into this storage manager.
|
||||
@ -74,7 +75,7 @@ interface nsIDOMStorageManager : nsISupports
|
||||
* the moment this method was called. Modification to this new object will
|
||||
* not affect the original storage content we cloned from and vice versa.
|
||||
*/
|
||||
void cloneStorage(in nsIDOMStorage aStorageToCloneFrom);
|
||||
void cloneStorage(in Storage aStorageToCloneFrom);
|
||||
|
||||
/**
|
||||
* Returns true if the storage belongs to the given principal and is managed
|
||||
@ -91,5 +92,5 @@ interface nsIDOMStorageManager : nsISupports
|
||||
* false otherwise
|
||||
*/
|
||||
bool checkStorage(in nsIPrincipal aPrincipal,
|
||||
in nsIDOMStorage aStorage);
|
||||
in Storage aStorage);
|
||||
};
|
||||
|
@ -39,8 +39,9 @@ runWithMSE(async (ms, v) => {
|
||||
await fetchAndLoad(sb, "bipbop/bipbop_480_624kbps-video", ["1"], ".m4s");
|
||||
ms.endOfStream();
|
||||
await Promise.all([once(ms, "sourceended"), once(v, "playing"), once(v, "ended")]);
|
||||
if (v.width, 640, "has proper width");
|
||||
if (v.height, 480, "has proper height");
|
||||
// These tests are permafailing
|
||||
// is(v.width, 640, "has proper width");
|
||||
// is(v.height, 480, "has proper height");
|
||||
SimpleTest.finish();
|
||||
});
|
||||
</script>
|
||||
|
@ -40,7 +40,6 @@ namespace dom {
|
||||
#define DependentLocality NS_LITERAL_STRING("dependentLocality")
|
||||
#define PostalCode NS_LITERAL_STRING("postalCode")
|
||||
#define SortingCode NS_LITERAL_STRING("sortingCode")
|
||||
#define LanguageCode NS_LITERAL_STRING("languageCode")
|
||||
#define Organization NS_LITERAL_STRING("organization")
|
||||
#define Recipient NS_LITERAL_STRING("recipient")
|
||||
#define Phone NS_LITERAL_STRING("phone")
|
||||
@ -119,7 +118,6 @@ bool IsAddressKey(const nsAString& aKey)
|
||||
DependentLocality.Equals(aKey) ||
|
||||
PostalCode.Equals(aKey) ||
|
||||
SortingCode.Equals(aKey) ||
|
||||
LanguageCode.Equals(aKey) ||
|
||||
Organization.Equals(aKey) ||
|
||||
Recipient.Equals(aKey) ||
|
||||
Phone.Equals(aKey);
|
||||
@ -264,7 +262,6 @@ BasicCardService::EncodeBasicCardData(const nsAString& aCardholderName,
|
||||
EncodeAddressProperty(aBillingAddress, DependentLocality, aResult);
|
||||
EncodeAddressProperty(aBillingAddress, PostalCode, aResult);
|
||||
EncodeAddressProperty(aBillingAddress, SortingCode, aResult);
|
||||
EncodeAddressProperty(aBillingAddress, LanguageCode, aResult);
|
||||
EncodeAddressProperty(aBillingAddress, Organization, aResult);
|
||||
EncodeAddressProperty(aBillingAddress, Recipient, aResult);
|
||||
EncodeAddressProperty(aBillingAddress, Phone, aResult);
|
||||
@ -285,7 +282,6 @@ BasicCardService::DecodeBasicCardData(const nsAString& aData,
|
||||
nsAutoString dependentLocality;
|
||||
nsAutoString postalCode;
|
||||
nsAutoString sortingCode;
|
||||
nsAutoString languageCode;
|
||||
nsAutoString organization;
|
||||
nsAutoString recipient;
|
||||
nsAutoString phone;
|
||||
@ -319,7 +315,6 @@ BasicCardService::DecodeBasicCardData(const nsAString& aData,
|
||||
DecodeAddressProperty(key, value, DependentLocality, dependentLocality);
|
||||
DecodeAddressProperty(key, value, PostalCode, postalCode);
|
||||
DecodeAddressProperty(key, value, SortingCode, sortingCode);
|
||||
DecodeAddressProperty(key, value, LanguageCode, languageCode);
|
||||
DecodeAddressProperty(key, value, Organization, organization);
|
||||
DecodeAddressProperty(key, value, Recipient, recipient);
|
||||
DecodeAddressProperty(key, value, Phone, phone);
|
||||
@ -341,7 +336,6 @@ BasicCardService::DecodeBasicCardData(const nsAString& aData,
|
||||
dependentLocality,
|
||||
postalCode,
|
||||
sortingCode,
|
||||
languageCode,
|
||||
organization,
|
||||
recipient,
|
||||
phone);
|
||||
@ -376,7 +370,6 @@ BasicCardService::DecodeBasicCardData(const nsAString& aData,
|
||||
#undef DependentLocality
|
||||
#undef PostalCode
|
||||
#undef SortingCode
|
||||
#undef LanguageCode
|
||||
#undef Organization
|
||||
#undef Recipient
|
||||
#undef Phone
|
||||
|
@ -28,7 +28,6 @@ PaymentAddress::PaymentAddress(nsPIDOMWindowInner* aWindow,
|
||||
const nsAString& aDependentLocality,
|
||||
const nsAString& aPostalCode,
|
||||
const nsAString& aSortingCode,
|
||||
const nsAString& aLanguageCode,
|
||||
const nsAString& aOrganization,
|
||||
const nsAString& aRecipient,
|
||||
const nsAString& aPhone)
|
||||
@ -39,7 +38,6 @@ PaymentAddress::PaymentAddress(nsPIDOMWindowInner* aWindow,
|
||||
, mDependentLocality(aDependentLocality)
|
||||
, mPostalCode(aPostalCode)
|
||||
, mSortingCode(aSortingCode)
|
||||
, mLanguageCode(aLanguageCode)
|
||||
, mOrganization(aOrganization)
|
||||
, mRecipient(aRecipient)
|
||||
, mPhone(aPhone)
|
||||
@ -89,12 +87,6 @@ PaymentAddress::GetSortingCode(nsAString& aRetVal) const
|
||||
aRetVal = mSortingCode;
|
||||
}
|
||||
|
||||
void
|
||||
PaymentAddress::GetLanguageCode(nsAString& aRetVal) const
|
||||
{
|
||||
aRetVal = mLanguageCode;
|
||||
}
|
||||
|
||||
void
|
||||
PaymentAddress::GetOrganization(nsAString& aRetVal) const
|
||||
{
|
||||
|
@ -28,7 +28,6 @@ public:
|
||||
const nsAString& aDependentLocality,
|
||||
const nsAString& aPostalCode,
|
||||
const nsAString& aSortingCode,
|
||||
const nsAString& aLanguageCode,
|
||||
const nsAString& aOrganization,
|
||||
const nsAString& aRecipient,
|
||||
const nsAString& aPhone);
|
||||
@ -56,8 +55,6 @@ public:
|
||||
|
||||
void GetSortingCode(nsAString& aRetVal) const;
|
||||
|
||||
void GetLanguageCode(nsAString& aRetVal) const;
|
||||
|
||||
void GetOrganization(nsAString& aRetVal) const;
|
||||
|
||||
void GetRecipient(nsAString& aRetVal) const;
|
||||
@ -74,7 +71,6 @@ private:
|
||||
nsString mDependentLocality;
|
||||
nsString mPostalCode;
|
||||
nsString mSortingCode;
|
||||
nsString mLanguageCode;
|
||||
nsString mOrganization;
|
||||
nsString mRecipient;
|
||||
nsString mPhone;
|
||||
|
@ -973,7 +973,6 @@ PaymentRequest::UpdateShippingAddress(const nsAString& aCountry,
|
||||
const nsAString& aDependentLocality,
|
||||
const nsAString& aPostalCode,
|
||||
const nsAString& aSortingCode,
|
||||
const nsAString& aLanguageCode,
|
||||
const nsAString& aOrganization,
|
||||
const nsAString& aRecipient,
|
||||
const nsAString& aPhone)
|
||||
@ -981,11 +980,11 @@ PaymentRequest::UpdateShippingAddress(const nsAString& aCountry,
|
||||
nsTArray<nsString> emptyArray;
|
||||
mShippingAddress = new PaymentAddress(GetOwner(), aCountry, emptyArray,
|
||||
aRegion, aCity, aDependentLocality,
|
||||
aPostalCode, aSortingCode, aLanguageCode,
|
||||
aPostalCode, aSortingCode,
|
||||
EmptyString(), EmptyString(), EmptyString());
|
||||
mFullShippingAddress = new PaymentAddress(GetOwner(), aCountry, aAddressLine,
|
||||
aRegion, aCity, aDependentLocality,
|
||||
aPostalCode, aSortingCode, aLanguageCode,
|
||||
aPostalCode, aSortingCode,
|
||||
aOrganization, aRecipient, aPhone);
|
||||
// Fire shippingaddresschange event
|
||||
return DispatchUpdateEvent(NS_LITERAL_STRING("shippingaddresschange"));
|
||||
|
@ -128,7 +128,6 @@ public:
|
||||
const nsAString& aDependentLocality,
|
||||
const nsAString& aPostalCode,
|
||||
const nsAString& aSortingCode,
|
||||
const nsAString& aLanguageCode,
|
||||
const nsAString& aOrganization,
|
||||
const nsAString& aRecipient,
|
||||
const nsAString& aPhone);
|
||||
|
@ -741,7 +741,6 @@ PaymentAddress::Init(const nsAString& aCountry,
|
||||
const nsAString& aDependentLocality,
|
||||
const nsAString& aPostalCode,
|
||||
const nsAString& aSortingCode,
|
||||
const nsAString& aLanguageCode,
|
||||
const nsAString& aOrganization,
|
||||
const nsAString& aRecipient,
|
||||
const nsAString& aPhone)
|
||||
@ -753,7 +752,6 @@ PaymentAddress::Init(const nsAString& aCountry,
|
||||
mDependentLocality = aDependentLocality;
|
||||
mPostalCode = aPostalCode;
|
||||
mSortingCode = aSortingCode;
|
||||
mLanguageCode = aLanguageCode;
|
||||
mOrganization = aOrganization;
|
||||
mRecipient = aRecipient;
|
||||
mPhone = aPhone;
|
||||
@ -811,13 +809,6 @@ PaymentAddress::GetSortingCode(nsAString& aSortingCode)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PaymentAddress::GetLanguageCode(nsAString& aLanguageCode)
|
||||
{
|
||||
aLanguageCode = mLanguageCode;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PaymentAddress::GetOrganization(nsAString& aOrganization)
|
||||
{
|
||||
|
@ -220,7 +220,6 @@ private:
|
||||
nsString mDependentLocality;
|
||||
nsString mPostalCode;
|
||||
nsString mSortingCode;
|
||||
nsString mLanguageCode;
|
||||
nsString mOrganization;
|
||||
nsString mRecipient;
|
||||
nsString mPhone;
|
||||
|
@ -619,7 +619,6 @@ PaymentRequestManager::ChangeShippingAddress(PaymentRequest* aRequest,
|
||||
aAddress.dependentLocality(),
|
||||
aAddress.postalCode(),
|
||||
aAddress.sortingCode(),
|
||||
aAddress.languageCode(),
|
||||
aAddress.organization(),
|
||||
aAddress.recipient(),
|
||||
aAddress.phone());
|
||||
|
@ -167,7 +167,6 @@ struct IPCPaymentAddress
|
||||
nsString dependentLocality;
|
||||
nsString postalCode;
|
||||
nsString sortingCode;
|
||||
nsString languageCode;
|
||||
nsString organization;
|
||||
nsString recipient;
|
||||
nsString phone;
|
||||
|
@ -314,10 +314,6 @@ PaymentRequestParent::ChangeShippingAddress(const nsAString& aRequestId,
|
||||
rv = aAddress->GetSortingCode(sortingCode);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsAutoString languageCode;
|
||||
rv = aAddress->GetLanguageCode(languageCode);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsAutoString organization;
|
||||
rv = aAddress->GetOrganization(organization);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
@ -345,7 +341,7 @@ PaymentRequestParent::ChangeShippingAddress(const nsAString& aRequestId,
|
||||
|
||||
IPCPaymentAddress ipcAddress(country, addressLine, region, city,
|
||||
dependentLocality, postalCode, sortingCode,
|
||||
languageCode, organization, recipient, phone);
|
||||
organization, recipient, phone);
|
||||
|
||||
nsAutoString requestId(aRequestId);
|
||||
if (!SendChangeShippingAddress(requestId, ipcAddress)) {
|
||||
|
@ -24,7 +24,6 @@ billingAddress.init("USA", // country
|
||||
"", // dependent locality
|
||||
"94066", // postal code
|
||||
"123456", // sorting code
|
||||
"en", // language code
|
||||
"", // organization
|
||||
"Bill A. Pacheco", // recipient
|
||||
"+14344413879"); // phone
|
||||
|
@ -24,7 +24,6 @@ shippingAddress.init("", // country
|
||||
"", // dependent locality
|
||||
"", // postal code
|
||||
"", // sorting code
|
||||
"", // language code
|
||||
"", // organization
|
||||
"", // recipient
|
||||
""); // phone
|
||||
|
@ -30,7 +30,6 @@ shippingAddress.init("USA", // country
|
||||
"Test locality", // dependent locality
|
||||
"94066", // postal code
|
||||
"123456", // sorting code
|
||||
"en", // language code
|
||||
"Testing Org", // organization
|
||||
"Bill A. Pacheco", // recipient
|
||||
"+1-434-441-3879"); // phone
|
||||
|
@ -27,7 +27,6 @@ shippingAddress.init("USA", // country
|
||||
"Test locality", // dependent locality
|
||||
"94066", // postal code
|
||||
"123456", // sorting code
|
||||
"en", // language code
|
||||
"Testing Org", // organization
|
||||
"Bill A. Pacheco", // recipient
|
||||
"+1-434-441-3879"); // phone
|
||||
@ -103,10 +102,6 @@ function checkAddressErrors(errors) {
|
||||
emitTestFail("Expect shippingAddressErrors.dependentLocality as 'dependentLocality error', but got" +
|
||||
errors.dependentLocality);
|
||||
}
|
||||
if (errors.languageCode != "languageCode error") {
|
||||
emitTestFail("Expect shippingAddressErrors.languageCode as 'languageCode error', but got" +
|
||||
errors.languageCode);
|
||||
}
|
||||
if (errors.organization != "organization error") {
|
||||
emitTestFail("Expect shippingAddressErrors.organization as 'organization error', but got" +
|
||||
errors.organization);
|
||||
|
@ -224,7 +224,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1375345
|
||||
is(billingAddress.dependentLocality, "", "dependentLocality should be empty.");
|
||||
is(billingAddress.postalCode, "94066", "postalCode should be '94066'.");
|
||||
is(billingAddress.sortingCode, "123456", "sortingCode should be '123456'.");
|
||||
is(billingAddress.languageCode, "en", "languageCode should be 'en'.");
|
||||
is(billingAddress.organization, "", "organization should be empty." );
|
||||
is(billingAddress.recipient, "Bill A. Pacheco", "recipient should be 'Bill A. Pacheco'.");
|
||||
is(billingAddress.phone, "+14344413879", "phone should be '+14344413879'.");
|
||||
|
@ -31,7 +31,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1435157
|
||||
city: "city error",
|
||||
country: "country error",
|
||||
dependentLocality: "dependentLocality error",
|
||||
languageCode: "languageCode error",
|
||||
organization: "organization error",
|
||||
phone: "phone error",
|
||||
postalCode: "postalCode error",
|
||||
|
@ -5,6 +5,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsSMILParserUtils.h"
|
||||
#include "mozilla/TextUtils.h"
|
||||
#include "nsSMILKeySpline.h"
|
||||
#include "nsISMILAttr.h"
|
||||
#include "nsSMILValue.h"
|
||||
@ -64,22 +65,22 @@ ParseSecondsOrMinutes(RangedPtr<const char16_t>& aIter,
|
||||
const RangedPtr<const char16_t>& aEnd,
|
||||
uint32_t& aValue)
|
||||
{
|
||||
if (aIter == aEnd || !SVGContentUtils::IsDigit(*aIter)) {
|
||||
if (aIter == aEnd || !mozilla::IsAsciiDigit(*aIter)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
RangedPtr<const char16_t> iter(aIter);
|
||||
|
||||
if (++iter == aEnd || !SVGContentUtils::IsDigit(*iter)) {
|
||||
if (++iter == aEnd || !mozilla::IsAsciiDigit(*iter)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t value = 10 * SVGContentUtils::DecimalDigitValue(*aIter) +
|
||||
SVGContentUtils::DecimalDigitValue(*iter);
|
||||
uint32_t value = 10 * mozilla::AsciiAlphanumericToNumber(*aIter) +
|
||||
mozilla::AsciiAlphanumericToNumber(*iter);
|
||||
if (value > 59) {
|
||||
return false;
|
||||
}
|
||||
if (++iter != aEnd && SVGContentUtils::IsDigit(*iter)) {
|
||||
if (++iter != aEnd && mozilla::IsAsciiDigit(*iter)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -676,7 +677,7 @@ nsSMILParserUtils::CheckForNegativeNumber(const nsAString& aStr)
|
||||
if (iter != end && *iter == '-') {
|
||||
++iter;
|
||||
// Check for numeric character
|
||||
if (iter != end && SVGContentUtils::IsDigit(*iter)) {
|
||||
if (iter != end && mozilla::IsAsciiDigit(*iter)) {
|
||||
absValLocation = iter - start;
|
||||
}
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ LocalStorageManager::GetStorageInternal(CreateMode aCreateMode,
|
||||
nsIPrincipal* aPrincipal,
|
||||
const nsAString& aDocumentURI,
|
||||
bool aPrivate,
|
||||
nsIDOMStorage** aRetval)
|
||||
Storage** aRetval)
|
||||
{
|
||||
nsAutoCString originAttrSuffix;
|
||||
nsAutoCString originKey;
|
||||
@ -287,7 +287,7 @@ LocalStorageManager::GetStorageInternal(CreateMode aCreateMode,
|
||||
if (aRetval) {
|
||||
nsCOMPtr<nsPIDOMWindowInner> inner = nsPIDOMWindowInner::From(aWindow);
|
||||
|
||||
nsCOMPtr<nsIDOMStorage> storage = new LocalStorage(
|
||||
RefPtr<Storage> storage = new LocalStorage(
|
||||
inner, this, cache, aDocumentURI, aPrincipal, aPrivate);
|
||||
storage.forget(aRetval);
|
||||
}
|
||||
@ -297,7 +297,7 @@ LocalStorageManager::GetStorageInternal(CreateMode aCreateMode,
|
||||
|
||||
NS_IMETHODIMP
|
||||
LocalStorageManager::PrecacheStorage(nsIPrincipal* aPrincipal,
|
||||
nsIDOMStorage** aRetval)
|
||||
Storage** aRetval)
|
||||
{
|
||||
return GetStorageInternal(CreateMode::CreateIfShouldPreload, nullptr,
|
||||
aPrincipal, EmptyString(), false, aRetval);
|
||||
@ -308,7 +308,7 @@ LocalStorageManager::CreateStorage(mozIDOMWindow* aWindow,
|
||||
nsIPrincipal* aPrincipal,
|
||||
const nsAString& aDocumentURI,
|
||||
bool aPrivate,
|
||||
nsIDOMStorage** aRetval)
|
||||
Storage** aRetval)
|
||||
{
|
||||
return GetStorageInternal(CreateMode::CreateAlways, aWindow, aPrincipal,
|
||||
aDocumentURI, aPrivate, aRetval);
|
||||
@ -318,14 +318,14 @@ NS_IMETHODIMP
|
||||
LocalStorageManager::GetStorage(mozIDOMWindow* aWindow,
|
||||
nsIPrincipal* aPrincipal,
|
||||
bool aPrivate,
|
||||
nsIDOMStorage** aRetval)
|
||||
Storage** aRetval)
|
||||
{
|
||||
return GetStorageInternal(CreateMode::UseIfExistsNeverCreate, aWindow,
|
||||
aPrincipal, EmptyString(), aPrivate, aRetval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
LocalStorageManager::CloneStorage(nsIDOMStorage* aStorage)
|
||||
LocalStorageManager::CloneStorage(Storage* aStorage)
|
||||
{
|
||||
// Cloning is supported only for sessionStorage
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
@ -333,16 +333,15 @@ LocalStorageManager::CloneStorage(nsIDOMStorage* aStorage)
|
||||
|
||||
NS_IMETHODIMP
|
||||
LocalStorageManager::CheckStorage(nsIPrincipal* aPrincipal,
|
||||
nsIDOMStorage* aStorage,
|
||||
Storage* aStorage,
|
||||
bool* aRetval)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
RefPtr<LocalStorage> storage = static_cast<LocalStorage*>(aStorage);
|
||||
if (!storage) {
|
||||
if (!aStorage || aStorage->Type() != Storage::eLocalStorage) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
RefPtr<LocalStorage> storage = static_cast<LocalStorage*>(aStorage);
|
||||
|
||||
*aRetval = false;
|
||||
|
||||
if (!aPrincipal) {
|
||||
@ -351,7 +350,7 @@ LocalStorageManager::CheckStorage(nsIPrincipal* aPrincipal,
|
||||
|
||||
nsAutoCString suffix;
|
||||
nsAutoCString origin;
|
||||
rv = GenerateOriginKey(aPrincipal, suffix, origin);
|
||||
nsresult rv = GenerateOriginKey(aPrincipal, suffix, origin);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ private:
|
||||
nsIPrincipal* aPrincipal,
|
||||
const nsAString& aDocumentURI,
|
||||
bool aPrivate,
|
||||
nsIDOMStorage** aRetval);
|
||||
Storage** aRetval);
|
||||
|
||||
// Suffix->origin->cache map
|
||||
typedef nsTHashtable<LocalStorageCacheHashKey> CacheOriginHashtable;
|
||||
|
@ -37,7 +37,7 @@ SessionStorageManager::~SessionStorageManager()
|
||||
|
||||
NS_IMETHODIMP
|
||||
SessionStorageManager::PrecacheStorage(nsIPrincipal* aPrincipal,
|
||||
nsIDOMStorage** aRetval)
|
||||
Storage** aRetval)
|
||||
{
|
||||
// Nothing to preload.
|
||||
return NS_OK;
|
||||
@ -48,7 +48,7 @@ SessionStorageManager::CreateStorage(mozIDOMWindow* aWindow,
|
||||
nsIPrincipal* aPrincipal,
|
||||
const nsAString& aDocumentURI,
|
||||
bool aPrivate,
|
||||
nsIDOMStorage** aRetval)
|
||||
Storage** aRetval)
|
||||
{
|
||||
nsAutoCString originKey;
|
||||
nsAutoCString originAttributes;
|
||||
@ -82,7 +82,7 @@ NS_IMETHODIMP
|
||||
SessionStorageManager::GetStorage(mozIDOMWindow* aWindow,
|
||||
nsIPrincipal* aPrincipal,
|
||||
bool aPrivate,
|
||||
nsIDOMStorage** aRetval)
|
||||
Storage** aRetval)
|
||||
{
|
||||
*aRetval = nullptr;
|
||||
|
||||
@ -113,20 +113,19 @@ SessionStorageManager::GetStorage(mozIDOMWindow* aWindow,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
SessionStorageManager::CloneStorage(nsIDOMStorage* aStorage)
|
||||
SessionStorageManager::CloneStorage(Storage* aStorage)
|
||||
{
|
||||
if (NS_WARN_IF(!aStorage)) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
RefPtr<Storage> storage = static_cast<Storage*>(aStorage);
|
||||
if (storage->Type() != Storage::eSessionStorage) {
|
||||
if (aStorage->Type() != Storage::eSessionStorage) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
nsAutoCString originKey;
|
||||
nsAutoCString originAttributes;
|
||||
nsresult rv = GenerateOriginKey(storage->Principal(), originAttributes,
|
||||
nsresult rv = GenerateOriginKey(aStorage->Principal(), originAttributes,
|
||||
originKey);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
@ -153,7 +152,7 @@ SessionStorageManager::CloneStorage(nsIDOMStorage* aStorage)
|
||||
|
||||
NS_IMETHODIMP
|
||||
SessionStorageManager::CheckStorage(nsIPrincipal* aPrincipal,
|
||||
nsIDOMStorage* aStorage,
|
||||
Storage* aStorage,
|
||||
bool* aRetval)
|
||||
{
|
||||
if (NS_WARN_IF(!aStorage)) {
|
||||
@ -183,8 +182,7 @@ SessionStorageManager::CheckStorage(nsIPrincipal* aPrincipal,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
RefPtr<Storage> storage = static_cast<Storage*>(aStorage);
|
||||
if (storage->Type() != Storage::eSessionStorage) {
|
||||
if (aStorage->Type() != Storage::eSessionStorage) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -194,7 +192,7 @@ SessionStorageManager::CheckStorage(nsIPrincipal* aPrincipal,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (!StorageUtils::PrincipalsEqual(storage->Principal(), aPrincipal)) {
|
||||
if (!StorageUtils::PrincipalsEqual(aStorage->Principal(), aPrincipal)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -23,8 +23,7 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(Storage)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Storage)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMStorage)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMStorage)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
Storage::Storage(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal)
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "nsIDOMStorage.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsWrapperCache.h"
|
||||
@ -22,13 +21,12 @@ class nsPIDOMWindowInner;
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class Storage : public nsIDOMStorage
|
||||
class Storage : public nsISupports
|
||||
, public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(Storage,
|
||||
nsIDOMStorage)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Storage)
|
||||
|
||||
Storage(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal);
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "mozilla/dom/SVGSVGElement.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "mozilla/SVGContextPaint.h"
|
||||
#include "mozilla/TextUtils.h"
|
||||
#include "nsComputedDOMStyle.h"
|
||||
#include "nsFontMetrics.h"
|
||||
#include "nsIFrame.h"
|
||||
@ -651,13 +652,13 @@ ParseNumber(RangedPtr<const char16_t>& aIter,
|
||||
bool gotDot = *aIter == '.';
|
||||
|
||||
if (!gotDot) {
|
||||
if (!SVGContentUtils::IsDigit(*aIter)) {
|
||||
if (!mozilla::IsAsciiDigit(*aIter)) {
|
||||
return false;
|
||||
}
|
||||
do {
|
||||
intPart = 10.0 * intPart + SVGContentUtils::DecimalDigitValue(*aIter);
|
||||
intPart = 10.0 * intPart + mozilla::AsciiAlphanumericToNumber(*aIter);
|
||||
++aIter;
|
||||
} while (aIter != aEnd && SVGContentUtils::IsDigit(*aIter));
|
||||
} while (aIter != aEnd && mozilla::IsAsciiDigit(*aIter));
|
||||
|
||||
if (aIter != aEnd) {
|
||||
gotDot = *aIter == '.';
|
||||
@ -669,7 +670,7 @@ ParseNumber(RangedPtr<const char16_t>& aIter,
|
||||
|
||||
if (gotDot) {
|
||||
++aIter;
|
||||
if (aIter == aEnd || !SVGContentUtils::IsDigit(*aIter)) {
|
||||
if (aIter == aEnd || !mozilla::IsAsciiDigit(*aIter)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -677,10 +678,10 @@ ParseNumber(RangedPtr<const char16_t>& aIter,
|
||||
double divisor = 1.0;
|
||||
|
||||
do {
|
||||
fracPart = 10.0 * fracPart + SVGContentUtils::DecimalDigitValue(*aIter);
|
||||
fracPart = 10.0 * fracPart + mozilla::AsciiAlphanumericToNumber(*aIter);
|
||||
divisor *= 10.0;
|
||||
++aIter;
|
||||
} while (aIter != aEnd && SVGContentUtils::IsDigit(*aIter));
|
||||
} while (aIter != aEnd && mozilla::IsAsciiDigit(*aIter));
|
||||
|
||||
fracPart /= divisor;
|
||||
}
|
||||
@ -699,7 +700,7 @@ ParseNumber(RangedPtr<const char16_t>& aIter,
|
||||
if (*expIter == '-' || *expIter == '+') {
|
||||
++expIter;
|
||||
}
|
||||
if (expIter != aEnd && SVGContentUtils::IsDigit(*expIter)) {
|
||||
if (expIter != aEnd && mozilla::IsAsciiDigit(*expIter)) {
|
||||
// At this point we're sure this is an exponent
|
||||
// and not the start of a unit such as em or ex.
|
||||
gotE = true;
|
||||
@ -709,9 +710,9 @@ ParseNumber(RangedPtr<const char16_t>& aIter,
|
||||
if (gotE) {
|
||||
aIter = expIter;
|
||||
do {
|
||||
exponent = 10.0 * exponent + SVGContentUtils::DecimalDigitValue(*aIter);
|
||||
exponent = 10.0 * exponent + mozilla::AsciiAlphanumericToNumber(*aIter);
|
||||
++aIter;
|
||||
} while (aIter != aEnd && SVGContentUtils::IsDigit(*aIter));
|
||||
} while (aIter != aEnd && mozilla::IsAsciiDigit(*aIter));
|
||||
}
|
||||
}
|
||||
|
||||
@ -798,7 +799,7 @@ SVGContentUtils::ParseInteger(RangedPtr<const char16_t>& aIter,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!IsDigit(*iter)) {
|
||||
if (!mozilla::IsAsciiDigit(*iter)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -806,10 +807,10 @@ SVGContentUtils::ParseInteger(RangedPtr<const char16_t>& aIter,
|
||||
|
||||
do {
|
||||
if (value <= std::numeric_limits<int32_t>::max()) {
|
||||
value = 10 * value + DecimalDigitValue(*iter);
|
||||
value = 10 * value + mozilla::AsciiAlphanumericToNumber(*iter);
|
||||
}
|
||||
++iter;
|
||||
} while (iter != aEnd && IsDigit(*iter));
|
||||
} while (iter != aEnd && mozilla::IsAsciiDigit(*iter));
|
||||
|
||||
aIter = iter;
|
||||
aValue = int32_t(clamped(sign * value,
|
||||
|
@ -262,23 +262,6 @@ public:
|
||||
static mozilla::RangedPtr<const char16_t>
|
||||
GetEndRangedPtr(const nsAString& aString);
|
||||
|
||||
/**
|
||||
* True if 'aCh' is a decimal digit.
|
||||
*/
|
||||
static inline bool IsDigit(char16_t aCh)
|
||||
{
|
||||
return aCh >= '0' && aCh <= '9';
|
||||
}
|
||||
|
||||
/**
|
||||
* Assuming that 'aCh' is a decimal digit, return its numeric value.
|
||||
*/
|
||||
static inline uint32_t DecimalDigitValue(char16_t aCh)
|
||||
{
|
||||
MOZ_ASSERT(IsDigit(aCh), "Digit expected");
|
||||
return aCh - '0';
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the sign (+ or -) of a number and moves aIter to the next
|
||||
* character if a sign is found.
|
||||
|
@ -22,7 +22,6 @@ interface PaymentAddress {
|
||||
readonly attribute DOMString dependentLocality;
|
||||
readonly attribute DOMString postalCode;
|
||||
readonly attribute DOMString sortingCode;
|
||||
readonly attribute DOMString languageCode;
|
||||
readonly attribute DOMString organization;
|
||||
readonly attribute DOMString recipient;
|
||||
readonly attribute DOMString phone;
|
||||
|
@ -59,7 +59,6 @@ dictionary AddressErrors {
|
||||
DOMString city;
|
||||
DOMString country;
|
||||
DOMString dependentLocality;
|
||||
DOMString languageCode;
|
||||
DOMString organization;
|
||||
DOMString phone;
|
||||
DOMString postalCode;
|
||||
|
@ -455,7 +455,8 @@ LoadInfoToLoadInfoArgs(nsILoadInfo *aLoadInfo,
|
||||
aLoadInfo->GetForcePreflight(),
|
||||
aLoadInfo->GetIsPreflight(),
|
||||
aLoadInfo->GetLoadTriggeredFromExternal(),
|
||||
aLoadInfo->GetServiceWorkerTaintingSynthesized()
|
||||
aLoadInfo->GetServiceWorkerTaintingSynthesized(),
|
||||
aLoadInfo->GetDocumentHasUserInteracted()
|
||||
);
|
||||
|
||||
return NS_OK;
|
||||
@ -616,7 +617,8 @@ LoadInfoArgsToLoadInfo(const OptionalLoadInfoArgs& aOptionalLoadInfoArgs,
|
||||
loadInfoArgs.forcePreflight(),
|
||||
loadInfoArgs.isPreflight(),
|
||||
loadInfoArgs.loadTriggeredFromExternal(),
|
||||
loadInfoArgs.serviceWorkerTaintingSynthesized()
|
||||
loadInfoArgs.serviceWorkerTaintingSynthesized(),
|
||||
loadInfoArgs.documentHasUserInteracted()
|
||||
);
|
||||
|
||||
loadInfo.forget(outLoadInfo);
|
||||
@ -630,9 +632,11 @@ LoadInfoToParentLoadInfoForwarder(nsILoadInfo* aLoadInfo,
|
||||
if (!aLoadInfo) {
|
||||
*aForwarderArgsOut = ParentLoadInfoForwarderArgs(false, void_t(),
|
||||
nsILoadInfo::TAINTING_BASIC,
|
||||
false,
|
||||
false,
|
||||
false);
|
||||
false, // serviceWorkerTaintingSynthesized
|
||||
false, // isTracker
|
||||
false, // isTrackerBlocked
|
||||
false // documentHasUserInteracted
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -645,18 +649,14 @@ LoadInfoToParentLoadInfoForwarder(nsILoadInfo* aLoadInfo,
|
||||
uint32_t tainting = nsILoadInfo::TAINTING_BASIC;
|
||||
Unused << aLoadInfo->GetTainting(&tainting);
|
||||
|
||||
bool isTracker;
|
||||
MOZ_ALWAYS_SUCCEEDS(aLoadInfo->GetIsTracker(&isTracker));
|
||||
bool isTrackerBlocked;
|
||||
MOZ_ALWAYS_SUCCEEDS(aLoadInfo->GetIsTrackerBlocked(&isTrackerBlocked));
|
||||
|
||||
*aForwarderArgsOut = ParentLoadInfoForwarderArgs(
|
||||
aLoadInfo->GetAllowInsecureRedirectToDataURI(),
|
||||
ipcController,
|
||||
tainting,
|
||||
aLoadInfo->GetServiceWorkerTaintingSynthesized(),
|
||||
isTracker,
|
||||
isTrackerBlocked
|
||||
aLoadInfo->GetIsTracker(),
|
||||
aLoadInfo->GetIsTrackerBlocked(),
|
||||
aLoadInfo->GetDocumentHasUserInteracted()
|
||||
);
|
||||
}
|
||||
|
||||
@ -690,6 +690,7 @@ MergeParentLoadInfoForwarder(ParentLoadInfoForwarderArgs const& aForwarderArgs,
|
||||
|
||||
MOZ_ALWAYS_SUCCEEDS(aLoadInfo->SetIsTracker(aForwarderArgs.isTracker()));
|
||||
MOZ_ALWAYS_SUCCEEDS(aLoadInfo->SetIsTrackerBlocked(aForwarderArgs.isTrackerBlocked()));
|
||||
MOZ_ALWAYS_SUCCEEDS(aLoadInfo->SetDocumentHasUserInteracted(aForwarderArgs.documentHasUserInteracted()));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -584,8 +584,7 @@ WriteBarrierPostImpl(ObjectT* obj, const Value& keyValue)
|
||||
if (!keys)
|
||||
return false;
|
||||
|
||||
JSRuntime* rt = key->runtimeFromMainThread();
|
||||
rt->gc.storeBuffer().putGeneric(OrderedHashTableRef<ObjectT>(obj));
|
||||
key->storeBuffer()->putGeneric(OrderedHashTableRef<ObjectT>(obj));
|
||||
}
|
||||
|
||||
if (!keys->append(key))
|
||||
|
@ -10558,9 +10558,11 @@ CodeGenerator::link(JSContext* cx, CompilerConstraintList* constraints)
|
||||
ionScript->copyConstants(vp);
|
||||
for (size_t i = 0; i < graph.numConstants(); i++) {
|
||||
const Value& v = vp[i];
|
||||
if ((v.isObject() || v.isString()) && IsInsideNursery(v.toGCThing())) {
|
||||
cx->runtime()->gc.storeBuffer().putWholeCell(script);
|
||||
break;
|
||||
if (v.isGCThing()) {
|
||||
if (gc::StoreBuffer* sb = v.toGCThing()->storeBuffer()) {
|
||||
sb->putWholeCell(script);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
* 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/. */
|
||||
|
||||
/* global getModuleLoadPath setModuleResolveHook parseModule instantiateModule evaluateModule os */
|
||||
/* global getModuleLoadPath setModuleLoadHook setModuleResolveHook parseModule instantiateModule evaluateModule os */
|
||||
|
||||
// A basic synchronous module loader for testing the shell.
|
||||
{
|
||||
@ -175,10 +175,11 @@ const ReflectLoader = new class {
|
||||
}
|
||||
};
|
||||
|
||||
setModuleLoadHook((path) => ReflectLoader.importRoot(path));
|
||||
|
||||
setModuleResolveHook((module, requestName) => {
|
||||
let path = ReflectLoader.resolve(requestName, module);
|
||||
return ReflectLoader.loadAndParse(path);
|
||||
});
|
||||
|
||||
Reflect.Loader = ReflectLoader;
|
||||
}
|
||||
|
@ -187,7 +187,8 @@ enum JSShellExitCode {
|
||||
// Define use of application-specific slots on the shell's global object.
|
||||
enum GlobalAppSlot
|
||||
{
|
||||
GlobalAppSlotModuleResolveHook,
|
||||
GlobalAppSlotModuleLoadHook, // Shell-specific; load a module graph
|
||||
GlobalAppSlotModuleResolveHook, // HostResolveImportedModule
|
||||
GlobalAppSlotCount
|
||||
};
|
||||
static_assert(GlobalAppSlotCount <= JSCLASS_GLOBAL_APPLICATION_SLOTS,
|
||||
@ -921,58 +922,33 @@ InitModuleLoader(JSContext* cx)
|
||||
}
|
||||
|
||||
static bool
|
||||
GetLoaderObject(JSContext* cx, MutableHandleObject resultOut)
|
||||
GetModuleImportHook(JSContext* cx, MutableHandleFunction resultOut)
|
||||
{
|
||||
// Look up the |Reflect.Loader| object that has been defined by the module
|
||||
// loader.
|
||||
|
||||
RootedObject object(cx, cx->global());
|
||||
RootedValue value(cx);
|
||||
if (!JS_GetProperty(cx, object, "Reflect", &value) || !value.isObject())
|
||||
Handle<GlobalObject*> global = cx->global();
|
||||
RootedValue hookValue(cx, global->getReservedSlot(GlobalAppSlotModuleLoadHook));
|
||||
if (hookValue.isUndefined()) {
|
||||
JS_ReportErrorASCII(cx, "Module load hook not set");
|
||||
return false;
|
||||
}
|
||||
|
||||
object = &value.toObject();
|
||||
if (!JS_GetProperty(cx, object, "Loader", &value) || !value.isObject())
|
||||
if (!hookValue.isObject() || !hookValue.toObject().is<JSFunction>()) {
|
||||
JS_ReportErrorASCII(cx, "Module load hook is not a function");
|
||||
return false;
|
||||
}
|
||||
|
||||
resultOut.set(&value.toObject());
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
GetImportRootMethod(JSContext* cx, HandleObject loader, MutableHandleFunction resultOut)
|
||||
{
|
||||
// Look up the module loader's |importRoot| method.
|
||||
|
||||
RootedValue value(cx);
|
||||
if (!JS_GetProperty(cx, loader, "importRoot", &value) || !value.isObject())
|
||||
return false;
|
||||
|
||||
RootedObject object(cx, &value.toObject());
|
||||
if (!object->is<JSFunction>())
|
||||
return false;
|
||||
|
||||
resultOut.set(&object->as<JSFunction>());
|
||||
resultOut.set(&hookValue.toObject().as<JSFunction>());
|
||||
return true;
|
||||
}
|
||||
|
||||
static MOZ_MUST_USE bool
|
||||
RunModule(JSContext* cx, const char* filename, FILE* file, bool compileOnly)
|
||||
{
|
||||
// Execute a module by calling Reflect.Loader.importRoot on the resolved
|
||||
// filename.
|
||||
|
||||
RootedObject loaderObj(cx);
|
||||
if (!GetLoaderObject(cx, &loaderObj)) {
|
||||
JS_ReportErrorASCII(cx, "Failed to get Reflect.Loader");
|
||||
return false;
|
||||
}
|
||||
// Execute a module by calling the module loader's import hook on the
|
||||
// resolved filename.
|
||||
|
||||
RootedFunction importFun(cx);
|
||||
if (!GetImportRootMethod(cx, loaderObj, &importFun)) {
|
||||
JS_ReportErrorASCII(cx, "Failed to get Reflect.Loader.importRoot method");
|
||||
if (!GetModuleImportHook(cx, &importFun))
|
||||
return false;
|
||||
}
|
||||
|
||||
RootedString path(cx, JS_NewStringCopyZ(cx, filename));
|
||||
if (!path)
|
||||
@ -986,7 +962,7 @@ RunModule(JSContext* cx, const char* filename, FILE* file, bool compileOnly)
|
||||
args[0].setString(path);
|
||||
|
||||
RootedValue value(cx);
|
||||
return JS_CallFunction(cx, loaderObj, importFun, args, &value);
|
||||
return JS_CallFunction(cx, nullptr, importFun, args, &value);
|
||||
}
|
||||
|
||||
static bool
|
||||
@ -4485,6 +4461,29 @@ EvaluateModule(JSContext* cx, unsigned argc, Value* vp)
|
||||
return ModuleObject::Evaluate(cx, module);
|
||||
}
|
||||
|
||||
static bool
|
||||
SetModuleLoadHook(JSContext* cx, unsigned argc, Value* vp)
|
||||
{
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
if (args.length() != 1) {
|
||||
JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_MORE_ARGS_NEEDED,
|
||||
"setModuleLoadHook", "0", "s");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!args[0].isObject() || !args[0].toObject().is<JSFunction>()) {
|
||||
const char* typeName = InformalValueTypeName(args[0]);
|
||||
JS_ReportErrorASCII(cx, "expected hook function, got %s", typeName);
|
||||
return false;
|
||||
}
|
||||
|
||||
Handle<GlobalObject*> global = cx->global();
|
||||
global->setReservedSlot(GlobalAppSlotModuleLoadHook, args[0]);
|
||||
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
SetModuleResolveHook(JSContext* cx, unsigned argc, Value* vp)
|
||||
{
|
||||
@ -7452,6 +7451,12 @@ static const JSFunctionSpecWithHelp shell_functions[] = {
|
||||
"evaluateModule(moduleScript)",
|
||||
" Evaluate a previously instantiated module script graph."),
|
||||
|
||||
JS_FN_HELP("setModuleLoadHook", SetModuleLoadHook, 1, 0,
|
||||
"setModuleLoadHook(function(path))",
|
||||
" Set the shell specific module load hook to |function|.\n"
|
||||
" This hook is used to load a module graph. It should be implemented by the\n"
|
||||
" module loader."),
|
||||
|
||||
JS_FN_HELP("setModuleResolveHook", SetModuleResolveHook, 1, 0,
|
||||
"setModuleResolveHook(function(module, specifier) {})",
|
||||
" Set the HostResolveImportedModule hook to |function|.\n"
|
||||
|
@ -134,12 +134,11 @@ NativeObject::elementsRangeWriteBarrierPost(uint32_t start, uint32_t count)
|
||||
{
|
||||
for (size_t i = 0; i < count; i++) {
|
||||
const Value& v = elements_[start + i];
|
||||
if ((v.isObject() || v.isString()) && IsInsideNursery(v.toGCThing())) {
|
||||
JSRuntime* rt = runtimeFromMainThread();
|
||||
rt->gc.storeBuffer().putSlot(this, HeapSlot::Element,
|
||||
unshiftedIndex(start + i),
|
||||
count - i);
|
||||
return;
|
||||
if (v.isGCThing()) {
|
||||
if (gc::StoreBuffer* sb = v.toGCThing()->storeBuffer()) {
|
||||
sb->putSlot(this, HeapSlot::Element, unshiftedIndex(start + i), count - i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -142,11 +142,13 @@ GetterSetterWriteBarrierPost(AccessorShape* shape)
|
||||
|
||||
MOZ_ASSERT(shape);
|
||||
|
||||
if (!(shape->hasGetterObject() && IsInsideNursery(shape->getterObject())) &&
|
||||
!(shape->hasSetterObject() && IsInsideNursery(shape->setterObject())))
|
||||
{
|
||||
gc::StoreBuffer* sb = nullptr;
|
||||
if (shape->hasGetterObject())
|
||||
sb = shape->getterObject()->storeBuffer();
|
||||
if (!sb && shape->hasSetterObject())
|
||||
sb = shape->setterObject()->storeBuffer();
|
||||
if (!sb)
|
||||
return;
|
||||
}
|
||||
|
||||
auto& nurseryShapes = shape->zone()->nurseryShapes();
|
||||
|
||||
@ -156,12 +158,10 @@ GetterSetterWriteBarrierPost(AccessorShape* shape)
|
||||
oomUnsafe.crash("GetterSetterWriteBarrierPost");
|
||||
}
|
||||
|
||||
auto& storeBuffer = shape->runtimeFromMainThread()->gc.storeBuffer();
|
||||
if (nurseryShapes.length() == 1) {
|
||||
storeBuffer.putGeneric(NurseryShapesRef(shape->zone()));
|
||||
} else if (nurseryShapes.length() == MaxShapeVectorLength) {
|
||||
storeBuffer.setAboutToOverflow(JS::gcreason::FULL_SHAPE_BUFFER);
|
||||
}
|
||||
if (nurseryShapes.length() == 1)
|
||||
sb->putGeneric(NurseryShapesRef(shape->zone()));
|
||||
else if (nurseryShapes.length() == MaxShapeVectorLength)
|
||||
sb->setAboutToOverflow(JS::gcreason::FULL_SHAPE_BUFFER);
|
||||
}
|
||||
|
||||
inline
|
||||
|
@ -715,9 +715,11 @@ class TypeSetRef : public BufferableRef
|
||||
void
|
||||
ConstraintTypeSet::postWriteBarrier(JSContext* cx, Type type)
|
||||
{
|
||||
if (type.isSingletonUnchecked() && IsInsideNursery(type.singletonNoBarrier())) {
|
||||
cx->runtime()->gc.storeBuffer().putGeneric(TypeSetRef(cx->zone(), this));
|
||||
cx->runtime()->gc.storeBuffer().setShouldCancelIonCompilations();
|
||||
if (type.isSingletonUnchecked()) {
|
||||
if (gc::StoreBuffer* sb = type.singletonNoBarrier()->storeBuffer()) {
|
||||
sb->putGeneric(TypeSetRef(cx->zone(), this));
|
||||
sb->setShouldCancelIonCompilations();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -935,6 +935,7 @@ nsXULPopupManager::ShowPopupCallback(nsIContent* aPopup,
|
||||
item->SetParent(mPopups);
|
||||
mPopups = item;
|
||||
SetCaptureState(oldmenu);
|
||||
NS_ENSURE_TRUE_VOID(weakFrame.IsAlive());
|
||||
|
||||
item->UpdateFollowAnchor();
|
||||
|
||||
|
@ -89,6 +89,7 @@ LoadInfo::LoadInfo(nsIPrincipal* aLoadingPrincipal,
|
||||
, mServiceWorkerTaintingSynthesized(false)
|
||||
, mIsTracker(false)
|
||||
, mIsTrackerBlocked(false)
|
||||
, mDocumentHasUserInteracted(false)
|
||||
{
|
||||
MOZ_ASSERT(mLoadingPrincipal);
|
||||
MOZ_ASSERT(mTriggeringPrincipal);
|
||||
@ -167,6 +168,7 @@ LoadInfo::LoadInfo(nsIPrincipal* aLoadingPrincipal,
|
||||
mAncestorPrincipals = aLoadingContext->OwnerDoc()->AncestorPrincipals();
|
||||
mAncestorOuterWindowIDs = aLoadingContext->OwnerDoc()->AncestorOuterWindowIDs();
|
||||
MOZ_DIAGNOSTIC_ASSERT(mAncestorPrincipals.Length() == mAncestorOuterWindowIDs.Length());
|
||||
mDocumentHasUserInteracted = aLoadingContext->OwnerDoc()->UserHasInteracted();
|
||||
|
||||
// When the element being loaded is a frame, we choose the frame's window
|
||||
// for the window ID and the frame element's window as the parent
|
||||
@ -326,6 +328,7 @@ LoadInfo::LoadInfo(nsPIDOMWindowOuter* aOuterWindow,
|
||||
, mServiceWorkerTaintingSynthesized(false)
|
||||
, mIsTracker(false)
|
||||
, mIsTrackerBlocked(false)
|
||||
, mDocumentHasUserInteracted(false)
|
||||
{
|
||||
// Top-level loads are never third-party
|
||||
// Grab the information we can out of the window.
|
||||
@ -425,6 +428,7 @@ LoadInfo::LoadInfo(const LoadInfo& rhs)
|
||||
, mServiceWorkerTaintingSynthesized(false)
|
||||
, mIsTracker(rhs.mIsTracker)
|
||||
, mIsTrackerBlocked(rhs.mIsTrackerBlocked)
|
||||
, mDocumentHasUserInteracted(rhs.mDocumentHasUserInteracted)
|
||||
{
|
||||
}
|
||||
|
||||
@ -470,7 +474,8 @@ LoadInfo::LoadInfo(nsIPrincipal* aLoadingPrincipal,
|
||||
bool aForcePreflight,
|
||||
bool aIsPreflight,
|
||||
bool aLoadTriggeredFromExternal,
|
||||
bool aServiceWorkerTaintingSynthesized)
|
||||
bool aServiceWorkerTaintingSynthesized,
|
||||
bool aDocumentHasUserInteracted)
|
||||
: mLoadingPrincipal(aLoadingPrincipal)
|
||||
, mTriggeringPrincipal(aTriggeringPrincipal)
|
||||
, mPrincipalToInherit(aPrincipalToInherit)
|
||||
@ -514,6 +519,7 @@ LoadInfo::LoadInfo(nsIPrincipal* aLoadingPrincipal,
|
||||
, mServiceWorkerTaintingSynthesized(aServiceWorkerTaintingSynthesized)
|
||||
, mIsTracker(false)
|
||||
, mIsTrackerBlocked(false)
|
||||
, mDocumentHasUserInteracted(aDocumentHasUserInteracted)
|
||||
{
|
||||
// Only top level TYPE_DOCUMENT loads can have a null loadingPrincipal
|
||||
MOZ_ASSERT(mLoadingPrincipal || aContentPolicyType == nsIContentPolicy::TYPE_DOCUMENT);
|
||||
@ -1366,6 +1372,21 @@ LoadInfo::SetIsTrackerBlocked(bool aIsTrackerBlocked)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
LoadInfo::GetDocumentHasUserInteracted(bool *aDocumentHasUserInteracted)
|
||||
{
|
||||
MOZ_ASSERT(aDocumentHasUserInteracted);
|
||||
*aDocumentHasUserInteracted = mDocumentHasUserInteracted;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
LoadInfo::SetDocumentHasUserInteracted(bool aDocumentHasUserInteracted)
|
||||
{
|
||||
mDocumentHasUserInteracted = aDocumentHasUserInteracted;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
LoadInfo::GetIsTopLevelLoad(bool *aResult)
|
||||
{
|
||||
|
@ -135,7 +135,8 @@ private:
|
||||
bool aForcePreflight,
|
||||
bool aIsPreflight,
|
||||
bool aLoadTriggeredFromExternal,
|
||||
bool aServiceWorkerTaintingSynthesized);
|
||||
bool aServiceWorkerTaintingSynthesized,
|
||||
bool aDocumentHasUserInteracted);
|
||||
LoadInfo(const LoadInfo& rhs);
|
||||
|
||||
NS_IMETHOD GetRedirects(JSContext* aCx, JS::MutableHandle<JS::Value> aRedirects,
|
||||
@ -211,6 +212,7 @@ private:
|
||||
|
||||
bool mIsTracker;
|
||||
bool mIsTrackerBlocked;
|
||||
bool mDocumentHasUserInteracted;
|
||||
};
|
||||
|
||||
} // namespace net
|
||||
|
@ -1058,4 +1058,9 @@ interface nsILoadInfo : nsISupports
|
||||
*/
|
||||
[infallible] attribute boolean isTracker;
|
||||
[infallible] attribute boolean isTrackerBlocked;
|
||||
|
||||
/**
|
||||
* The top-level document has been user-interacted.
|
||||
*/
|
||||
[infallible] attribute boolean documentHasUserInteracted;
|
||||
};
|
||||
|
@ -106,6 +106,7 @@ struct LoadInfoArgs
|
||||
bool isPreflight;
|
||||
bool loadTriggeredFromExternal;
|
||||
bool serviceWorkerTaintingSynthesized;
|
||||
bool documentHasUserInteracted;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -146,6 +147,7 @@ struct ParentLoadInfoForwarderArgs
|
||||
// Tracker information, currently used by FastBlock
|
||||
bool isTracker;
|
||||
bool isTrackerBlocked;
|
||||
bool documentHasUserInteracted;
|
||||
|
||||
// IMPORTANT: when you add new properites here you must also update
|
||||
// LoadInfoToParentLoadInfoForwarder and MergeParentLoadInfoForwarder
|
||||
|
@ -715,10 +715,12 @@ nsHttpChannel::CheckFastBlocked()
|
||||
|
||||
if (!StaticPrefs::browser_contentblocking_enabled() ||
|
||||
!sIsFastBlockEnabled ||
|
||||
IsContentPolicyTypeWhitelistedForFastBlock(mLoadInfo)) {
|
||||
IsContentPolicyTypeWhitelistedForFastBlock(mLoadInfo)) ||
|
||||
// If the user has interacted with the document, we disable fastblock.
|
||||
(mLoadInfo && mLoadInfo->GetDocumentHasUserInteracted())) {
|
||||
|
||||
LOG(("FastBlock passed (invalid) [this=%p]\n", this));
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -46,9 +46,6 @@ module.exports = {
|
||||
// Disallow use of assignment in return statement.
|
||||
"no-return-assign": ["error", "always"],
|
||||
|
||||
// Disallow use of the comma operator.
|
||||
"no-sequences": "error",
|
||||
|
||||
// Disallow template literal placeholder syntax in regular strings.
|
||||
"no-template-curly-in-string": "error",
|
||||
|
||||
|
@ -1 +1 @@
|
||||
NSS_3_39_BETA2
|
||||
NSS_3_39_RTM
|
||||
|
@ -10,3 +10,4 @@
|
||||
*/
|
||||
|
||||
#error "Do not include this header file."
|
||||
|
||||
|
@ -22,12 +22,12 @@
|
||||
* The format of the version string should be
|
||||
* "<major version>.<minor version>[.<patch level>[.<build number>]][ <ECC>][ <Beta>]"
|
||||
*/
|
||||
#define NSS_VERSION "3.39" _NSS_CUSTOMIZED " Beta"
|
||||
#define NSS_VERSION "3.39" _NSS_CUSTOMIZED
|
||||
#define NSS_VMAJOR 3
|
||||
#define NSS_VMINOR 39
|
||||
#define NSS_VPATCH 0
|
||||
#define NSS_VBUILD 0
|
||||
#define NSS_BETA PR_TRUE
|
||||
#define NSS_BETA PR_FALSE
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
|
@ -17,11 +17,11 @@
|
||||
* The format of the version string should be
|
||||
* "<major version>.<minor version>[.<patch level>[.<build number>]][ <ECC>][ <Beta>]"
|
||||
*/
|
||||
#define SOFTOKEN_VERSION "3.39" SOFTOKEN_ECC_STRING " Beta"
|
||||
#define SOFTOKEN_VERSION "3.39" SOFTOKEN_ECC_STRING
|
||||
#define SOFTOKEN_VMAJOR 3
|
||||
#define SOFTOKEN_VMINOR 39
|
||||
#define SOFTOKEN_VPATCH 0
|
||||
#define SOFTOKEN_VBUILD 0
|
||||
#define SOFTOKEN_BETA PR_TRUE
|
||||
#define SOFTOKEN_BETA PR_FALSE
|
||||
|
||||
#endif /* _SOFTKVER_H_ */
|
||||
|
@ -19,12 +19,12 @@
|
||||
* The format of the version string should be
|
||||
* "<major version>.<minor version>[.<patch level>[.<build number>]][ <Beta>]"
|
||||
*/
|
||||
#define NSSUTIL_VERSION "3.39 Beta"
|
||||
#define NSSUTIL_VERSION "3.39"
|
||||
#define NSSUTIL_VMAJOR 3
|
||||
#define NSSUTIL_VMINOR 39
|
||||
#define NSSUTIL_VPATCH 0
|
||||
#define NSSUTIL_VBUILD 0
|
||||
#define NSSUTIL_BETA PR_TRUE
|
||||
#define NSSUTIL_BETA PR_FALSE
|
||||
|
||||
SEC_BEGIN_PROTOS
|
||||
|
||||
|
@ -258,7 +258,7 @@ add_task(async function test_wipeServer() {
|
||||
try {
|
||||
// Some data to reset.
|
||||
await engine.setLastSync(123.45);
|
||||
engine.toFetch = guidSetOfSize(3),
|
||||
engine.toFetch = guidSetOfSize(3);
|
||||
|
||||
_("Wipe server data and reset client.");
|
||||
await engine.wipeServer();
|
||||
|
@ -51,9 +51,6 @@ module.exports = {
|
||||
// Disallow use of assignment in return statement.
|
||||
"no-return-assign": ["error", "always"],
|
||||
|
||||
// Disallow use of the comma operator.
|
||||
"no-sequences": "error",
|
||||
|
||||
// Disallow template literal placeholder syntax in regular strings.
|
||||
"no-template-curly-in-string": "error",
|
||||
|
||||
|
@ -206,9 +206,9 @@ def mozharness_test_on_generic_worker(config, job, taskdesc):
|
||||
installer_url = get_artifact_url(upstream_task, mozharness['build-artifact-name'])
|
||||
|
||||
taskdesc['scopes'].extend(
|
||||
['generic-worker:os-group:{}/{}'.format(
|
||||
job['worker-type'],
|
||||
group
|
||||
['generic-worker:os-group:{}/{}'.format(
|
||||
job['worker-type'],
|
||||
group
|
||||
) for group in test['os-groups']])
|
||||
|
||||
worker['os-groups'] = test['os-groups']
|
||||
@ -233,7 +233,6 @@ def mozharness_test_on_generic_worker(config, job, taskdesc):
|
||||
'MOZ_HIDE_RESULTS_TABLE': '1',
|
||||
'MOZ_NODE_PATH': '/usr/local/bin/node',
|
||||
'MOZ_NO_REMOTE': '1',
|
||||
'NO_EM_RESTART': '1',
|
||||
'NO_FAIL_ON_TEST_ERRORS': '1',
|
||||
'PATH': '/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin',
|
||||
'SHELL': '/bin/bash',
|
||||
@ -349,7 +348,6 @@ def mozharness_test_on_native_engine(config, job, taskdesc):
|
||||
'MOZHARNESS_URL': {'task-reference': mozharness_url},
|
||||
'MOZILLA_BUILD_URL': {'task-reference': installer_url},
|
||||
"MOZ_NO_REMOTE": '1',
|
||||
"NO_EM_RESTART": '1',
|
||||
"XPCOM_DEBUG_BREAK": 'warn',
|
||||
"NO_FAIL_ON_TEST_ERRORS": '1',
|
||||
"MOZ_HIDE_RESULTS_TABLE": '1',
|
||||
@ -429,7 +427,6 @@ def mozharness_test_on_script_engine_autophone(config, job, taskdesc):
|
||||
'MOZHARNESS_URL': {'task-reference': mozharness_url},
|
||||
'MOZILLA_BUILD_URL': {'task-reference': installer_url},
|
||||
"MOZ_NO_REMOTE": '1',
|
||||
"NO_EM_RESTART": '1',
|
||||
"XPCOM_DEBUG_BREAK": 'warn',
|
||||
"NO_FAIL_ON_TEST_ERRORS": '1',
|
||||
"MOZ_HIDE_RESULTS_TABLE": '1',
|
||||
|
@ -74,7 +74,7 @@ class TestConfig(object):
|
||||
def get_test_parser():
|
||||
from mozlog.commandline import add_logging_group
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('what', default=None, nargs='*', help=TEST_HELP)
|
||||
parser.add_argument('what', default=None, nargs='+', help=TEST_HELP)
|
||||
parser.add_argument('extra_args', default=None, nargs=argparse.REMAINDER,
|
||||
help="Extra arguments to pass to the underlying test command(s). "
|
||||
"If an underlying command doesn't recognize the argument, it "
|
||||
|
@ -1889,6 +1889,19 @@ class Marionette(object):
|
||||
"""
|
||||
return self._send_message("WebDriver:GetCookies")
|
||||
|
||||
def save_screenshot(self, fh, element=None, highlights=None,
|
||||
full=True, scroll=True):
|
||||
"""Takes a screenhot of a web element or the current frame and
|
||||
saves it in the filehandle.
|
||||
|
||||
It is a wrapper around screenshot()
|
||||
:param fh: The filehandle to save the screenshot at.
|
||||
|
||||
The rest of the parameters are defined like in screenshot()
|
||||
"""
|
||||
data = self.screenshot(element, highlights, "binary", full, scroll)
|
||||
fh.write(data)
|
||||
|
||||
def screenshot(self, element=None, highlights=None, format="base64",
|
||||
full=True, scroll=True):
|
||||
"""Takes a screenshot of a web element or the current frame.
|
||||
|
@ -1302,7 +1302,7 @@ GeckoDriver.prototype.getIdForBrowser = function(browser) {
|
||||
return winId;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the current window's handle. On desktop this typically corresponds
|
||||
|
@ -8,6 +8,7 @@ import base64
|
||||
import hashlib
|
||||
import imghdr
|
||||
import struct
|
||||
import tempfile
|
||||
import urllib
|
||||
|
||||
from marionette_driver import By
|
||||
@ -395,6 +396,15 @@ class TestScreenCaptureContent(WindowManagerMixin, ScreenCaptureTestCase):
|
||||
self.assertNotEqual(screenshot_element, screenshot_highlight_paragraph)
|
||||
self.assertNotEqual(screenshot_highlight, screenshot_highlight_paragraph)
|
||||
|
||||
def test_save_screenshot(self):
|
||||
expected = self.marionette.screenshot(format="binary")
|
||||
with tempfile.TemporaryFile('w+b') as fh:
|
||||
self.marionette.save_screenshot(fh)
|
||||
fh.flush()
|
||||
fh.seek(0)
|
||||
content = fh.read()
|
||||
self.assertEqual(expected, content)
|
||||
|
||||
def test_scroll_default(self):
|
||||
self.marionette.navigate(long)
|
||||
before = self.page_y_offset
|
||||
|
@ -26,8 +26,6 @@ class GeckoRuntimeRunner(BaseRunner):
|
||||
|
||||
# allows you to run an instance of Firefox separately from any other instances
|
||||
self.env['MOZ_NO_REMOTE'] = '1'
|
||||
# keeps Firefox attached to the terminal window after it starts
|
||||
self.env['NO_EM_RESTART'] = '1'
|
||||
|
||||
# Disable crash reporting dialogs that interfere with debugging
|
||||
self.env['GNOME_DISABLE_CRASH_DIALOG'] = '1'
|
||||
|
@ -29,8 +29,7 @@ class DeviceRunner(BaseRunner):
|
||||
'MOZ_LOG': 'signaling:3,mtransport:4,DataChannel:4,jsep:4,MediaPipelineFactory:4',
|
||||
'R_LOG_LEVEL': '6',
|
||||
'R_LOG_DESTINATION': 'stderr',
|
||||
'R_LOG_VERBOSE': '1',
|
||||
'NO_EM_RESTART': '1', }
|
||||
'R_LOG_VERBOSE': '1', }
|
||||
|
||||
def __init__(self, device_class, device_args=None, **kwargs):
|
||||
process_log = tempfile.NamedTemporaryFile(suffix='pidlog')
|
||||
|
@ -180,7 +180,6 @@ impl FirefoxRunner {
|
||||
pub fn new(binary: &Path, profile: Profile) -> FirefoxRunner {
|
||||
let mut envs: HashMap<OsString, OsString> = HashMap::new();
|
||||
envs.insert("MOZ_NO_REMOTE".into(), "1".into());
|
||||
envs.insert("NO_EM_RESTART".into(), "1".into());
|
||||
|
||||
FirefoxRunner {
|
||||
binary: binary.to_path_buf(),
|
||||
|
@ -1 +1 @@
|
||||
{'deviceroot': '', 'dirs': {}, 'repository': 'http://hg.mozilla.org/releases/mozilla-release', 'buildid': '20131205075310', 'results_log': 'pathtoresults_log', 'symbols_path': None, 'bcontroller_config': 'pathtobcontroller', 'host': '', 'browser_name': 'Firefox', 'sourcestamp': '39faf812aaec', 'remote': False, 'child_process': 'plugin-container', 'branch_name': '', 'browser_version': '26.0', 'extra_args': '', 'develop': True, 'preferences': {'browser.display.overlaynavbuttons': False, 'extensions.getAddons.get.url': 'http://127.0.0.1/extensions-dummy/repositoryGetURL', 'dom.max_chrome_script_run_time': 0, 'network.proxy.type': 1, 'extensions.update.background.url': 'http://127.0.0.1/extensions-dummy/updateBackgroundURL', 'network.proxy.http': 'localhost', 'plugins.update.url': 'http://127.0.0.1/plugins-dummy/updateCheckURL', 'dom.max_script_run_time': 0, 'extensions.update.enabled': False, 'browser.safebrowsing.keyURL': 'http://127.0.0.1/safebrowsing-dummy/newkey', 'media.navigator.permission.disabled': True, 'app.update.disabledForTesting': True, 'extensions.blocklist.url': 'http://127.0.0.1/extensions-dummy/blocklistURL', 'browser.EULA.override': True, 'extensions.checkCompatibility': False, 'talos.logfile': 'pathtofile', 'browser.safebrowsing.gethashURL': 'http://127.0.0.1/safebrowsing-dummy/gethash', 'extensions.hotfix.url': 'http://127.0.0.1/extensions-dummy/hotfixURL', 'dom.disable_window_move_resize': True, 'network.proxy.http_port': 80, 'browser.dom.window.dump.enabled': True, 'extensions.update.url': 'http://127.0.0.1/extensions-dummy/updateURL', 'browser.chrome.dynamictoolbar': False, 'browser.link.open_newwindow': 2, 'browser.cache.disk.smart_size.first_run': False, 'security.turn_off_all_security_so_that_viruses_can_take_over_this_computer': True, 'dom.disable_open_during_load': False, 'extensions.getAddons.search.browseURL': 'http://127.0.0.1/extensions-dummy/repositoryBrowseURL', 'browser.cache.disk.smart_size.enabled': False, 'extensions.getAddons.getWithPerformance.url': 'http://127.0.0.1/extensions-dummy/repositoryGetWithPerformanceURL', 'hangmonitor.timeout': 0, 'dom.send_after_paint_to_content': True, 'security.fileuri.strict_origin_policy': False, 'media.capturestream_hints.enabled': True, 'extensions.update.notifyUser': False, 'extensions.blocklist.enabled': False, 'browser.bookmarks.max_backups': 0, 'browser.shell.checkDefaultBrowser': False, 'media.peerconnection.enabled': True, 'dom.disable_window_flip': True, 'security.enable_java': False, 'browser.warnOnQuit': False, 'media.navigator.enabled': True, 'browser.safebrowsing.updateURL': 'http://127.0.0.1/safebrowsing-dummy/update', 'dom.allow_scripts_to_close_windows': True, 'extensions.webservice.discoverURL': 'http://127.0.0.1/extensions-dummy/discoveryURL'}, 'test_timeout': 1200, 'title': 'qm-pxp01', 'error_filename': 'pathtoerrorfile', 'webserver': 'localhost:15707', 'browser_path':ffox_path, 'port': 20701, 'browser_log': 'browser_output.txt', 'process': 'firefox.exe', 'xperf_path': 'C:/Program Files/Microsoft Windows Performance Toolkit/xperf.exe', 'extensions': ['pathtopageloader'], 'fennecIDs': '', 'env': {'NO_EM_RESTART': '1'}, 'init_url': 'http://localhost:15707/getInfo.html', 'browser_wait': 5}
|
||||
{'deviceroot': '', 'dirs': {}, 'repository': 'http://hg.mozilla.org/releases/mozilla-release', 'buildid': '20131205075310', 'results_log': 'pathtoresults_log', 'symbols_path': None, 'bcontroller_config': 'pathtobcontroller', 'host': '', 'browser_name': 'Firefox', 'sourcestamp': '39faf812aaec', 'remote': False, 'child_process': 'plugin-container', 'branch_name': '', 'browser_version': '26.0', 'extra_args': '', 'develop': True, 'preferences': {'browser.display.overlaynavbuttons': False, 'extensions.getAddons.get.url': 'http://127.0.0.1/extensions-dummy/repositoryGetURL', 'dom.max_chrome_script_run_time': 0, 'network.proxy.type': 1, 'extensions.update.background.url': 'http://127.0.0.1/extensions-dummy/updateBackgroundURL', 'network.proxy.http': 'localhost', 'plugins.update.url': 'http://127.0.0.1/plugins-dummy/updateCheckURL', 'dom.max_script_run_time': 0, 'extensions.update.enabled': False, 'browser.safebrowsing.keyURL': 'http://127.0.0.1/safebrowsing-dummy/newkey', 'media.navigator.permission.disabled': True, 'app.update.disabledForTesting': True, 'extensions.blocklist.url': 'http://127.0.0.1/extensions-dummy/blocklistURL', 'browser.EULA.override': True, 'extensions.checkCompatibility': False, 'talos.logfile': 'pathtofile', 'browser.safebrowsing.gethashURL': 'http://127.0.0.1/safebrowsing-dummy/gethash', 'extensions.hotfix.url': 'http://127.0.0.1/extensions-dummy/hotfixURL', 'dom.disable_window_move_resize': True, 'network.proxy.http_port': 80, 'browser.dom.window.dump.enabled': True, 'extensions.update.url': 'http://127.0.0.1/extensions-dummy/updateURL', 'browser.chrome.dynamictoolbar': False, 'browser.link.open_newwindow': 2, 'browser.cache.disk.smart_size.first_run': False, 'security.turn_off_all_security_so_that_viruses_can_take_over_this_computer': True, 'dom.disable_open_during_load': False, 'extensions.getAddons.search.browseURL': 'http://127.0.0.1/extensions-dummy/repositoryBrowseURL', 'browser.cache.disk.smart_size.enabled': False, 'extensions.getAddons.getWithPerformance.url': 'http://127.0.0.1/extensions-dummy/repositoryGetWithPerformanceURL', 'hangmonitor.timeout': 0, 'dom.send_after_paint_to_content': True, 'security.fileuri.strict_origin_policy': False, 'media.capturestream_hints.enabled': True, 'extensions.update.notifyUser': False, 'extensions.blocklist.enabled': False, 'browser.bookmarks.max_backups': 0, 'browser.shell.checkDefaultBrowser': False, 'media.peerconnection.enabled': True, 'dom.disable_window_flip': True, 'security.enable_java': False, 'browser.warnOnQuit': False, 'media.navigator.enabled': True, 'browser.safebrowsing.updateURL': 'http://127.0.0.1/safebrowsing-dummy/update', 'dom.allow_scripts_to_close_windows': True, 'extensions.webservice.discoverURL': 'http://127.0.0.1/extensions-dummy/discoveryURL'}, 'test_timeout': 1200, 'title': 'qm-pxp01', 'error_filename': 'pathtoerrorfile', 'webserver': 'localhost:15707', 'browser_path':ffox_path, 'port': 20701, 'browser_log': 'browser_output.txt', 'process': 'firefox.exe', 'xperf_path': 'C:/Program Files/Microsoft Windows Performance Toolkit/xperf.exe', 'extensions': ['pathtopageloader'], 'fennecIDs': '', 'init_url': 'http://localhost:15707/getInfo.html', 'browser_wait': 5}
|
||||
|
@ -0,0 +1,4 @@
|
||||
[2d.text.measure.actualBoundingBox.html]
|
||||
[Testing actualBoundingBox]
|
||||
expected: FAIL
|
||||
|
@ -0,0 +1,4 @@
|
||||
[2d.text.measure.advances.html]
|
||||
[Testing width advances]
|
||||
expected: FAIL
|
||||
|
@ -0,0 +1,4 @@
|
||||
[2d.text.measure.baselines.html]
|
||||
[Testing baselines]
|
||||
expected: FAIL
|
||||
|
@ -0,0 +1,4 @@
|
||||
[2d.text.measure.emHeights.html]
|
||||
[Testing emHeights]
|
||||
expected: FAIL
|
||||
|
@ -0,0 +1,4 @@
|
||||
[2d.text.measure.fontBoundingBox.html]
|
||||
[Testing fontBoundingBox]
|
||||
expected: FAIL
|
||||
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user