mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
merge mozilla-central to mozilla-inbound. r=merge a=merge
This commit is contained in:
commit
af670f4147
@ -1,12 +1,5 @@
|
||||
BasedOnStyle: Mozilla
|
||||
|
||||
# Ignore all comments because they aren't reflowed properly.
|
||||
CommentPragmas: "^"
|
||||
|
||||
# Force pointers to the type for C++.
|
||||
DerivePointerAlignment: false
|
||||
PointerAlignment: Left
|
||||
|
||||
# Prevent the loss of indentation with these macros
|
||||
MacroBlockBegin: "^\
|
||||
NS_INTERFACE_MAP_BEGIN|\
|
||||
@ -28,15 +21,6 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED$"
|
||||
SortIncludes: false
|
||||
|
||||
|
||||
# All of the following items are default
|
||||
# in the Mozila coding style from clang format 4.0
|
||||
AlwaysBreakAfterReturnType: TopLevel
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
SpaceAfterTemplateKeyword: false
|
||||
ReflowComments: false
|
||||
|
||||
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterEnum: true
|
||||
|
@ -1157,9 +1157,12 @@ toolbarpaletteitem[place="palette"] > #downloads-button[indicator] > #downloads-
|
||||
|
||||
%elifndef MOZ_WIDGET_GTK
|
||||
|
||||
#BMB_bookmarksPopup {
|
||||
will-change: transform, opacity; /* workaround for bug 1414033 */
|
||||
}
|
||||
|
||||
#BMB_bookmarksPopup:not([animate="false"]) {
|
||||
opacity: 0;
|
||||
will-change: transform; /* workaround for bug 1414033 */
|
||||
transform: translateY(-70px);
|
||||
transition-property: transform, opacity;
|
||||
transition-duration: 0.18s, 0.18s;
|
||||
|
@ -197,7 +197,7 @@ var AboutBlockedSiteListener = {
|
||||
|
||||
// Set the firefox support url.
|
||||
doc.getElementById("firefox_support").setAttribute("href",
|
||||
"https://support.mozilla.org/kb/how-does-phishing-and-malware-protection-work");
|
||||
Services.urlFormatter.formatURLPref("app.support.baseURL") + "phishing-malware");
|
||||
|
||||
// Show safe browsing details on load if the pref is set to true.
|
||||
let showDetails = Services.prefs.getBoolPref("browser.xul.error_pages.show_safe_browsing_details_on_load");
|
||||
|
@ -6440,8 +6440,6 @@
|
||||
document.getElementById("tabContextMenu");
|
||||
</field>
|
||||
|
||||
<field name="mTabstripWidth">0</field>
|
||||
|
||||
<field name="mTabstrip">
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "arrowscrollbox");
|
||||
</field>
|
||||
@ -6473,7 +6471,7 @@
|
||||
|
||||
<method name="updateSessionRestoreVisibility">
|
||||
<body><![CDATA[
|
||||
let {restoreTabsButton, restoreTabsButtonWrapperWidth, windowUtils, mTabstripWidth} = this;
|
||||
let {restoreTabsButton, restoreTabsButtonWrapperWidth, windowUtils} = this;
|
||||
let restoreTabsButtonWrapper = restoreTabsButton.parentNode;
|
||||
|
||||
if (!restoreTabsButtonWrapper.getAttribute("session-exists")) {
|
||||
@ -6481,6 +6479,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
let tabstripWidth = this.mTabstrip.clientWidth;
|
||||
|
||||
let newTabButton = document.getAnonymousElementByAttribute(
|
||||
this, "anonid", "tabs-newtab-button");
|
||||
|
||||
@ -6495,7 +6495,7 @@
|
||||
|
||||
// Subtract the elements' widths from the available space to ensure
|
||||
// that showing the restoreTabsButton won't cause any overflow.
|
||||
if ((mTabstripWidth - tabbarUsedSpace) > restoreTabsButtonWrapperWidth) {
|
||||
if (tabstripWidth - tabbarUsedSpace > restoreTabsButtonWrapperWidth) {
|
||||
restoreTabsButtonWrapper.setAttribute("shown", "true");
|
||||
} else {
|
||||
restoreTabsButtonWrapper.removeAttribute("shown");
|
||||
@ -7000,14 +7000,9 @@
|
||||
break;
|
||||
|
||||
TabsInTitlebar.updateAppearance();
|
||||
|
||||
var width = this.mTabstrip.boxObject.width;
|
||||
if (width != this.mTabstripWidth) {
|
||||
this.adjustTabstrip();
|
||||
this._handleTabSelect(true);
|
||||
this.mTabstripWidth = width;
|
||||
this.updateSessionRestoreVisibility();
|
||||
}
|
||||
this.adjustTabstrip();
|
||||
this._handleTabSelect(true);
|
||||
this.updateSessionRestoreVisibility();
|
||||
break;
|
||||
case "mouseout":
|
||||
// If the "related target" (the node to which the pointer went) is not
|
||||
|
@ -11,3 +11,4 @@ support-files =
|
||||
[browser_multiple_icons_in_short_timeframe.js]
|
||||
[browser_rich_icons.js]
|
||||
[browser_icon_discovery.js]
|
||||
[browser_preferred_icons.js]
|
||||
|
@ -0,0 +1,97 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
const ROOT = "http://mochi.test:8888/browser/browser/base/content/test/favicons/";
|
||||
|
||||
function waitIcon(url) {
|
||||
// Because there is debounce logic in ContentLinkHandler.jsm to reduce the
|
||||
// favicon loads, we have to wait some time before checking that icon was
|
||||
// stored properly.
|
||||
return BrowserTestUtils.waitForCondition(
|
||||
() => {
|
||||
let tabIcon = gBrowser.getIcon();
|
||||
info("Found icon " + tabIcon);
|
||||
return tabIcon == url;
|
||||
},
|
||||
"wait for icon load to finish", 200, 25);
|
||||
}
|
||||
|
||||
function createLinks(linkInfos) {
|
||||
return ContentTask.spawn(gBrowser.selectedBrowser, linkInfos, links => {
|
||||
let doc = content.document;
|
||||
let head = doc.getElementById("linkparent");
|
||||
for (let l of links) {
|
||||
let link = doc.createElement("link");
|
||||
link.rel = "icon";
|
||||
link.href = l.href;
|
||||
link.type = l.type;
|
||||
if (l.size)
|
||||
link.setAttribute("sizes", `${l.size}x${l.size}`);
|
||||
head.appendChild(link);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
add_task(async function setup() {
|
||||
const URL = ROOT + "discovery.html";
|
||||
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, URL);
|
||||
registerCleanupFunction(async function() {
|
||||
await BrowserTestUtils.removeTab(tab);
|
||||
});
|
||||
});
|
||||
|
||||
add_task(async function prefer_svg() {
|
||||
let promise = waitIcon(ROOT + "icon.svg");
|
||||
await createLinks([
|
||||
{ href: ROOT + "icon.ico",
|
||||
type: "image/x-icon"
|
||||
},
|
||||
{ href: ROOT + "icon.svg",
|
||||
type: "image/svg+xml"
|
||||
},
|
||||
{ href: ROOT + "icon.png",
|
||||
type: "image/png",
|
||||
size: 16 * Math.ceil(window.devicePixelRatio)
|
||||
},
|
||||
]);
|
||||
await promise;
|
||||
// Must have at least one test.
|
||||
Assert.ok(true, "The expected icon has been set");
|
||||
});
|
||||
|
||||
add_task(async function prefer_sized() {
|
||||
let promise = waitIcon(ROOT + "icon.png");
|
||||
await createLinks([
|
||||
{ href: ROOT + "icon.ico",
|
||||
type: "image/x-icon"
|
||||
},
|
||||
{ href: ROOT + "icon.png",
|
||||
type: "image/png",
|
||||
size: 16 * Math.ceil(window.devicePixelRatio)
|
||||
},
|
||||
{ href: ROOT + "icon2.ico",
|
||||
type: "image/x-icon"
|
||||
},
|
||||
]);
|
||||
await promise;
|
||||
// Must have at least one test.
|
||||
Assert.ok(true, "The expected icon has been set");
|
||||
});
|
||||
|
||||
add_task(async function prefer_ico() {
|
||||
let promise = waitIcon(ROOT + "icon2.ico");
|
||||
await createLinks([
|
||||
{ href: ROOT + "icon.ico",
|
||||
type: "image/x-icon"
|
||||
},
|
||||
{ href: ROOT + "icon.png",
|
||||
type: "image/png",
|
||||
},
|
||||
{ href: ROOT + "icon2.ico",
|
||||
type: "image/x-icon"
|
||||
},
|
||||
]);
|
||||
await promise;
|
||||
// Must have at least one test.
|
||||
Assert.ok(true, "The expected icon has been set");
|
||||
});
|
@ -39,16 +39,6 @@ if (Services.appinfo.OS == "Linux") {
|
||||
}
|
||||
}
|
||||
|
||||
if (Services.appinfo.OS == "Darwin") {
|
||||
EXPECTED_REFLOWS.push({
|
||||
stack: [
|
||||
"handleEvent@chrome://browser/content/tabbrowser.xml",
|
||||
"inferFromText@chrome://browser/content/browser.js",
|
||||
"handleEvent@chrome://browser/content/browser.js",
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
if (Services.appinfo.OS == "WINNT") {
|
||||
EXPECTED_REFLOWS.push(
|
||||
{
|
||||
@ -60,14 +50,6 @@ if (Services.appinfo.OS == "WINNT") {
|
||||
],
|
||||
times: 2, // This number should only ever go down - never up.
|
||||
},
|
||||
|
||||
{
|
||||
stack: [
|
||||
"handleEvent@chrome://browser/content/tabbrowser.xml",
|
||||
"inferFromText@chrome://browser/content/browser.js",
|
||||
"handleEvent@chrome://browser/content/browser.js",
|
||||
],
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -85,16 +67,6 @@ if (Services.appinfo.OS == "WINNT" || Services.appinfo.OS == "Darwin") {
|
||||
);
|
||||
}
|
||||
|
||||
if (Services.appinfo.OS == "WINNT" && screen.width <= 1280) {
|
||||
EXPECTED_REFLOWS.push(
|
||||
{
|
||||
stack: [
|
||||
"handleEvent@chrome://browser/content/tabbrowser.xml",
|
||||
],
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* This test ensures that there are no unexpected
|
||||
* uninterruptible reflows when opening new windows.
|
||||
|
@ -2769,6 +2769,10 @@ var CustomizableUIInternal = {
|
||||
if (typeof aWidget == "string") {
|
||||
widgetId = aWidget;
|
||||
} else {
|
||||
// Skipped items could just not have ids.
|
||||
if (!aWidget.id && aWidget.getAttribute("skipintoolbarset") == "true") {
|
||||
return false;
|
||||
}
|
||||
if (!aWidget.id &&
|
||||
!["toolbarspring", "toolbarspacer", "toolbarseparator"].includes(aWidget.nodeName)) {
|
||||
throw new Error("No nodes without ids that aren't special widgets should ever come into contact with CUI");
|
||||
|
@ -1056,7 +1056,7 @@ var gPrivacyPane = {
|
||||
let blockUncommonPref = document.getElementById("browser.safebrowsing.downloads.remote.block_uncommon");
|
||||
|
||||
let learnMoreLink = document.getElementById("enableSafeBrowsingLearnMore");
|
||||
let phishingUrl = "https://support.mozilla.org/kb/how-does-phishing-and-malware-protection-work";
|
||||
let phishingUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "phishing-malware";
|
||||
learnMoreLink.setAttribute("href", phishingUrl);
|
||||
|
||||
enableSafeBrowsing.addEventListener("command", function() {
|
||||
|
@ -339,7 +339,7 @@ FormAutofillHandler.prototype = {
|
||||
return;
|
||||
}
|
||||
} else if (element.maxLength) {
|
||||
if (profile.tel.length <= element.maxLength) {
|
||||
if (detail._reason == "autocomplete" && profile.tel.length <= element.maxLength) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
14
browser/extensions/formautofill/bootstrap.js
vendored
14
browser/extensions/formautofill/bootstrap.js
vendored
@ -18,6 +18,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "AddonManagerPrivate",
|
||||
"resource://gre/modules/AddonManager.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "FormAutofillParent",
|
||||
"resource://formautofill/FormAutofillParent.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "FormAutofillUtils",
|
||||
"resource://formautofill/FormAutofillUtils.jsm");
|
||||
|
||||
function insertStyleSheet(domWindow, url) {
|
||||
let doc = domWindow.document;
|
||||
@ -68,6 +70,7 @@ function startup(data) {
|
||||
// reset the sync related prefs incase the feature was previously available
|
||||
// but isn't now.
|
||||
Services.prefs.clearUserPref("services.sync.engine.addresses.available");
|
||||
Services.prefs.clearUserPref("services.sync.engine.creditcards.available");
|
||||
Services.telemetry.scalarSet("formautofill.availability", false);
|
||||
return;
|
||||
}
|
||||
@ -92,10 +95,15 @@ function startup(data) {
|
||||
Services.prefs.setBoolPref("dom.forms.autocomplete.formautofill", true);
|
||||
Services.telemetry.scalarSet("formautofill.availability", true);
|
||||
|
||||
// This pref determines whether the "addresses" sync engine is available
|
||||
// (ie, whether it is shown in any UI etc) - it *does not* determine whether
|
||||
// the engine is actually enabled or not.
|
||||
// This pref determines whether the "addresses"/"creditcards" sync engine is
|
||||
// available (ie, whether it is shown in any UI etc) - it *does not* determine
|
||||
// whether the engine is actually enabled or not.
|
||||
Services.prefs.setBoolPref("services.sync.engine.addresses.available", true);
|
||||
if (FormAutofillUtils.isAutofillCreditCardsAvailable) {
|
||||
Services.prefs.setBoolPref("services.sync.engine.creditcards.available", true);
|
||||
} else {
|
||||
Services.prefs.clearUserPref("services.sync.engine.creditcards.available");
|
||||
}
|
||||
|
||||
// Listen for the autocomplete popup message to lazily append our stylesheet related to the popup.
|
||||
Services.mm.addMessageListener("FormAutoComplete:MaybeOpenPopup", onMaybeOpenPopup);
|
||||
|
@ -20,6 +20,10 @@ add_task(async function test_submit_creditCard_cancel_saving() {
|
||||
form.querySelector("input[type=submit]").click();
|
||||
});
|
||||
|
||||
ok(!SpecialPowers.Services.prefs.prefHasUserValue(SYNC_USERNAME_PREF),
|
||||
"Sync account should not exist by default");
|
||||
let cb = getDoorhangerCheckbox();
|
||||
ok(cb.hidden, "Sync checkbox should be hidden");
|
||||
await promiseShown;
|
||||
await clickDoorhangerButton(SECONDARY_BUTTON);
|
||||
}
|
||||
@ -163,42 +167,6 @@ add_task(async function test_submit_creditCard_saved_with_mp_enabled_but_cancele
|
||||
LoginTestUtils.masterPassword.disable();
|
||||
});
|
||||
|
||||
add_task(async function test_submit_creditCard_unavailable_with_sync_account() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
"set": [
|
||||
[SYNC_USERNAME_PREF, "foo@bar.com"],
|
||||
],
|
||||
});
|
||||
|
||||
await BrowserTestUtils.withNewTab({gBrowser, url: CREDITCARD_FORM_URL},
|
||||
async function(browser) {
|
||||
let promiseShown = BrowserTestUtils.waitForEvent(PopupNotifications.panel,
|
||||
"popupshown");
|
||||
is(SpecialPowers.getBoolPref(SYNC_CREDITCARDS_AVAILABLE_PREF), false,
|
||||
"creditCards sync should be unavailable by default");
|
||||
await ContentTask.spawn(browser, null, async function() {
|
||||
let form = content.document.getElementById("form");
|
||||
let name = form.querySelector("#cc-name");
|
||||
name.focus();
|
||||
name.setUserInput("User 2");
|
||||
|
||||
let number = form.querySelector("#cc-number");
|
||||
number.setUserInput("1234123412341234");
|
||||
|
||||
// Wait 500ms before submission to make sure the input value applied
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
form.querySelector("input[type=submit]").click();
|
||||
});
|
||||
|
||||
await promiseShown;
|
||||
let cb = getDoorhangerCheckbox();
|
||||
ok(cb.hidden, "Sync checkbox should be hidden");
|
||||
|
||||
await clickDoorhangerButton(SECONDARY_BUTTON);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
add_task(async function test_submit_creditCard_with_sync_account() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
"set": [
|
||||
|
@ -316,7 +316,28 @@ const TESTCASES = [
|
||||
}],
|
||||
},
|
||||
{
|
||||
description: "`tel` field with `maxlength` can be filled with `tel` value.",
|
||||
description: "autocomplete=\"tel\" field with `maxlength` can be filled with `tel` value.",
|
||||
document: `<form>
|
||||
<input id="telephone" autocomplete="tel" maxlength="12">
|
||||
<input id="line1" autocomplete="address-line1">
|
||||
<input id="line2" autocomplete="address-line2">
|
||||
</form>`,
|
||||
profileData: [Object.assign({}, DEFAULT_ADDRESS_RECORD)],
|
||||
expectedResult: [{
|
||||
"guid": "123",
|
||||
"street-address": "2 Harrison St\nline2\nline3",
|
||||
"-moz-street-address-one-line": "2 Harrison St line2 line3",
|
||||
"address-line1": "2 Harrison St",
|
||||
"address-line2": "line2 line3",
|
||||
"address-line3": "line3",
|
||||
"address-level1": "CA",
|
||||
"country": "US",
|
||||
"tel": "+19876543210",
|
||||
"tel-national": "9876543210",
|
||||
}],
|
||||
},
|
||||
{
|
||||
description: "Still fill `tel-national` in a `tel` field with `maxlength` can be filled with `tel` value.",
|
||||
document: `<form>
|
||||
<input id="telephone" maxlength="12">
|
||||
<input id="line1" autocomplete="address-line1">
|
||||
@ -332,7 +353,7 @@ const TESTCASES = [
|
||||
"address-line3": "line3",
|
||||
"address-level1": "CA",
|
||||
"country": "US",
|
||||
"tel": "+19876543210",
|
||||
"tel": "9876543210",
|
||||
"tel-national": "9876543210",
|
||||
}],
|
||||
},
|
||||
|
@ -119,6 +119,13 @@ function setIconForLink(aIconInfo, aChromeGlobal) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the icon info represents an ICO image.
|
||||
*/
|
||||
function isICO(icon) {
|
||||
return icon.type == "image/x-icon" || icon.type == "image/vnd.microsoft.icon";
|
||||
}
|
||||
|
||||
/*
|
||||
* Timeout callback function for loading favicon.
|
||||
*
|
||||
@ -135,8 +142,10 @@ function faviconTimeoutCallback(aFaviconLoads, aPageUrl, aChromeGlobal) {
|
||||
if (!load)
|
||||
return;
|
||||
|
||||
// SVG and ico are the preferred icons
|
||||
let preferredIcon;
|
||||
let preferredIcon = {
|
||||
type: null
|
||||
};
|
||||
let preferredWidth = 16 * Math.ceil(aChromeGlobal.content.devicePixelRatio);
|
||||
// Other links with the "icon" tag are the default icons
|
||||
let defaultIcon;
|
||||
// Rich icons are either apple-touch or fluid icons, or the ones of the
|
||||
@ -144,11 +153,17 @@ function faviconTimeoutCallback(aFaviconLoads, aPageUrl, aChromeGlobal) {
|
||||
let largestRichIcon;
|
||||
|
||||
for (let icon of load.iconInfos) {
|
||||
if (icon.type === "image/svg+xml" ||
|
||||
icon.type === "image/x-icon" ||
|
||||
icon.type === "image/vnd.microsoft.icon") {
|
||||
preferredIcon = icon;
|
||||
continue;
|
||||
if (!icon.isRichIcon) {
|
||||
// First check for svg. If it's not available check for an icon with a
|
||||
// size adapt to the current resolution. If both are not available, prefer
|
||||
// ico files. When multiple icons are in the same set, the latest wins.
|
||||
if (icon.type == "image/svg+xml") {
|
||||
preferredIcon = icon;
|
||||
} else if (icon.width == preferredWidth && preferredIcon.type != "image/svg+xml") {
|
||||
preferredIcon = icon;
|
||||
} else if (isICO(icon) && (preferredIcon.type == null || isICO(preferredIcon))) {
|
||||
preferredIcon = icon;
|
||||
}
|
||||
}
|
||||
|
||||
// Note that some sites use hi-res icons without specifying them as
|
||||
@ -170,7 +185,7 @@ function faviconTimeoutCallback(aFaviconLoads, aPageUrl, aChromeGlobal) {
|
||||
if (largestRichIcon) {
|
||||
setIconForLink(largestRichIcon, aChromeGlobal);
|
||||
}
|
||||
if (preferredIcon) {
|
||||
if (preferredIcon.type) {
|
||||
setIconForLink(preferredIcon, aChromeGlobal);
|
||||
} else if (defaultIcon) {
|
||||
setIconForLink(defaultIcon, aChromeGlobal);
|
||||
|
@ -8,7 +8,7 @@ label:not(.menu-text),
|
||||
textbox,
|
||||
description,
|
||||
.tab-text,
|
||||
caption > label {
|
||||
caption label {
|
||||
font-size: 1.11rem;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ window * {
|
||||
font-size: 1.11rem;
|
||||
}
|
||||
|
||||
caption > label:not(.dialogTitle) {
|
||||
caption label:not(.dialogTitle) {
|
||||
font-size: 1.27rem;
|
||||
}
|
||||
|
||||
|
@ -229,9 +229,8 @@
|
||||
|
||||
/* On Mac, native buttons keep their full opacity when they become disabled
|
||||
* and only the glyph or text on top of them becomes less opaque. */
|
||||
#main-window:not([customizing]) #back-button[disabled="true"] > .toolbarbutton-icon {
|
||||
:root:not([customizing]) #back-button[disabled="true"] {
|
||||
opacity: 1 !important;
|
||||
-moz-context-properties: fill, fill-opacity;
|
||||
/* Disabled toolbar buttons get an opacity of 0.4 which multiplies
|
||||
* their fill-opacity of 0.7. calc() doesn't work here - we'd need
|
||||
* to multiply two unitless numbers and that's invalid in CSS, so
|
||||
|
@ -13,7 +13,7 @@ label:not(.menu-text),
|
||||
textbox,
|
||||
description,
|
||||
.tab-text,
|
||||
caption > label {
|
||||
caption label {
|
||||
font-size: 1.36rem;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ window * {
|
||||
font-size: 1.36rem;
|
||||
}
|
||||
|
||||
caption > label:not(.dialogTitle) {
|
||||
caption label:not(.dialogTitle) {
|
||||
font-size: 1.55rem;
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ tabbrowser {
|
||||
}
|
||||
|
||||
#TabsToolbar[brighttext] .tabbrowser-tab:not([visuallyselected=true]) {
|
||||
--tab-loading-fill: #fff;
|
||||
--tab-loading-fill: #bbbbff;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[schedulepressure] .tab-throbber,
|
||||
|
@ -8,7 +8,7 @@ label:not(.menu-text),
|
||||
textbox,
|
||||
description,
|
||||
.tab-text,
|
||||
caption > label {
|
||||
caption label {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ window * {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
caption > label:not(.dialogTitle) {
|
||||
caption label:not(.dialogTitle) {
|
||||
font-size: 1.42rem;
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,10 @@ function getTargetForSelectedTab() {
|
||||
return target;
|
||||
}
|
||||
|
||||
function selectToolbox() {
|
||||
return gDevTools.getToolbox(getTargetForSelectedTab()).win.document.querySelector("#toolbox-container");
|
||||
}
|
||||
|
||||
this.DevTools = {
|
||||
init(libDir) {
|
||||
let panels = ["options", "webconsole", "jsdebugger", "styleeditor",
|
||||
@ -28,7 +32,7 @@ this.DevTools = {
|
||||
|
||||
panels.forEach(panel => {
|
||||
this.configurations[panel] = {};
|
||||
this.configurations[panel].selectors = ["#toolbox-container"];
|
||||
this.configurations[panel].selectors = [selectToolbox];
|
||||
this.configurations[panel].applyConfig = async function() {
|
||||
await gDevTools.showToolbox(getTargetForSelectedTab(), panel, "bottom");
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
@ -38,21 +42,21 @@ this.DevTools = {
|
||||
|
||||
configurations: {
|
||||
bottomToolbox: {
|
||||
selectors: ["#toolbox-container"],
|
||||
selectors: [selectToolbox],
|
||||
async applyConfig() {
|
||||
await gDevTools.showToolbox(getTargetForSelectedTab(), "inspector", "bottom");
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
},
|
||||
},
|
||||
sideToolbox: {
|
||||
selectors: ["#toolbox-container"],
|
||||
selectors: [selectToolbox],
|
||||
async applyConfig() {
|
||||
await gDevTools.showToolbox(getTargetForSelectedTab(), "inspector", "side");
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
},
|
||||
},
|
||||
undockedToolbox: {
|
||||
selectors: ["#toolbox-container"],
|
||||
selectors: [selectToolbox],
|
||||
windowType: "devtools:toolbox",
|
||||
async applyConfig() {
|
||||
await gDevTools.showToolbox(getTargetForSelectedTab(), "inspector", "window");
|
||||
|
@ -0,0 +1,42 @@
|
||||
/* 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/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["UIDensities"];
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
this.UIDensities = {
|
||||
|
||||
init(libDir) {},
|
||||
|
||||
configurations: {
|
||||
compactDensity: {
|
||||
selectors: ["#navigator-toolbox, #appMenu-popup, #widget-overflow"],
|
||||
async applyConfig() {
|
||||
let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
browserWindow.gCustomizeMode.setUIDensity(browserWindow.gUIDensity.MODE_COMPACT);
|
||||
},
|
||||
},
|
||||
|
||||
normalDensity: {
|
||||
selectors: ["#navigator-toolbox, #appMenu-popup, #widget-overflow"],
|
||||
async applyConfig() {
|
||||
let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
browserWindow.gCustomizeMode.setUIDensity(browserWindow.gUIDensity.MODE_NORMAL);
|
||||
},
|
||||
},
|
||||
|
||||
touchDensity: {
|
||||
selectors: ["#navigator-toolbox, #appMenu-popup, #widget-overflow"],
|
||||
async applyConfig() {
|
||||
let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
browserWindow.gCustomizeMode.setUIDensity(browserWindow.gUIDensity.MODE_TOUCH);
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
@ -1508,8 +1508,8 @@ def select_linker(linker, c_compiler, developer_options, build_env, toolchain_fl
|
||||
version_check = ['-Wl,--version']
|
||||
cmd_base = c_compiler.wrapper + \
|
||||
[c_compiler.compiler] + c_compiler.flags
|
||||
lld = "-fuse-ld=" + linker
|
||||
cmd = cmd_base + [lld] + version_check
|
||||
lld = ["-fuse-ld=" + linker]
|
||||
cmd = cmd_base + lld + version_check
|
||||
if 'LLD' in check_cmd_output(*cmd).decode('utf-8'):
|
||||
return namespace(
|
||||
KIND='lld',
|
||||
|
@ -7,7 +7,15 @@ devtools.jar:
|
||||
content/shared/vendor/d3.js (shared/vendor/d3.js)
|
||||
content/shared/vendor/dagre-d3.js (shared/vendor/dagre-d3.js)
|
||||
content/shared/widgets/widgets.css (shared/widgets/widgets.css)
|
||||
content/netmonitor/src/assets/styles/httpi.css (netmonitor/src/assets/styles/httpi.css)
|
||||
content/netmonitor/src/assets/styles/MdnLink.css (netmonitor/src/assets/styles/MdnLink.css)
|
||||
content/netmonitor/src/assets/styles/netmonitor.css (netmonitor/src/assets/styles/netmonitor.css)
|
||||
content/netmonitor/src/assets/styles/NetworkDetailsPanel.css (netmonitor/src/assets/styles/NetworkDetailsPanel.css)
|
||||
content/netmonitor/src/assets/styles/RequestList.css (netmonitor/src/assets/styles/RequestList.css)
|
||||
content/netmonitor/src/assets/styles/StatisticsPanel.css (netmonitor/src/assets/styles/StatisticsPanel.css)
|
||||
content/netmonitor/src/assets/styles/StatusBar.css (netmonitor/src/assets/styles/StatusBar.css)
|
||||
content/netmonitor/src/assets/styles/Toolbar.css (netmonitor/src/assets/styles/Toolbar.css)
|
||||
content/netmonitor/src/assets/styles/variables.css (netmonitor/src/assets/styles/variables.css)
|
||||
content/shared/widgets/VariablesView.xul (shared/widgets/VariablesView.xul)
|
||||
content/netmonitor/index.html (netmonitor/index.html)
|
||||
content/webconsole/webconsole.html (webconsole/webconsole.html)
|
||||
|
20
devtools/client/netmonitor/src/assets/styles/MdnLink.css
Normal file
20
devtools/client/netmonitor/src/assets/styles/MdnLink.css
Normal file
@ -0,0 +1,20 @@
|
||||
/* 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/. */
|
||||
|
||||
/* Learn more links */
|
||||
|
||||
.network-monitor .learn-more-link::before {
|
||||
background-image: url(chrome://devtools/skin/images/help.svg);
|
||||
}
|
||||
|
||||
.network-monitor .tree-container .treeTable tr .learn-more-link {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.network-monitor .tree-container .treeTable tr:not(:hover) .learn-more-link {
|
||||
opacity: 0.1;
|
||||
}
|
@ -0,0 +1,396 @@
|
||||
/* 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/. */
|
||||
|
||||
/* Network details panel */
|
||||
|
||||
.network-monitor .network-details-panel {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.network-monitor .panel-container {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.network-monitor .panel-container,
|
||||
.network-monitor .properties-view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.network-monitor .panel-container .tree-container .objectBox {
|
||||
white-space: normal;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.network-monitor .properties-view {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.network-monitor .properties-view .searchbox-section {
|
||||
flex: 0 1 auto;
|
||||
}
|
||||
|
||||
.network-monitor .properties-view .devtools-searchbox {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.network-monitor .properties-view .devtools-searchbox input {
|
||||
margin: 1px 3px;
|
||||
}
|
||||
|
||||
/* Empty notices in tab panels */
|
||||
|
||||
.network-monitor .empty-notice {
|
||||
color: var(--theme-body-color-inactive);
|
||||
padding: 3px 8px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
/* Text inputs in tab panels */
|
||||
|
||||
.network-monitor .textbox-input {
|
||||
text-overflow: ellipsis;
|
||||
border: none;
|
||||
background: none;
|
||||
color: inherit;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.network-monitor .textbox-input:focus {
|
||||
outline: 0;
|
||||
box-shadow: var(--theme-focus-box-shadow-textbox);
|
||||
}
|
||||
|
||||
/* Tree table in tab panels */
|
||||
|
||||
.network-monitor .tree-container, .tree-container .treeTable {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.network-monitor .tree-container .treeTable,
|
||||
.network-monitor .tree-container .treeTable tbody {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.network-monitor .tree-container .treeTable tbody {
|
||||
/* Apply flex to table will create an anonymous table element outside of tbody
|
||||
* See also http://stackoverflow.com/a/30851678
|
||||
* Therefore, we set height with this magic number in order to remove the
|
||||
* redundant scrollbar when source editor appears.
|
||||
*/
|
||||
height: calc(100% - 4px);
|
||||
}
|
||||
|
||||
.network-monitor .tree-container .treeTable tr {
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Make right td fill available horizontal space */
|
||||
.network-monitor .tree-container .treeTable td:last-child {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.network-monitor .properties-view .devtools-searchbox,
|
||||
.network-monitor .tree-container .treeTable .tree-section {
|
||||
width: 100%;
|
||||
background-color: var(--theme-toolbar-background);
|
||||
}
|
||||
|
||||
.network-monitor .tree-container .treeTable tr.tree-section:not(:first-child) td:not([class=""]) {
|
||||
border-top: 1px solid var(--theme-splitter-color);
|
||||
}
|
||||
|
||||
.network-monitor .properties-view .devtools-searchbox,
|
||||
.network-monitor .tree-container .treeTable tr.tree-section:not(:last-child) td:not([class=""]) {
|
||||
border-bottom: 1px solid var(--theme-splitter-color);
|
||||
}
|
||||
|
||||
.network-monitor .tree-container .treeTable .tree-section > * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.network-monitor .tree-container .treeTable .treeRow.tree-section > .treeLabelCell > .treeLabel,
|
||||
.network-monitor .tree-container .treeTable .treeRow.tree-section > .treeLabelCell > .treeLabel:hover,
|
||||
.network-monitor .tree-container .treeTable .treeRow.tree-section > .treeValueCell:not(:hover) * {
|
||||
color: var(--theme-toolbar-color);
|
||||
}
|
||||
|
||||
.network-monitor .tree-container .treeTable .treeValueCell {
|
||||
/* FIXME: Make value cell can be reduced to shorter width */
|
||||
max-width: 0;
|
||||
padding-inline-end: 5px;
|
||||
}
|
||||
|
||||
/* Source editor in tab panels */
|
||||
|
||||
/* If there is a source editor shows up in the last row of TreeView,
|
||||
* it should occupy the available vertical space.
|
||||
*/
|
||||
.network-monitor .tree-container .treeTable .editor-row-container,
|
||||
.network-monitor .tree-container .treeTable tr:last-child td[colspan="2"] {
|
||||
display: block;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.network-monitor .source-editor-mount {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.network-monitor .headers-summary-label,
|
||||
.network-monitor .tree-container .objectBox {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Summary tabpanel */
|
||||
|
||||
.network-monitor .tabpanel-summary-container {
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.network-monitor .tabpanel-summary-label {
|
||||
display: inline-block;
|
||||
padding-inline-start: 4px;
|
||||
padding-inline-end: 3px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.network-monitor .tabpanel-summary-value {
|
||||
color: inherit;
|
||||
padding-inline-start: 3px;
|
||||
}
|
||||
|
||||
.theme-dark .network-monitor .tabpanel-summary-value {
|
||||
color: var(--theme-selection-color);
|
||||
}
|
||||
|
||||
/* Headers tabpanel */
|
||||
|
||||
.network-monitor .headers-overview {
|
||||
background: var(--theme-toolbar-background);
|
||||
}
|
||||
|
||||
.network-monitor .headers-summary,
|
||||
.network-monitor .response-summary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.network-monitor .headers-summary .devtools-button {
|
||||
margin-inline-end: 6px;
|
||||
}
|
||||
|
||||
.network-monitor .headers-summary .requests-list-status-icon {
|
||||
min-width: 10px;
|
||||
}
|
||||
|
||||
.network-monitor .headers-summary .raw-headers-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.network-monitor .headers-summary .raw-headers {
|
||||
width: 50%;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
.network-monitor .headers-summary .raw-headers textarea {
|
||||
width: 100%;
|
||||
height: 50vh;
|
||||
font: message-box;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.network-monitor .headers-summary .raw-headers .tabpanel-summary-label {
|
||||
padding: 0 0 4px 0;
|
||||
}
|
||||
|
||||
.headers-summary .textbox-input {
|
||||
margin-inline-end: 2px;
|
||||
}
|
||||
|
||||
.network-monitor .headers-summary .status-text {
|
||||
width: auto!important;
|
||||
}
|
||||
|
||||
/* Response tabpanel */
|
||||
|
||||
.network-monitor .response-error-header {
|
||||
margin: 0;
|
||||
padding: 3px 8px;
|
||||
background-color: var(--theme-highlight-red);
|
||||
color: var(--theme-selection-color);
|
||||
}
|
||||
|
||||
.network-monitor .response-image-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow-y: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.network-monitor .response-image {
|
||||
background: #fff;
|
||||
border: 1px dashed GrayText;
|
||||
margin-bottom: 10px;
|
||||
max-width: 300px;
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
/* Timings tabpanel */
|
||||
|
||||
.network-monitor .timings-container {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.network-monitor .timings-label {
|
||||
width: 10em;
|
||||
}
|
||||
|
||||
.network-monitor .requests-list-timings-container {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.network-monitor .requests-list-timings-offset {
|
||||
transition: width 0.2s ease-out;
|
||||
}
|
||||
|
||||
.network-monitor .requests-list-timings-box {
|
||||
border: none;
|
||||
min-width: 1px;
|
||||
transition: width 0.2s ease-out;
|
||||
}
|
||||
|
||||
.theme-firebug .network-monitor .requests-list-timings-total {
|
||||
color: var(--theme-body-color);
|
||||
}
|
||||
|
||||
/* Stack trace panel */
|
||||
|
||||
.network-monitor .stack-trace {
|
||||
font-family: var(--monospace-font-family);
|
||||
/* The markup contains extra whitespace to improve formatting of clipboard text.
|
||||
Make sure this whitespace doesn't affect the HTML rendering */
|
||||
white-space: normal;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.network-monitor .stack-trace .frame-link-source,
|
||||
.network-monitor .message-location .frame-link-source {
|
||||
/* Makes the file name truncated (and ellipsis shown) on the left side */
|
||||
direction: rtl;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.network-monitor .stack-trace .frame-link-source-inner,
|
||||
.network-monitor .message-location .frame-link-source-inner {
|
||||
/* Enforce LTR direction for the file name - fixes bug 1290056 */
|
||||
direction: ltr;
|
||||
unicode-bidi: embed;
|
||||
}
|
||||
|
||||
.network-monitor .stack-trace .frame-link-function-display-name {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
margin-inline-end: 1ch;
|
||||
}
|
||||
|
||||
/* Security tabpanel */
|
||||
|
||||
/* Overwrite tree-view cell colon `:` for security panel and tree section */
|
||||
.network-monitor .security-panel .treeTable .treeLabelCell::after,
|
||||
.network-monitor .treeTable .tree-section .treeLabelCell::after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
/* Layout additional warning icon in tree value cell */
|
||||
.network-monitor .security-info-value {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.network-monitor .security-warning-icon {
|
||||
background-image: url(chrome://devtools/skin/images/alerticon-warning.png);
|
||||
background-size: 13px 12px;
|
||||
margin-inline-start: 5px;
|
||||
vertical-align: top;
|
||||
width: 13px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
@media (min-resolution: 1.1dppx) {
|
||||
.network-monitor .security-warning-icon {
|
||||
background-image: url(chrome://devtools/skin/images/alerticon-warning@2x.png);
|
||||
}
|
||||
}
|
||||
|
||||
/* Custom request panel */
|
||||
|
||||
.network-monitor .custom-request-panel {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
padding: 0 4px;
|
||||
background-color: var(--theme-sidebar-background);
|
||||
}
|
||||
|
||||
.theme-dark .network-monitor .custom-request-panel {
|
||||
color: var(--theme-selection-color);
|
||||
}
|
||||
|
||||
.network-monitor .custom-request-label {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.network-monitor .custom-request-panel textarea {
|
||||
resize: none;
|
||||
font: message-box;
|
||||
}
|
||||
|
||||
.network-monitor .custom-header,
|
||||
.network-monitor .custom-method-and-url,
|
||||
.network-monitor .custom-request,
|
||||
.network-monitor .custom-section {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.network-monitor .custom-header {
|
||||
flex-grow: 1;
|
||||
font-size: 1.1em;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
.network-monitor .custom-section {
|
||||
flex-direction: column;
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
.network-monitor .custom-method-value {
|
||||
width: 4.5em;
|
||||
}
|
||||
|
||||
.network-monitor .custom-url-value {
|
||||
flex-grow: 1;
|
||||
margin-inline-start: 6px;
|
||||
}
|
651
devtools/client/netmonitor/src/assets/styles/RequestList.css
Normal file
651
devtools/client/netmonitor/src/assets/styles/RequestList.css
Normal file
@ -0,0 +1,651 @@
|
||||
/* 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/. */
|
||||
|
||||
/* Request list empty panel */
|
||||
|
||||
.request-list-empty-notice {
|
||||
margin: 0;
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.empty-notice-element {
|
||||
padding-top: 12px;
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.notice-perf-message {
|
||||
margin-top: 2px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.requests-list-perf-notice-button {
|
||||
min-width: 30px;
|
||||
min-height: 26px;
|
||||
margin: 0 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.requests-list-perf-notice-button::before {
|
||||
background-image: url(chrome://devtools/skin/images/profiler-stopwatch.svg);
|
||||
}
|
||||
|
||||
.requests-list-reload-notice-button {
|
||||
font-size: inherit;
|
||||
min-height: 26px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
/* Requests list table */
|
||||
|
||||
.request-list-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.requests-list-wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.requests-list-table {
|
||||
display: table;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.requests-list-contents {
|
||||
display: table-row-group;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
--timings-scale: 1;
|
||||
--timings-rev-scale: 1;
|
||||
}
|
||||
|
||||
.requests-list-column {
|
||||
display: table-cell;
|
||||
cursor: default;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
vertical-align: middle;
|
||||
max-width: 50px;
|
||||
min-width: 50px;
|
||||
}
|
||||
|
||||
.requests-list-column > * {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.theme-firebug .requests-list-column {
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
/* Requests list headers */
|
||||
|
||||
.requests-list-headers-wrapper {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.requests-list-headers {
|
||||
display: table-header-group;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.requests-list-headers .requests-list-column:first-child .requests-list-header-button {
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
.requests-list-header-button {
|
||||
background-color: transparent;
|
||||
border-image: linear-gradient(transparent 15%,
|
||||
var(--theme-splitter-color) 15%,
|
||||
var(--theme-splitter-color) 85%,
|
||||
transparent 85%) 1 1;
|
||||
border-width: 0;
|
||||
border-inline-start-width: 1px;
|
||||
padding-inline-start: 16px;
|
||||
width: 100%;
|
||||
min-height: 23px;
|
||||
text-align: center;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.requests-list-header-button::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.requests-list-header-button:hover {
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.requests-list-header-button > .button-text {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
/* Align button text to center */
|
||||
width: calc(100% - 8px);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.requests-list-header-button > .button-icon {
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 4px;
|
||||
margin-inline-start: 3px;
|
||||
margin-inline-end: 6px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.requests-list-header-button[data-sorted=ascending] > .button-icon {
|
||||
background-image: var(--sort-ascending-image);
|
||||
}
|
||||
|
||||
.requests-list-header-button[data-sorted=descending] > .button-icon {
|
||||
background-image: var(--sort-descending-image);
|
||||
}
|
||||
|
||||
.requests-list-header-button[data-sorted],
|
||||
.requests-list-header-button[data-sorted]:hover {
|
||||
background-color: var(--theme-selection-background);
|
||||
color: var(--theme-selection-color);
|
||||
}
|
||||
|
||||
.requests-list-header-button[data-sorted],
|
||||
.requests-list-column[data-active] + .requests-list-column .requests-list-header-button {
|
||||
border-image: linear-gradient(var(--theme-splitter-color), var(--theme-splitter-color)) 1 1;
|
||||
}
|
||||
|
||||
.theme-firebug .requests-list-headers {
|
||||
padding: 0 !important;
|
||||
font-weight: bold;
|
||||
background: linear-gradient(rgba(255, 255, 255, 0.05),
|
||||
rgba(0, 0, 0, 0.05)),
|
||||
#C8D2DC;
|
||||
}
|
||||
|
||||
.theme-firebug .requests-list-header-button {
|
||||
min-height: 17px;
|
||||
}
|
||||
|
||||
.theme-firebug .requests-list-header-button > .button-icon {
|
||||
height: 7px;
|
||||
}
|
||||
|
||||
.theme-firebug .requests-list-header-button[data-sorted] {
|
||||
background-color: #AAC3DC;
|
||||
}
|
||||
|
||||
:root[platform="linux"].theme-firebug .requests-list-header-button[data-sorted] {
|
||||
background-color: #FAC8AF !important;
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
.theme-firebug .requests-list-header-button:hover:active {
|
||||
background-image: linear-gradient(rgba(0, 0, 0, 0.1),
|
||||
transparent);
|
||||
}
|
||||
|
||||
/* Requests list column */
|
||||
|
||||
/* Status column */
|
||||
|
||||
.requests-list-status {
|
||||
width: 8%;
|
||||
/* Don't ellipsize status codes */
|
||||
text-overflow: initial;
|
||||
}
|
||||
|
||||
.theme-firebug .requests-list-status {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.requests-list-status-code {
|
||||
margin-inline-start: 3px;
|
||||
width: 3em;
|
||||
}
|
||||
|
||||
.requests-list-status-icon {
|
||||
background: #fff;
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
margin-inline-start: 5px;
|
||||
margin-inline-end: 5px;
|
||||
border-radius: 10px;
|
||||
transition: box-shadow 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
.request-list-item.selected .requests-list-status-icon {
|
||||
filter: brightness(1.3);
|
||||
}
|
||||
|
||||
.requests-list-status-icon:not([data-code]) {
|
||||
background-color: var(--theme-content-color2);
|
||||
}
|
||||
|
||||
.requests-list-status-icon[data-code="cached"] {
|
||||
border: 2px solid var(--theme-content-color2);
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.requests-list-status-icon[data-code^="1"] {
|
||||
background-color: var(--theme-highlight-blue);
|
||||
}
|
||||
|
||||
.requests-list-status-icon[data-code^="2"] {
|
||||
background-color: var(--theme-highlight-green);
|
||||
}
|
||||
|
||||
/* 3xx are triangles */
|
||||
.requests-list-status-icon[data-code^="3"] {
|
||||
background-color: transparent;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 5px solid transparent;
|
||||
border-right: 5px solid transparent;
|
||||
border-bottom: 10px solid var(--theme-highlight-lightorange);
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/* 4xx and 5xx are squares - error codes */
|
||||
.requests-list-status-icon[data-code^="4"] {
|
||||
background-color: var(--theme-highlight-red);
|
||||
border-radius: 0; /* squares */
|
||||
}
|
||||
|
||||
.requests-list-status-icon[data-code^="5"] {
|
||||
background-color: var(--theme-highlight-pink);
|
||||
border-radius: 0;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
/* Method column */
|
||||
|
||||
.requests-list-method {
|
||||
width: 8%;
|
||||
}
|
||||
|
||||
.theme-firebug .requests-list-method {
|
||||
color: rgb(128, 128, 128);
|
||||
}
|
||||
|
||||
/* File column */
|
||||
|
||||
.requests-list-file {
|
||||
width: 22%;
|
||||
}
|
||||
|
||||
.requests-list-file.requests-list-column {
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.requests-list-icon {
|
||||
background: transparent;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
margin: 0 4px;
|
||||
outline: 1px solid var(--table-splitter-color);
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/* Protocol column */
|
||||
|
||||
.requests-list-protocol {
|
||||
width: 8%;
|
||||
}
|
||||
|
||||
/* Cookies column */
|
||||
|
||||
.requests-list-cookies {
|
||||
width: 6%;
|
||||
}
|
||||
|
||||
/* Set Cookies column */
|
||||
|
||||
.requests-list-set-cookies {
|
||||
width: 8%;
|
||||
}
|
||||
|
||||
/* Scheme column */
|
||||
|
||||
.requests-list-scheme {
|
||||
width: 8%;
|
||||
}
|
||||
|
||||
/* Domain column */
|
||||
|
||||
.requests-list-domain {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
/* Start Time column */
|
||||
|
||||
.requests-list-start-time {
|
||||
width: 8%;
|
||||
}
|
||||
|
||||
/* End Time column */
|
||||
|
||||
.requests-list-end-time {
|
||||
width: 8%;
|
||||
}
|
||||
|
||||
/* Response Time column */
|
||||
|
||||
.requests-list-response-time {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
/* Duration column */
|
||||
|
||||
.requests-list-duration {
|
||||
width: 8%;
|
||||
}
|
||||
|
||||
/* Latency column */
|
||||
|
||||
.requests-list-latency {
|
||||
width: 8%;
|
||||
}
|
||||
|
||||
.requests-list-response-header {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.requests-list-domain.requests-list-column {
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.requests-security-state-icon {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: 0 4px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.request-list-item.selected .requests-security-state-icon {
|
||||
filter: brightness(1.3);
|
||||
}
|
||||
|
||||
.security-state-insecure {
|
||||
background-image: url(chrome://devtools/skin/images/security-state-insecure.svg);
|
||||
}
|
||||
|
||||
.security-state-secure {
|
||||
background-image: url(chrome://devtools/skin/images/security-state-secure.svg);
|
||||
}
|
||||
|
||||
.security-state-weak {
|
||||
background-image: url(chrome://devtools/skin/images/security-state-weak.svg);
|
||||
}
|
||||
|
||||
.security-state-broken {
|
||||
background-image: url(chrome://devtools/skin/images/security-state-broken.svg);
|
||||
}
|
||||
|
||||
.security-state-local {
|
||||
background-image: url(chrome://devtools/skin/images/globe.svg);
|
||||
}
|
||||
|
||||
/* RemoteIP column */
|
||||
|
||||
.requests-list-remoteip {
|
||||
width: 9%;
|
||||
}
|
||||
|
||||
/* Cause column */
|
||||
|
||||
.requests-list-cause {
|
||||
width: 9%;
|
||||
}
|
||||
|
||||
.requests-list-cause-stack {
|
||||
display: inline-block;
|
||||
background-color: var(--theme-body-color-alt);
|
||||
color: var(--theme-body-background);
|
||||
font-size: 8px;
|
||||
font-weight: bold;
|
||||
line-height: 10px;
|
||||
border-radius: 3px;
|
||||
padding: 0 2px;
|
||||
margin: 0;
|
||||
margin-inline-end: 3px;
|
||||
}
|
||||
|
||||
/* Type column */
|
||||
|
||||
.requests-list-type {
|
||||
width: 6%;
|
||||
}
|
||||
|
||||
/* Transferred column */
|
||||
|
||||
.requests-list-transferred {
|
||||
width: 9%;
|
||||
}
|
||||
|
||||
/* Size column */
|
||||
|
||||
.requests-list-size {
|
||||
width: 7%;
|
||||
}
|
||||
|
||||
.theme-firebug .requests-list-size {
|
||||
justify-content: end;
|
||||
padding-inline-end: 4px;
|
||||
}
|
||||
|
||||
/* Waterfall column */
|
||||
|
||||
.requests-list-waterfall {
|
||||
width: 20vw;
|
||||
max-width: 20vw;
|
||||
min-width: 20vw;
|
||||
background-repeat: repeat-y;
|
||||
background-position: left center;
|
||||
/* Background created on a <canvas> in js. */
|
||||
/* @see devtools/client/netmonitor/src/waterfall-background.js */
|
||||
background-image: -moz-element(#waterfall-background);
|
||||
}
|
||||
|
||||
.requests-list-waterfall:dir(rtl) {
|
||||
background-position: right center;
|
||||
}
|
||||
|
||||
.requests-list-waterfall > .requests-list-header-button {
|
||||
padding-inline-start: 0;
|
||||
}
|
||||
|
||||
.requests-list-waterfall > .requests-list-header-button > .button-text {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.requests-list-waterfall-label-wrapper:not(.requests-list-waterfall-visible) {
|
||||
padding-inline-start: 16px;
|
||||
}
|
||||
|
||||
.requests-list-timings-division {
|
||||
display: inline-block;
|
||||
padding-inline-start: 4px;
|
||||
font-size: 75%;
|
||||
pointer-events: none;
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
:root[platform="win"] .requests-list-timings-division {
|
||||
padding-top: 1px;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
.requests-list-timings-division:not(:first-child) {
|
||||
border-inline-start: 1px dashed;
|
||||
}
|
||||
|
||||
.requests-list-timings-division:dir(ltr) {
|
||||
transform-origin: left center;
|
||||
}
|
||||
|
||||
.requests-list-timings-division:dir(rtl) {
|
||||
transform-origin: right center;
|
||||
}
|
||||
|
||||
.theme-dark .requests-list-timings-division {
|
||||
border-inline-start-color: #5a6169 !important;
|
||||
}
|
||||
|
||||
.theme-light .requests-list-timings-division {
|
||||
border-inline-start-color: #585959 !important;
|
||||
}
|
||||
|
||||
.requests-list-timings-division[data-division-scale=second],
|
||||
.requests-list-timings-division[data-division-scale=minute] {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.requests-list-timings {
|
||||
display: flex;
|
||||
flex: none;
|
||||
align-items: center;
|
||||
transform: scaleX(var(--timings-scale));
|
||||
}
|
||||
|
||||
.requests-list-timings:dir(ltr) {
|
||||
transform-origin: left center;
|
||||
}
|
||||
|
||||
.requests-list-timings:dir(rtl) {
|
||||
transform-origin: right center;
|
||||
}
|
||||
|
||||
.requests-list-timings-box {
|
||||
display: inline-block;
|
||||
height: 9px;
|
||||
}
|
||||
|
||||
.theme-firebug .requests-list-timings-box {
|
||||
background-image: linear-gradient(rgba(255, 255, 255, 0.3), rgba(0, 0, 0, 0.2));
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.requests-list-timings-box.blocked {
|
||||
background-color: var(--timing-blocked-color);
|
||||
}
|
||||
|
||||
.requests-list-timings-box.dns {
|
||||
background-color: var(--timing-dns-color);
|
||||
}
|
||||
|
||||
.requests-list-timings-box.connect {
|
||||
background-color: var(--timing-connect-color);
|
||||
}
|
||||
|
||||
.requests-list-timings-box.ssl {
|
||||
background-color: var(--timing-ssl-color);
|
||||
}
|
||||
|
||||
.requests-list-timings-box.send {
|
||||
background-color: var(--timing-send-color);
|
||||
}
|
||||
|
||||
.requests-list-timings-box.wait {
|
||||
background-color: var(--timing-wait-color);
|
||||
}
|
||||
|
||||
.requests-list-timings-box.receive {
|
||||
background-color: var(--timing-receive-color);
|
||||
}
|
||||
|
||||
.requests-list-timings-total {
|
||||
display: inline-block;
|
||||
padding-inline-start: 4px;
|
||||
font-size: 85%;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
/* This node should not be scaled - apply a reversed transformation */
|
||||
transform: scaleX(var(--timings-rev-scale));
|
||||
}
|
||||
|
||||
.requests-list-timings-total:dir(ltr) {
|
||||
transform-origin: left center;
|
||||
}
|
||||
|
||||
.requests-list-timings-total:dir(rtl) {
|
||||
transform-origin: right center;
|
||||
}
|
||||
|
||||
/* Request list item */
|
||||
|
||||
.request-list-item {
|
||||
position: relative;
|
||||
display: table-row;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.request-list-item.selected {
|
||||
background-color: var(--theme-selection-background);
|
||||
color: var(--theme-selection-color);
|
||||
}
|
||||
|
||||
.request-list-item:not(.selected).odd {
|
||||
background-color: var(--table-zebra-background);
|
||||
}
|
||||
|
||||
.request-list-item:not(.selected):hover {
|
||||
background-color: var(--theme-selection-background-hover);
|
||||
}
|
||||
|
||||
.request-list-item.fromCache > .requests-list-column:not(.requests-list-waterfall) {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.theme-firebug .request-list-item:not(.selected):hover {
|
||||
background: #EFEFEF;
|
||||
}
|
||||
|
||||
/* Responsive web design support */
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.requests-list-header-button {
|
||||
padding-inline-start: 8px;
|
||||
}
|
||||
|
||||
.requests-list-status-code {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.requests-list-size {
|
||||
/* Given a fix max-width to display all columns in RWD mode */
|
||||
max-width: 7%;
|
||||
}
|
||||
|
||||
.requests-list-waterfall {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root[platform="linux"] .requests-list-header-button {
|
||||
font-size: 85%;
|
||||
}
|
||||
}
|
197
devtools/client/netmonitor/src/assets/styles/StatisticsPanel.css
Normal file
197
devtools/client/netmonitor/src/assets/styles/StatisticsPanel.css
Normal file
@ -0,0 +1,197 @@
|
||||
/* 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/. */
|
||||
|
||||
/* Statistics panel */
|
||||
|
||||
.statistics-panel {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.statistics-panel .devtools-toolbarbutton.back-button {
|
||||
min-width: 4em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
border-inline-start: none;
|
||||
}
|
||||
|
||||
.statistics-panel .splitter {
|
||||
border-color: rgba(0,0,0,0.2);
|
||||
cursor: default;
|
||||
pointer-events: none;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.statistics-panel .charts-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.statistics-panel .charts,
|
||||
.statistics-panel .pie-table-chart-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.statistics-panel .learn-more-link {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.statistics-panel .table-chart-title {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.pie-table-chart-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.statistics-panel .pie-chart-container {
|
||||
margin-inline-start: 3vw;
|
||||
margin-inline-end: 1vw;
|
||||
}
|
||||
|
||||
.statistics-panel .table-chart-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1 1 auto;
|
||||
min-width: 240px;
|
||||
margin-inline-start: 1vw;
|
||||
margin-inline-end: 3vw;
|
||||
}
|
||||
|
||||
.chart-colored-blob[name=html] {
|
||||
fill: var(--theme-highlight-bluegrey);
|
||||
background: var(--theme-highlight-bluegrey);
|
||||
}
|
||||
|
||||
.chart-colored-blob[name=css] {
|
||||
fill: var(--theme-highlight-blue);
|
||||
background: var(--theme-highlight-blue);
|
||||
}
|
||||
|
||||
.chart-colored-blob[name=js] {
|
||||
fill: var(--theme-highlight-lightorange);
|
||||
background: var(--theme-highlight-lightorange);
|
||||
}
|
||||
|
||||
.chart-colored-blob[name=xhr] {
|
||||
fill: var(--theme-highlight-orange);
|
||||
background: var(--theme-highlight-orange);
|
||||
}
|
||||
|
||||
.chart-colored-blob[name=fonts] {
|
||||
fill: var(--theme-highlight-purple);
|
||||
background: var(--theme-highlight-purple);
|
||||
}
|
||||
|
||||
.chart-colored-blob[name=images] {
|
||||
fill: var(--theme-highlight-pink);
|
||||
background: var(--theme-highlight-pink);
|
||||
}
|
||||
|
||||
.chart-colored-blob[name=media] {
|
||||
fill: var(--theme-highlight-green);
|
||||
background: var(--theme-highlight-green);
|
||||
}
|
||||
|
||||
.chart-colored-blob[name=flash] {
|
||||
fill: var(--theme-highlight-red);
|
||||
background: var(--theme-highlight-red);
|
||||
}
|
||||
|
||||
.table-chart-row {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.table-chart-row-label[name=cached] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.table-chart-row-label[name=count] {
|
||||
width: 3em;
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
.table-chart-row-label[name=label] {
|
||||
width: 7em;
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.table-chart-row-label[name=size] {
|
||||
width: 7em;
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.table-chart-row-label[name=time] {
|
||||
width: 7em;
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.table-chart-totals {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* Firebug theme support for statistics panel charts */
|
||||
|
||||
.theme-firebug .chart-colored-blob[name=html] {
|
||||
fill: rgba(94, 136, 176, 0.8); /* Blue-Grey highlight */
|
||||
background: rgba(94, 136, 176, 0.8);
|
||||
}
|
||||
|
||||
.theme-firebug .chart-colored-blob[name=css] {
|
||||
fill: rgba(70, 175, 227, 0.8); /* light blue */
|
||||
background: rgba(70, 175, 227, 0.8);
|
||||
}
|
||||
|
||||
.theme-firebug .chart-colored-blob[name=js] {
|
||||
fill: rgba(235, 83, 104, 0.8); /* red */
|
||||
background: rgba(235, 83, 104, 0.8);
|
||||
}
|
||||
|
||||
.theme-firebug .chart-colored-blob[name=xhr] {
|
||||
fill: rgba(217, 102, 41, 0.8); /* orange */
|
||||
background: rgba(217, 102, 41, 0.8);
|
||||
}
|
||||
|
||||
.theme-firebug .chart-colored-blob[name=fonts] {
|
||||
fill: rgba(223, 128, 255, 0.8); /* pink */
|
||||
background: rgba(223, 128, 255, 0.8);
|
||||
}
|
||||
|
||||
.theme-firebug .chart-colored-blob[name=images] {
|
||||
fill: rgba(112, 191, 83, 0.8); /* pink */
|
||||
background: rgba(112, 191, 83, 0.8);
|
||||
}
|
||||
|
||||
.theme-firebug .chart-colored-blob[name=media] {
|
||||
fill: rgba(235, 235, 84, 0.8); /* yellow */
|
||||
background: rgba(235, 235, 84, 0.8);
|
||||
}
|
||||
|
||||
.theme-firebug .chart-colored-blob[name=flash] {
|
||||
fill: rgba(84, 235, 159, 0.8); /* cyan */
|
||||
background: rgba(84, 235, 159, 0.8);
|
||||
}
|
||||
|
||||
/* Responsive web design support */
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.statistics-panel .charts-container {
|
||||
flex-direction: column;
|
||||
/* Minus 4em for statistics back button width */
|
||||
width: calc(100% - 4em);
|
||||
}
|
||||
|
||||
.statistics-panel .splitter {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
}
|
||||
}
|
||||
|
60
devtools/client/netmonitor/src/assets/styles/StatusBar.css
Normal file
60
devtools/client/netmonitor/src/assets/styles/StatusBar.css
Normal file
@ -0,0 +1,60 @@
|
||||
/* 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/. */
|
||||
|
||||
/* Status bar */
|
||||
|
||||
.devtools-status-bar-label {
|
||||
flex: 0;
|
||||
}
|
||||
|
||||
.status-bar-label {
|
||||
display: inline-flex;
|
||||
margin-inline-end: 10px;
|
||||
/* Status bar has just one line so, don't wrap labels */
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.status-bar-label:not(:first-of-type)::before {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
margin-inline-end: 10px;
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
width: 1px;
|
||||
background: var(--theme-splitter-color);
|
||||
}
|
||||
|
||||
.status-bar-label.dom-content-loaded {
|
||||
color: var(--theme-highlight-blue);
|
||||
}
|
||||
|
||||
.status-bar-label.load {
|
||||
color: var(--theme-highlight-red);
|
||||
}
|
||||
|
||||
.requests-list-network-summary-button {
|
||||
display: inline-flex;
|
||||
cursor: pointer;
|
||||
height: 18px;
|
||||
background: none;
|
||||
box-shadow: none;
|
||||
border-color: transparent;
|
||||
padding-inline-end: 0;
|
||||
margin-top: 3px;
|
||||
margin-bottom: 3px;
|
||||
margin-inline-end: 1em;
|
||||
}
|
||||
|
||||
.requests-list-network-summary-button > .summary-info-icon {
|
||||
background: url(chrome://devtools/skin/images/profiler-stopwatch.svg) no-repeat;
|
||||
-moz-context-properties: fill;
|
||||
fill: var(--theme-toolbar-color);
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.requests-list-network-summary-button:hover > .summary-info-icon {
|
||||
opacity: 1;
|
||||
}
|
71
devtools/client/netmonitor/src/assets/styles/Toolbar.css
Normal file
71
devtools/client/netmonitor/src/assets/styles/Toolbar.css
Normal file
@ -0,0 +1,71 @@
|
||||
/* 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/. */
|
||||
|
||||
/* Toolbar */
|
||||
|
||||
.devtools-toolbar {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.devtools-toolbar-container {
|
||||
height: auto;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.devtools-toolbar-group {
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.requests-list-filter-buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.devtools-button.devtools-pause-icon::before {
|
||||
background-image: var(--pause-icon-url);
|
||||
}
|
||||
|
||||
.devtools-button.devtools-play-icon::before {
|
||||
background-image: var(--play-icon-url);
|
||||
}
|
||||
|
||||
.devtools-checkbox {
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
bottom: 1px;
|
||||
}
|
||||
|
||||
.devtools-checkbox-label {
|
||||
margin-inline-start: 10px;
|
||||
margin-inline-end: 3px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Network details panel toggle */
|
||||
|
||||
.network-details-panel-toggle:dir(ltr)::before,
|
||||
.network-details-panel-toggle.pane-collapsed:dir(rtl)::before {
|
||||
background-image: var(--theme-pane-collapse-image);
|
||||
}
|
||||
|
||||
.network-details-panel-toggle.pane-collapsed:dir(ltr)::before,
|
||||
.network-details-panel-toggle:dir(rtl)::before {
|
||||
background-image: var(--theme-pane-expand-image);
|
||||
}
|
||||
|
||||
/* Responsive web design support */
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.network-details-panel-toggle:dir(ltr)::before {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.network-details-panel-toggle:dir(rtl)::before {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
}
|
19
devtools/client/netmonitor/src/assets/styles/httpi.css
Normal file
19
devtools/client/netmonitor/src/assets/styles/httpi.css
Normal file
@ -0,0 +1,19 @@
|
||||
/* 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/. */
|
||||
|
||||
@import "chrome://devtools/skin/widgets.css";
|
||||
@import "resource://devtools/client/themes/light-theme.css";
|
||||
@import "resource://devtools/client/shared/components/splitter/SplitBox.css";
|
||||
@import "resource://devtools/client/shared/components/tree/TreeView.css";
|
||||
@import "resource://devtools/client/shared/components/tabs/Tabs.css";
|
||||
@import "resource://devtools/client/shared/components/tabs/TabBar.css";
|
||||
@import "chrome://devtools/skin/components-frame.css";
|
||||
@import "chrome://devtools/content/sourceeditor/codemirror/lib/codemirror.css";
|
||||
@import "chrome://devtools/content/sourceeditor/codemirror/addon/dialog/dialog.css";
|
||||
@import "chrome://devtools/content/sourceeditor/codemirror/mozilla.css";
|
||||
|
||||
/* Network panel components & styles */
|
||||
@import "chrome://devtools/content/netmonitor/src/assets/styles/variables.css";
|
||||
@import "chrome://devtools/content/netmonitor/src/assets/styles/MdnLink.css";
|
||||
@import "chrome://devtools/content/netmonitor/src/assets/styles/NetworkDetailsPanel.css";
|
File diff suppressed because it is too large
Load Diff
46
devtools/client/netmonitor/src/assets/styles/variables.css
Normal file
46
devtools/client/netmonitor/src/assets/styles/variables.css
Normal file
@ -0,0 +1,46 @@
|
||||
/* 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/. */
|
||||
|
||||
:root.theme-dark {
|
||||
--table-splitter-color: rgba(255,255,255,0.15);
|
||||
--table-zebra-background: rgba(255,255,255,0.05);
|
||||
|
||||
--timing-blocked-color: rgba(235, 83, 104, 0.8);
|
||||
--timing-dns-color: rgba(223, 128, 255, 0.8); /* pink */
|
||||
--timing-ssl-color: rgba(217, 102, 41, 0.8); /* orange */
|
||||
--timing-connect-color: rgba(217, 102, 41, 0.8); /* orange */
|
||||
--timing-send-color: rgba(70, 175, 227, 0.8); /* light blue */
|
||||
--timing-wait-color: rgba(94, 136, 176, 0.8); /* blue grey */
|
||||
--timing-receive-color: rgba(112, 191, 83, 0.8); /* green */
|
||||
|
||||
--sort-ascending-image: url(chrome://devtools/skin/images/sort-ascending-arrow.svg);
|
||||
--sort-descending-image: url(chrome://devtools/skin/images/sort-descending-arrow.svg);
|
||||
}
|
||||
|
||||
:root.theme-light {
|
||||
--table-splitter-color: rgba(0,0,0,0.15);
|
||||
--table-zebra-background: rgba(0,0,0,0.05);
|
||||
|
||||
--timing-blocked-color: rgba(235, 83, 104, 0.8);
|
||||
--timing-dns-color: rgba(223, 128, 255, 0.8); /* pink */
|
||||
--timing-ssl-color: rgba(217, 102, 41, 0.8); /* orange */
|
||||
--timing-connect-color: rgba(217, 102, 41, 0.8); /* orange */
|
||||
--timing-send-color: rgba(0, 136, 204, 0.8); /* blue */
|
||||
--timing-wait-color: rgba(95, 136, 176, 0.8); /* blue grey */
|
||||
--timing-receive-color: rgba(44, 187, 15, 0.8); /* green */
|
||||
|
||||
--sort-ascending-image: url(chrome://devtools/skin/images/sort-ascending-arrow.svg);
|
||||
--sort-descending-image: url(chrome://devtools/skin/images/sort-descending-arrow.svg);
|
||||
}
|
||||
|
||||
:root.theme-firebug {
|
||||
--sort-ascending-image: url(chrome://devtools/skin/images/firebug/arrow-up.svg);
|
||||
--sort-descending-image: url(chrome://devtools/skin/images/firebug/arrow-down.svg);
|
||||
}
|
||||
|
||||
/* Icons */
|
||||
:root {
|
||||
--play-icon-url: url("chrome://devtools/skin/images/play.svg");
|
||||
--pause-icon-url: url("chrome://devtools/skin/images/pause.svg");
|
||||
}
|
@ -416,6 +416,7 @@ html #webconsole-notificationbox {
|
||||
background-size: 16px 16px;
|
||||
background-position: 4px 50%;
|
||||
color: var(--theme-content-color1);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.jsterm-complete-node {
|
||||
@ -1134,7 +1135,6 @@ a.learn-more-link.webconsole-learn-more-link {
|
||||
|
||||
html,
|
||||
body {
|
||||
display: block !important; /* Until Bug 1409413 removes the accidental display: flex */
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
@ -28,7 +28,7 @@ require("../../themes/light-theme.css");
|
||||
require("../../shared/components/reps/reps.css");
|
||||
require("../../shared/components/tabs/Tabs.css");
|
||||
require("../../shared/components/tabs/TabBar.css");
|
||||
require("../../netmonitor/src/assets/styles/netmonitor.css");
|
||||
require("../../netmonitor/src/assets/styles/httpi.css");
|
||||
|
||||
pref("devtools.debugger.remote-timeout", 10000);
|
||||
pref("devtools.hud.loglimit", 10000);
|
||||
|
@ -120,7 +120,8 @@ function NetworkEventMessage({
|
||||
|
||||
// Only render the attachment if the network-event is
|
||||
// actually opened (performance optimization).
|
||||
const attachment = open && dom.div({className: "network-info devtools-monospace"},
|
||||
const attachment = open && dom.div({
|
||||
className: "network-info network-monitor devtools-monospace"},
|
||||
TabboxPanel({
|
||||
connector,
|
||||
activeTabId: networkMessageActiveTabId,
|
||||
|
@ -13,7 +13,7 @@
|
||||
<link rel="stylesheet" href="resource://devtools/client/shared/components/tabs/Tabs.css"/>
|
||||
<link rel="stylesheet" href="resource://devtools/client/shared/components/tabs/TabBar.css"/>
|
||||
<link rel="stylesheet" href="resource://devtools/client/shared/components/NotificationBox.css"/>
|
||||
<link rel="stylesheet" href="chrome://devtools/content/netmonitor/src/assets/styles/netmonitor.css"/>
|
||||
<link rel="stylesheet" href="chrome://devtools/content/netmonitor/src/assets/styles/httpi.css"/>
|
||||
|
||||
<script src="chrome://devtools/content/shared/theme-switching.js"></script>
|
||||
<script type="application/javascript"
|
||||
|
@ -84,10 +84,15 @@ p {
|
||||
margin: 1em 20px;
|
||||
}
|
||||
|
||||
.installpage-link {
|
||||
.feature-link {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.external,
|
||||
.external:hover,
|
||||
.external:visited,
|
||||
.external:hover:active {
|
||||
color: var(--blue-60);
|
||||
-moz-context-properties: fill;
|
||||
fill: var(--blue-60);
|
||||
}
|
||||
|
||||
.external::after {
|
||||
@ -103,6 +108,9 @@ p {
|
||||
background-image: url(images/external-link.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 16px 16px;
|
||||
|
||||
-moz-context-properties: fill;
|
||||
fill: var(--blue-60);
|
||||
}
|
||||
|
||||
.title {
|
||||
@ -201,7 +209,9 @@ footer {
|
||||
.footer-link {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
-moz-context-properties: fill;
|
||||
}
|
||||
|
||||
.footer-link::after {
|
||||
fill: var(--white);
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,12 @@ const MESSAGES = {
|
||||
SystemMenu: "menu-message",
|
||||
};
|
||||
|
||||
const ABOUTDEVTOOLS_STRINGS = "chrome://devtools-shim/locale/aboutdevtools.properties";
|
||||
const aboutDevtoolsBundle = Services.strings.createBundle(ABOUTDEVTOOLS_STRINGS);
|
||||
|
||||
const KEY_SHORTCUTS_STRINGS = "chrome://devtools-shim/locale/key-shortcuts.properties";
|
||||
const keyShortcutsBundle = Services.strings.createBundle(KEY_SHORTCUTS_STRINGS);
|
||||
|
||||
// URL constructor doesn't support about: scheme,
|
||||
// we have to use http in order to have working searchParams.
|
||||
let url = new URL(window.location.href.replace("about:", "http://"));
|
||||
@ -24,10 +30,8 @@ let reason = url.searchParams.get("reason");
|
||||
let tabid = parseInt(url.searchParams.get("tabid"), 10);
|
||||
|
||||
function getToolboxShortcut() {
|
||||
const bundleUrl = "chrome://devtools-shim/locale/key-shortcuts.properties";
|
||||
const bundle = Services.strings.createBundle(bundleUrl);
|
||||
const modifier = Services.appinfo.OS == "Darwin" ? "Cmd+Opt+" : "Ctrl+Shift+";
|
||||
return modifier + bundle.GetStringFromName("toggleToolbox.commandkey");
|
||||
return modifier + keyShortcutsBundle.GetStringFromName("toggleToolbox.commandkey");
|
||||
}
|
||||
|
||||
function onInstallButtonClick() {
|
||||
@ -51,6 +55,88 @@ function updatePage() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of descriptors for features displayed on about:devtools.
|
||||
* Each feature should contain:
|
||||
* - icon: the name of the image to use
|
||||
* - title: the key of the localized title (from aboutdevtools.properties)
|
||||
* - desc: the key of the localized description (from aboutdevtools.properties)
|
||||
* - link: the MDN documentation link
|
||||
*/
|
||||
const features = [
|
||||
{
|
||||
icon: "chrome://devtools-shim/content/aboutdevtools/images/feature-inspector.svg",
|
||||
title: "features.inspector.title",
|
||||
desc: "features.inspector.desc",
|
||||
link: "https://developer.mozilla.org/docs/Tools/Page_Inspector",
|
||||
}, {
|
||||
icon: "chrome://devtools-shim/content/aboutdevtools/images/feature-console.svg",
|
||||
title: "features.console.title",
|
||||
desc: "features.console.desc",
|
||||
link: "https://developer.mozilla.org/docs/Tools/Web_Console",
|
||||
}, {
|
||||
icon: "chrome://devtools-shim/content/aboutdevtools/images/feature-debugger.svg",
|
||||
title: "features.debugger.title",
|
||||
desc: "features.debugger.desc",
|
||||
link: "https://developer.mozilla.org/docs/Tools/Debugger",
|
||||
}, {
|
||||
icon: "chrome://devtools-shim/content/aboutdevtools/images/feature-network.svg",
|
||||
title: "features.network.title",
|
||||
desc: "features.network.desc",
|
||||
link: "https://developer.mozilla.org/docs/Tools/Network_Monitor",
|
||||
}, {
|
||||
icon: "chrome://devtools-shim/content/aboutdevtools/images/feature-storage.svg",
|
||||
title: "features.storage.title",
|
||||
desc: "features.storage.desc",
|
||||
link: "https://developer.mozilla.org/docs/Tools/Storage_Inspector",
|
||||
}, {
|
||||
icon: "chrome://devtools-shim/content/aboutdevtools/images/feature-responsive.svg",
|
||||
title: "features.responsive.title",
|
||||
desc: "features.responsive.desc",
|
||||
link: "https://developer.mozilla.org/docs/Tools/Responsive_Design_Mode",
|
||||
}, {
|
||||
icon: "chrome://devtools-shim/content/aboutdevtools/images/feature-visualediting.svg",
|
||||
title: "features.visualediting.title",
|
||||
desc: "features.visualediting.desc",
|
||||
link: "https://developer.mozilla.org/docs/Tools/Style_Editor",
|
||||
}, {
|
||||
icon: "chrome://devtools-shim/content/aboutdevtools/images/feature-performance.svg",
|
||||
title: "features.performance.title",
|
||||
desc: "features.performance.desc",
|
||||
link: "https://developer.mozilla.org/docs/Tools/Performance",
|
||||
}, {
|
||||
icon: "chrome://devtools-shim/content/aboutdevtools/images/feature-memory.svg",
|
||||
title: "features.memory.title",
|
||||
desc: "features.memory.desc",
|
||||
link: "https://developer.mozilla.org/docs/Tools/Memory",
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
* Helper to create a DOM element to represent a DevTools feature.
|
||||
*/
|
||||
function createFeatureEl(feature) {
|
||||
let li = document.createElement("li");
|
||||
li.classList.add("feature");
|
||||
let learnMore = aboutDevtoolsBundle.GetStringFromName("features.learnMore");
|
||||
|
||||
let {icon, link, title, desc} = feature;
|
||||
title = aboutDevtoolsBundle.GetStringFromName(title);
|
||||
desc = aboutDevtoolsBundle.GetStringFromName(desc);
|
||||
// eslint-disable-next-line no-unsanitized/property
|
||||
li.innerHTML =
|
||||
`<a class="feature-link" href="${link}" target="_blank">
|
||||
<img class="feature-icon" src="${icon}"/>
|
||||
</a>
|
||||
<h3 class="feature-name">${title}</h3>
|
||||
<p class="feature-desc">
|
||||
${desc}
|
||||
<a class="external feature-link" href="${link}" target="_blank">${learnMore}</a>
|
||||
</p>`;
|
||||
|
||||
return li;
|
||||
}
|
||||
|
||||
window.addEventListener("load", function () {
|
||||
const inspectorShortcut = getToolboxShortcut();
|
||||
const welcomeMessage = document.getElementById("welcome-message");
|
||||
@ -76,6 +162,11 @@ window.addEventListener("load", function () {
|
||||
document.getElementById("close").addEventListener("click", onCloseButtonClick);
|
||||
Services.prefs.addObserver(DEVTOOLS_ENABLED_PREF, updatePage);
|
||||
|
||||
let featuresContainer = document.querySelector(".features-list");
|
||||
for (let feature of features) {
|
||||
featuresContainer.appendChild(createFeatureEl(feature));
|
||||
}
|
||||
|
||||
// Update the current page based on the current value of DEVTOOLS_ENABLED_PREF.
|
||||
updatePage();
|
||||
}, { once: true });
|
||||
|
@ -53,59 +53,6 @@
|
||||
|
||||
<div class="features">
|
||||
<ul class="features-list">
|
||||
<li class="feature">
|
||||
<img class="feature-icon" src="chrome://devtools-shim/content/aboutdevtools/images/feature-inspector.svg" alt=""/>
|
||||
<h3 class="feature-name">Inspector</h3>
|
||||
<p class="feature-desc">Inspect and refine code to build pixel-perfect layouts.</p>
|
||||
</li>
|
||||
|
||||
<li class="feature">
|
||||
<img class="feature-icon" src="chrome://devtools-shim/content/aboutdevtools/images/feature-console.svg" alt=""/>
|
||||
<h3 class="feature-name">Console</h3>
|
||||
<p class="feature-desc">Track CSS, JavaScript, security and network issues.</p>
|
||||
</li>
|
||||
|
||||
<li class="feature">
|
||||
<img class="feature-icon" src="chrome://devtools-shim/content/aboutdevtools/images/feature-debugger.svg" alt=""/>
|
||||
<h3 class="feature-name">Debugger</h3>
|
||||
<p class="feature-desc">Powerful JavaScript debugger with support for your framework.</p>
|
||||
</li>
|
||||
|
||||
<li class="feature">
|
||||
<img class="feature-icon" src="chrome://devtools-shim/content/aboutdevtools/images/feature-network.svg" alt=""/>
|
||||
<h3 class="feature-name">Network</h3>
|
||||
<p class="feature-desc">Monitor network requests that can slow or block your site.</p>
|
||||
</li>
|
||||
|
||||
<li class="feature">
|
||||
<img class="feature-icon" src="chrome://devtools-shim/content/aboutdevtools/images/feature-storage.svg" alt=""/>
|
||||
<h3 class="feature-name">Storage panel</h3>
|
||||
<p class="feature-desc">Add, modify and remove cache, cookies, databases and session data.</p>
|
||||
</li>
|
||||
|
||||
<li class="feature">
|
||||
<img class="feature-icon" src="chrome://devtools-shim/content/aboutdevtools/images/feature-responsive-mode.svg" alt=""/>
|
||||
<h3 class="feature-name">Responsive Design Mode</h3>
|
||||
<p class="feature-desc">Test sites on emulated devices in your browser.</p>
|
||||
</li>
|
||||
|
||||
<li class="feature">
|
||||
<img class="feature-icon" src="chrome://devtools-shim/content/aboutdevtools/images/feature-visual-editing.svg" alt=""/>
|
||||
<h3 class="feature-name">Visual Editing</h3>
|
||||
<p class="feature-desc">Fine-tune animations, alignment and padding.</p>
|
||||
</li>
|
||||
|
||||
<li class="feature">
|
||||
<img class="feature-icon" src="chrome://devtools-shim/content/aboutdevtools/images/feature-performance.svg" alt=""/>
|
||||
<h3 class="feature-name">Performance</h3>
|
||||
<p class="feature-desc">Unblock bottlenecks, streamline processes, optimize assets.</p>
|
||||
</li>
|
||||
|
||||
<li class="feature">
|
||||
<img class="feature-icon" src="chrome://devtools-shim/content/aboutdevtools/images/feature-memory.svg" alt=""/>
|
||||
<h3 class="feature-name">Memory</h3>
|
||||
<p class="feature-desc">Find memory leaks and make your application zippy.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
@ -21,8 +21,8 @@ devtools-shim.jar:
|
||||
content/aboutdevtools/images/feature-debugger.svg (aboutdevtools/images/feature-debugger.svg)
|
||||
content/aboutdevtools/images/feature-network.svg (aboutdevtools/images/feature-network.svg)
|
||||
content/aboutdevtools/images/feature-memory.svg (aboutdevtools/images/feature-memory.svg)
|
||||
content/aboutdevtools/images/feature-visual-editing.svg (aboutdevtools/images/feature-visual-editing.svg)
|
||||
content/aboutdevtools/images/feature-responsive-mode.svg (aboutdevtools/images/feature-responsive-mode.svg)
|
||||
content/aboutdevtools/images/feature-visualediting.svg (aboutdevtools/images/feature-visualediting.svg)
|
||||
content/aboutdevtools/images/feature-responsive.svg (aboutdevtools/images/feature-responsive.svg)
|
||||
content/aboutdevtools/images/feature-storage.svg (aboutdevtools/images/feature-storage.svg)
|
||||
content/aboutdevtools/images/feature-performance.svg (aboutdevtools/images/feature-performance.svg)
|
||||
|
||||
|
37
devtools/shim/locales/en-US/aboutdevtools.properties
Normal file
37
devtools/shim/locales/en-US/aboutdevtools.properties
Normal file
@ -0,0 +1,37 @@
|
||||
# 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/.
|
||||
|
||||
# LOCALIZATION NOTE These strings are used in the about:devtools page.
|
||||
|
||||
# LOCALIZATION NOTE (features.learnMore): The text of the learn more link displayed below
|
||||
# each feature section of about:devtools. Each section presents a quick description of a
|
||||
# DevTools panel/feature. The learn more link points to the associated MDN page.
|
||||
features.learnMore=Learn more
|
||||
|
||||
features.inspector.title=Inspector
|
||||
features.inspector.desc=Inspect and refine code to build pixel-perfect layouts.
|
||||
|
||||
features.console.title=Console
|
||||
features.console.desc=Track CSS, JavaScript, security and network issues.
|
||||
|
||||
features.debugger.title=Debugger
|
||||
features.debugger.desc=Powerful JavaScript debugger with support for your framework.
|
||||
|
||||
features.network.title=Network
|
||||
features.network.desc=Monitor network requests that can slow or block your site.
|
||||
|
||||
features.storage.title=Storage
|
||||
features.storage.desc=Add, modify and remove cache, cookies, databases and session data.
|
||||
|
||||
features.responsive.title=Responsive Design Mode
|
||||
features.responsive.desc=Test sites on emulated devices in your browser.
|
||||
|
||||
features.visualediting.title=Visual Editing
|
||||
features.visualediting.desc=Fine-tune animations, alignment and padding.
|
||||
|
||||
features.performance.title=Performance
|
||||
features.performance.desc=Unblock bottlenecks, streamline processes, optimize assets.
|
||||
|
||||
features.memory.title=Memory
|
||||
features.memory.desc=Find memory leaks and make your application zippy.
|
@ -14,11 +14,7 @@ def DevToolsModules(*modules):
|
||||
its own directory. Subdirectories should use their own moz.build.
|
||||
|
||||
By following this pattern, there's less magic to require() and resource://
|
||||
paths, since they now match the source tree.
|
||||
|
||||
Currently `DevToolsModules` can only be called once per moz.build, so we
|
||||
build a list manually above. Bug 1198013 tracks fixing this to make it more
|
||||
like other moz.build constructs.'''
|
||||
paths, since they now match the source tree.'''
|
||||
|
||||
for m in modules:
|
||||
if '/' in m:
|
||||
|
@ -2271,6 +2271,10 @@ GK_ATOM(windows_glass, "windows-glass")
|
||||
GK_ATOM(touch_enabled, "touch-enabled")
|
||||
GK_ATOM(menubar_drag, "menubar-drag")
|
||||
GK_ATOM(swipe_animation_enabled, "swipe-animation-enabled")
|
||||
GK_ATOM(gtk_csd_available, "gtk-csd-available")
|
||||
GK_ATOM(gtk_csd_minimize_button, "gtk-csd-minimize-button")
|
||||
GK_ATOM(gtk_csd_maximize_button, "gtk-csd-maximize-button")
|
||||
GK_ATOM(gtk_csd_close_button, "gtk-csd-close-button")
|
||||
|
||||
// windows theme selector metrics
|
||||
GK_ATOM(windows_classic, "windows-classic")
|
||||
@ -2305,6 +2309,10 @@ GK_ATOM(_moz_device_pixel_ratio, "-moz-device-pixel-ratio")
|
||||
GK_ATOM(_moz_device_orientation, "-moz-device-orientation")
|
||||
GK_ATOM(_moz_is_resource_document, "-moz-is-resource-document")
|
||||
GK_ATOM(_moz_swipe_animation_enabled, "-moz-swipe-animation-enabled")
|
||||
GK_ATOM(_moz_gtk_csd_available, "-moz-gtk-csd-available")
|
||||
GK_ATOM(_moz_gtk_csd_minimize_button, "-moz-gtk-csd-minimize-button")
|
||||
GK_ATOM(_moz_gtk_csd_maximize_button, "-moz-gtk-csd-maximize-button")
|
||||
GK_ATOM(_moz_gtk_csd_close_button, "-moz-gtk-csd-close-button")
|
||||
|
||||
// application commands
|
||||
GK_ATOM(Back, "Back")
|
||||
|
@ -2007,7 +2007,6 @@ WebGLContext::GetSurfaceSnapshot(gfxAlphaType* const out_alphaType)
|
||||
// Expects Opaque or Premult
|
||||
if (alphaType == gfxAlphaType::NonPremult) {
|
||||
gfxUtils::PremultiplyDataSurface(surf, surf);
|
||||
alphaType = gfxAlphaType::Premult;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -438,7 +438,9 @@ ChannelMediaResource::CopySegmentToCache(nsIInputStream* aInStream,
|
||||
{
|
||||
Closure* closure = static_cast<Closure*>(aClosure);
|
||||
closure->mResource->mCacheStream.NotifyDataReceived(
|
||||
closure->mLoadID, aCount, aFromSegment);
|
||||
closure->mLoadID,
|
||||
aCount,
|
||||
reinterpret_cast<const uint8_t*>(aFromSegment));
|
||||
*aWriteCount = aCount;
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -1990,8 +1990,8 @@ MediaCacheStream::UpdatePrincipal(nsIPrincipal* aPrincipal)
|
||||
|
||||
void
|
||||
MediaCacheStream::NotifyDataReceived(uint32_t aLoadID,
|
||||
int64_t aSize,
|
||||
const char* aData)
|
||||
uint32_t aCount,
|
||||
const uint8_t* aData)
|
||||
{
|
||||
MOZ_ASSERT(aLoadID > 0);
|
||||
// This might happen off the main thread.
|
||||
@ -2002,10 +2002,10 @@ MediaCacheStream::NotifyDataReceived(uint32_t aLoadID,
|
||||
return;
|
||||
}
|
||||
|
||||
LOG("Stream %p DataReceived at %" PRId64 " count=%" PRId64 " aLoadID=%u",
|
||||
LOG("Stream %p DataReceived at %" PRId64 " count=%u aLoadID=%u",
|
||||
this,
|
||||
mChannelOffset,
|
||||
aSize,
|
||||
aCount,
|
||||
aLoadID);
|
||||
|
||||
if (mLoadID != aLoadID) {
|
||||
@ -2014,38 +2014,42 @@ MediaCacheStream::NotifyDataReceived(uint32_t aLoadID,
|
||||
// stored to the wrong positoin.
|
||||
return;
|
||||
}
|
||||
int64_t size = aSize;
|
||||
const char* data = aData;
|
||||
|
||||
auto source = MakeSpan<const uint8_t>(aData, aCount);
|
||||
|
||||
// We process the data one block (or part of a block) at a time
|
||||
while (size > 0) {
|
||||
uint32_t blockIndex = OffsetToBlockIndexUnchecked(mChannelOffset);
|
||||
int32_t blockOffset = int32_t(mChannelOffset - blockIndex*BLOCK_SIZE);
|
||||
int32_t chunkSize = std::min<int64_t>(BLOCK_SIZE - blockOffset, size);
|
||||
while (!source.IsEmpty()) {
|
||||
// The data we've collected so far in the partial block.
|
||||
auto partial = MakeSpan<const uint8_t>(mPartialBlockBuffer.get(),
|
||||
OffsetInBlock(mChannelOffset));
|
||||
|
||||
if (blockOffset == 0) {
|
||||
if (partial.IsEmpty()) {
|
||||
// We've just started filling this buffer so now is a good time
|
||||
// to clear this flag.
|
||||
mMetadataInPartialBlockBuffer = false;
|
||||
}
|
||||
|
||||
ReadMode mode = mMetadataInPartialBlockBuffer
|
||||
? MODE_METADATA : MODE_PLAYBACK;
|
||||
// The number of bytes needed to complete the partial block.
|
||||
size_t remaining = BLOCK_SIZE - partial.Length();
|
||||
|
||||
if (blockOffset + chunkSize == BLOCK_SIZE) {
|
||||
if (source.Length() >= remaining) {
|
||||
// We have a whole block now to write it out.
|
||||
auto data1 = MakeSpan<const uint8_t>(
|
||||
mPartialBlockBuffer.get(), blockOffset);
|
||||
auto data2 = MakeSpan<const uint8_t>(
|
||||
reinterpret_cast<const uint8_t*>(data), chunkSize);
|
||||
mMediaCache->AllocateAndWriteBlock(this, blockIndex, mode, data1, data2);
|
||||
mMediaCache->AllocateAndWriteBlock(
|
||||
this,
|
||||
OffsetToBlockIndexUnchecked(mChannelOffset),
|
||||
mMetadataInPartialBlockBuffer ? MODE_METADATA : MODE_PLAYBACK,
|
||||
partial,
|
||||
source.First(remaining));
|
||||
source = source.From(remaining);
|
||||
mChannelOffset += remaining;
|
||||
} else {
|
||||
memcpy(mPartialBlockBuffer.get() + blockOffset, data, chunkSize);
|
||||
// The buffer to be filled in the partial block.
|
||||
auto buf = MakeSpan<uint8_t>(mPartialBlockBuffer.get() + partial.Length(),
|
||||
remaining);
|
||||
memcpy(buf.Elements(), source.Elements(), source.Length());
|
||||
mChannelOffset += source.Length();
|
||||
break;
|
||||
}
|
||||
|
||||
mChannelOffset += chunkSize;
|
||||
size -= chunkSize;
|
||||
data += chunkSize;
|
||||
}
|
||||
|
||||
MediaCache::ResourceStreamIterator iter(mMediaCache, mResourceID);
|
||||
|
@ -264,7 +264,9 @@ public:
|
||||
// the starting offset is known via NotifyDataStarted or because
|
||||
// the cache requested the offset in
|
||||
// ChannelMediaResource::CacheClientSeek, or because it defaulted to 0.
|
||||
void NotifyDataReceived(uint32_t aLoadID, int64_t aSize, const char* aData);
|
||||
void NotifyDataReceived(uint32_t aLoadID,
|
||||
uint32_t aCount,
|
||||
const uint8_t* aData);
|
||||
// Notifies the cache that the current bytes should be written to disk.
|
||||
// Called on the main thread.
|
||||
void FlushPartialBlock();
|
||||
|
@ -33,7 +33,7 @@ namespace mozilla {
|
||||
|
||||
mozilla::LazyLogModule sAndroidDecoderModuleLog("AndroidDecoderModule");
|
||||
|
||||
static const char*
|
||||
const char*
|
||||
TranslateMimeType(const nsACString& aMimeType)
|
||||
{
|
||||
if (VPXDecoder::IsVPX(aMimeType, VPXDecoder::VP8)) {
|
||||
@ -57,66 +57,6 @@ GetFeatureStatus(int32_t aFeature)
|
||||
return status == nsIGfxInfo::FEATURE_STATUS_OK;
|
||||
};
|
||||
|
||||
CryptoInfo::LocalRef
|
||||
GetCryptoInfoFromSample(const MediaRawData* aSample)
|
||||
{
|
||||
auto& cryptoObj = aSample->mCrypto;
|
||||
|
||||
if (!cryptoObj.mValid) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CryptoInfo::LocalRef cryptoInfo;
|
||||
nsresult rv = CryptoInfo::New(&cryptoInfo);
|
||||
NS_ENSURE_SUCCESS(rv, nullptr);
|
||||
|
||||
uint32_t numSubSamples = std::min<uint32_t>(
|
||||
cryptoObj.mPlainSizes.Length(), cryptoObj.mEncryptedSizes.Length());
|
||||
|
||||
uint32_t totalSubSamplesSize = 0;
|
||||
for (auto& size : cryptoObj.mEncryptedSizes) {
|
||||
totalSubSamplesSize += size;
|
||||
}
|
||||
|
||||
// mPlainSizes is uint16_t, need to transform to uint32_t first.
|
||||
nsTArray<uint32_t> plainSizes;
|
||||
for (auto& size : cryptoObj.mPlainSizes) {
|
||||
totalSubSamplesSize += size;
|
||||
plainSizes.AppendElement(size);
|
||||
}
|
||||
|
||||
uint32_t codecSpecificDataSize = aSample->Size() - totalSubSamplesSize;
|
||||
// Size of codec specific data("CSD") for Android MediaCodec usage should be
|
||||
// included in the 1st plain size.
|
||||
plainSizes[0] += codecSpecificDataSize;
|
||||
|
||||
static const int kExpectedIVLength = 16;
|
||||
auto tempIV(cryptoObj.mIV);
|
||||
auto tempIVLength = tempIV.Length();
|
||||
MOZ_ASSERT(tempIVLength <= kExpectedIVLength);
|
||||
for (size_t i = tempIVLength; i < kExpectedIVLength; i++) {
|
||||
// Padding with 0
|
||||
tempIV.AppendElement(0);
|
||||
}
|
||||
|
||||
auto numBytesOfPlainData = mozilla::jni::IntArray::New(
|
||||
reinterpret_cast<int32_t*>(&plainSizes[0]),
|
||||
plainSizes.Length());
|
||||
|
||||
auto numBytesOfEncryptedData = mozilla::jni::IntArray::New(
|
||||
reinterpret_cast<const int32_t*>(&cryptoObj.mEncryptedSizes[0]),
|
||||
cryptoObj.mEncryptedSizes.Length());
|
||||
auto iv = mozilla::jni::ByteArray::New(reinterpret_cast<int8_t*>(&tempIV[0]),
|
||||
tempIV.Length());
|
||||
auto keyId = mozilla::jni::ByteArray::New(
|
||||
reinterpret_cast<const int8_t*>(&cryptoObj.mKeyId[0]),
|
||||
cryptoObj.mKeyId.Length());
|
||||
cryptoInfo->Set(numSubSamples, numBytesOfPlainData, numBytesOfEncryptedData,
|
||||
keyId, iv, MediaCodec::CRYPTO_MODE_AES_CTR);
|
||||
|
||||
return cryptoInfo;
|
||||
}
|
||||
|
||||
AndroidDecoderModule::AndroidDecoderModule(CDMProxy* aProxy)
|
||||
{
|
||||
mProxy = static_cast<MediaDrmCDMProxy*>(aProxy);
|
||||
|
@ -31,6 +31,9 @@ private:
|
||||
|
||||
extern LazyLogModule sAndroidDecoderModuleLog;
|
||||
|
||||
const char*
|
||||
TranslateMimeType(const nsACString& aMimeType);
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
||||
|
@ -543,6 +543,69 @@ RemoteDataDecoder::ProcessShutdown()
|
||||
return ShutdownPromise::CreateAndResolve(true, __func__);
|
||||
}
|
||||
|
||||
static CryptoInfo::LocalRef
|
||||
GetCryptoInfoFromSample(const MediaRawData* aSample)
|
||||
{
|
||||
auto& cryptoObj = aSample->mCrypto;
|
||||
|
||||
if (!cryptoObj.mValid) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CryptoInfo::LocalRef cryptoInfo;
|
||||
nsresult rv = CryptoInfo::New(&cryptoInfo);
|
||||
NS_ENSURE_SUCCESS(rv, nullptr);
|
||||
|
||||
uint32_t numSubSamples = std::min<uint32_t>(
|
||||
cryptoObj.mPlainSizes.Length(), cryptoObj.mEncryptedSizes.Length());
|
||||
|
||||
uint32_t totalSubSamplesSize = 0;
|
||||
for (auto& size : cryptoObj.mEncryptedSizes) {
|
||||
totalSubSamplesSize += size;
|
||||
}
|
||||
|
||||
// mPlainSizes is uint16_t, need to transform to uint32_t first.
|
||||
nsTArray<uint32_t> plainSizes;
|
||||
for (auto& size : cryptoObj.mPlainSizes) {
|
||||
totalSubSamplesSize += size;
|
||||
plainSizes.AppendElement(size);
|
||||
}
|
||||
|
||||
uint32_t codecSpecificDataSize = aSample->Size() - totalSubSamplesSize;
|
||||
// Size of codec specific data("CSD") for Android MediaCodec usage should be
|
||||
// included in the 1st plain size.
|
||||
plainSizes[0] += codecSpecificDataSize;
|
||||
|
||||
static const int kExpectedIVLength = 16;
|
||||
auto tempIV(cryptoObj.mIV);
|
||||
auto tempIVLength = tempIV.Length();
|
||||
MOZ_ASSERT(tempIVLength <= kExpectedIVLength);
|
||||
for (size_t i = tempIVLength; i < kExpectedIVLength; i++) {
|
||||
// Padding with 0
|
||||
tempIV.AppendElement(0);
|
||||
}
|
||||
|
||||
auto numBytesOfPlainData = mozilla::jni::IntArray::New(
|
||||
reinterpret_cast<int32_t*>(&plainSizes[0]), plainSizes.Length());
|
||||
|
||||
auto numBytesOfEncryptedData = mozilla::jni::IntArray::New(
|
||||
reinterpret_cast<const int32_t*>(&cryptoObj.mEncryptedSizes[0]),
|
||||
cryptoObj.mEncryptedSizes.Length());
|
||||
auto iv = mozilla::jni::ByteArray::New(reinterpret_cast<int8_t*>(&tempIV[0]),
|
||||
tempIV.Length());
|
||||
auto keyId = mozilla::jni::ByteArray::New(
|
||||
reinterpret_cast<const int8_t*>(&cryptoObj.mKeyId[0]),
|
||||
cryptoObj.mKeyId.Length());
|
||||
cryptoInfo->Set(numSubSamples,
|
||||
numBytesOfPlainData,
|
||||
numBytesOfEncryptedData,
|
||||
keyId,
|
||||
iv,
|
||||
MediaCodec::CRYPTO_MODE_AES_CTR);
|
||||
|
||||
return cryptoInfo;
|
||||
}
|
||||
|
||||
RefPtr<MediaDataDecoder::DecodePromise>
|
||||
RemoteDataDecoder::Decode(MediaRawData* aSample)
|
||||
{
|
||||
|
@ -55,9 +55,9 @@ interface Document : Node {
|
||||
[Pure]
|
||||
Element? getElementById(DOMString elementId);
|
||||
|
||||
[NewObject, Throws]
|
||||
[CEReactions, NewObject, Throws]
|
||||
Element createElement(DOMString localName, optional (ElementCreationOptions or DOMString) options);
|
||||
[NewObject, Throws]
|
||||
[CEReactions, NewObject, Throws]
|
||||
Element createElementNS(DOMString? namespace, DOMString qualifiedName, optional (ElementCreationOptions or DOMString) options);
|
||||
[NewObject]
|
||||
DocumentFragment createDocumentFragment();
|
||||
|
@ -95,6 +95,16 @@ ReadRequestedLocales(nsTArray<nsCString>& aRetVal)
|
||||
// At the moment we just take a single locale, but in the future
|
||||
// we'll want to allow user to specify a list of requested locales.
|
||||
aRetVal.AppendElement(locale);
|
||||
|
||||
// en-US is a LastResort locale. LastResort locale is a fallback locale
|
||||
// for the requested locale chain. In the future we'll want to make the
|
||||
// fallback chain differ per-locale. For now, it'll always fallback on en-US.
|
||||
//
|
||||
// Notice: This is not the same as DefaultLocale,
|
||||
// which follows the default locale the build is in.
|
||||
if (!locale.Equals("en-US")) {
|
||||
aRetVal.AppendElement("en-US");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -293,15 +303,6 @@ LocaleService::GetRequestedLocales(nsTArray<nsCString>& aRetVal)
|
||||
if (mRequestedLocales.IsEmpty()) {
|
||||
ReadRequestedLocales(mRequestedLocales);
|
||||
|
||||
// en-US is a LastResort locale. LastResort locale is a fallback locale
|
||||
// for the requested locale chain. In the future we'll want to make the
|
||||
// fallback chain differ per-locale. For now, it'll always fallback on en-US.
|
||||
//
|
||||
// Notice: This is not the same as DefaultLocale,
|
||||
// which follows the default locale the build is in.
|
||||
if (!mRequestedLocales.Contains("en-US")) {
|
||||
mRequestedLocales.AppendElement("en-US");
|
||||
}
|
||||
}
|
||||
|
||||
aRetVal = mRequestedLocales;
|
||||
|
@ -3542,7 +3542,6 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||
disp->mIsolation != NS_STYLE_ISOLATION_AUTO ||
|
||||
(disp->mWillChangeBitField & NS_STYLE_WILL_CHANGE_STACKING_CONTEXT) ||
|
||||
(aFlags & DISPLAY_CHILD_FORCE_STACKING_CONTEXT)) {
|
||||
// If you change this, also change IsPseudoStackingContextFromStyle()
|
||||
pseudoStackingContext = true;
|
||||
awayFromCommonPath = true;
|
||||
}
|
||||
@ -10855,19 +10854,6 @@ nsIFrame::DestroyWebRenderUserDataTable(WebRenderUserDataTable* aTable)
|
||||
delete aTable;
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::IsPseudoStackingContextFromStyle() {
|
||||
// If you change this, also change the computation of pseudoStackingContext
|
||||
// in BuildDisplayListForChild()
|
||||
if (StyleEffects()->mOpacity != 1.0f) {
|
||||
return true;
|
||||
}
|
||||
const nsStyleDisplay* disp = StyleDisplay();
|
||||
return disp->IsAbsPosContainingBlock(this) ||
|
||||
disp->IsFloating(this) ||
|
||||
(disp->mWillChangeBitField & NS_STYLE_WILL_CHANGE_STACKING_CONTEXT);
|
||||
}
|
||||
|
||||
bool
|
||||
nsIFrame::IsVisuallyAtomic(EffectSet* aEffectSet,
|
||||
const nsStyleDisplay* aStyleDisplay,
|
||||
|
@ -3493,14 +3493,6 @@ public:
|
||||
*/
|
||||
virtual bool IsVisibleInSelection(nsISelection* aSelection);
|
||||
|
||||
/**
|
||||
* Determines whether this frame is a pseudo stacking context, looking
|
||||
* only as style --- i.e., assuming that it's in-flow and not a replaced
|
||||
* element and not an SVG element.
|
||||
* XXX maybe check IsTransformed()?
|
||||
*/
|
||||
bool IsPseudoStackingContextFromStyle();
|
||||
|
||||
/**
|
||||
* Determines if this frame has a container effect that requires
|
||||
* it to paint as a visually atomic unit.
|
||||
|
@ -1443,7 +1443,8 @@ nsImageFrame::DisplayAltFeedback(gfxContext& aRenderingContext,
|
||||
uint32_t imageStatus = 0;
|
||||
if (request)
|
||||
request->GetImageStatus(&imageStatus);
|
||||
if (imageStatus & imgIRequest::STATUS_LOAD_COMPLETE) {
|
||||
if (imageStatus & imgIRequest::STATUS_LOAD_COMPLETE &&
|
||||
!(imageStatus & imgIRequest::STATUS_ERROR)) {
|
||||
nsCOMPtr<imgIContainer> imgCon;
|
||||
request->GetImage(getter_AddRefs(imgCon));
|
||||
MOZ_ASSERT(imgCon, "Load complete, but no image container?");
|
||||
|
@ -1159,6 +1159,30 @@ nsCSSRuleProcessor::InitSystemMetrics()
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::swipe_animation_enabled);
|
||||
}
|
||||
|
||||
rv = LookAndFeel::GetInt(LookAndFeel::eIntID_GTKCSDAvailable,
|
||||
&metricResult);
|
||||
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::gtk_csd_available);
|
||||
}
|
||||
|
||||
rv = LookAndFeel::GetInt(LookAndFeel::eIntID_GTKCSDMinimizeButton,
|
||||
&metricResult);
|
||||
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::gtk_csd_minimize_button);
|
||||
}
|
||||
|
||||
rv = LookAndFeel::GetInt(LookAndFeel::eIntID_GTKCSDMaximizeButton,
|
||||
&metricResult);
|
||||
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::gtk_csd_maximize_button);
|
||||
}
|
||||
|
||||
rv = LookAndFeel::GetInt(LookAndFeel::eIntID_GTKCSDCloseButton,
|
||||
&metricResult);
|
||||
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::gtk_csd_close_button);
|
||||
}
|
||||
|
||||
#ifdef XP_WIN
|
||||
if (NS_SUCCEEDED(
|
||||
LookAndFeel::GetInt(LookAndFeel::eIntID_WindowsThemeIdentifier,
|
||||
|
@ -795,6 +795,42 @@ nsMediaFeatures::features[] = {
|
||||
GetSystemMetric
|
||||
},
|
||||
|
||||
{
|
||||
&nsGkAtoms::_moz_gtk_csd_available,
|
||||
nsMediaFeature::eMinMaxNotAllowed,
|
||||
nsMediaFeature::eBoolInteger,
|
||||
nsMediaFeature::eUserAgentAndChromeOnly,
|
||||
{ &nsGkAtoms::gtk_csd_available },
|
||||
GetSystemMetric
|
||||
},
|
||||
|
||||
{
|
||||
&nsGkAtoms::_moz_gtk_csd_minimize_button,
|
||||
nsMediaFeature::eMinMaxNotAllowed,
|
||||
nsMediaFeature::eBoolInteger,
|
||||
nsMediaFeature::eUserAgentAndChromeOnly,
|
||||
{ &nsGkAtoms::gtk_csd_minimize_button },
|
||||
GetSystemMetric
|
||||
},
|
||||
|
||||
{
|
||||
&nsGkAtoms::_moz_gtk_csd_maximize_button,
|
||||
nsMediaFeature::eMinMaxNotAllowed,
|
||||
nsMediaFeature::eBoolInteger,
|
||||
nsMediaFeature::eUserAgentAndChromeOnly,
|
||||
{ &nsGkAtoms::gtk_csd_maximize_button },
|
||||
GetSystemMetric
|
||||
},
|
||||
|
||||
{
|
||||
&nsGkAtoms::_moz_gtk_csd_close_button,
|
||||
nsMediaFeature::eMinMaxNotAllowed,
|
||||
nsMediaFeature::eBoolInteger,
|
||||
nsMediaFeature::eUserAgentAndChromeOnly,
|
||||
{ &nsGkAtoms::gtk_csd_close_button },
|
||||
GetSystemMetric
|
||||
},
|
||||
|
||||
// Internal -moz-is-glyph media feature: applies only inside SVG glyphs.
|
||||
// Internal because it is really only useful in the user agent anyway
|
||||
// and therefore not worth standardizing.
|
||||
|
@ -51,6 +51,10 @@ var suppressed_toggles = [
|
||||
"-moz-windows-compositor",
|
||||
"-moz-windows-default-theme",
|
||||
"-moz-windows-glass",
|
||||
"-moz-gtk-csd-available",
|
||||
"-moz-gtk-csd-minimize-button",
|
||||
"-moz-gtk-csd-maximize-button",
|
||||
"-moz-gtk-csd-close-button",
|
||||
];
|
||||
|
||||
var toggles_enabled_in_content = [
|
||||
|
@ -647,6 +647,10 @@ function run() {
|
||||
expression_should_not_be_parseable("-moz-windows-classic");
|
||||
expression_should_not_be_parseable("-moz-windows-glass");
|
||||
expression_should_not_be_parseable("-moz-swipe-animation-enabled");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-available");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-minimize-button");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-maximize-button");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-close-button");
|
||||
expression_should_be_parseable("-moz-touch-enabled");
|
||||
|
||||
expression_should_not_be_parseable("-moz-scrollbar-start-backward: 0");
|
||||
@ -663,6 +667,10 @@ function run() {
|
||||
expression_should_not_be_parseable("-moz-windows-classic: 0");
|
||||
expression_should_not_be_parseable("-moz-windows-glass: 0");
|
||||
expression_should_not_be_parseable("-moz-swipe-animation-enabled: 0");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-available: 0");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-minimize-button: 0");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-maximize-button: 0");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-close-button: 0");
|
||||
expression_should_be_parseable("-moz-touch-enabled: 0");
|
||||
|
||||
expression_should_not_be_parseable("-moz-scrollbar-start-backward: 1");
|
||||
@ -679,6 +687,10 @@ function run() {
|
||||
expression_should_not_be_parseable("-moz-windows-classic: 1");
|
||||
expression_should_not_be_parseable("-moz-windows-glass: 1");
|
||||
expression_should_not_be_parseable("-moz-swipe-animation-enabled: 1");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-available: 1");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-minimize-button: 1");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-maximize-button: 1");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-close-button: 1");
|
||||
expression_should_be_parseable("-moz-touch-enabled: 1");
|
||||
|
||||
expression_should_not_be_parseable("-moz-scrollbar-start-backward: -1");
|
||||
@ -696,6 +708,10 @@ function run() {
|
||||
expression_should_not_be_parseable("-moz-windows-glass: -1");
|
||||
expression_should_not_be_parseable("-moz-touch-enabled: -1");
|
||||
expression_should_not_be_parseable("-moz-swipe-animation-enabled: -1");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-available: -1");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-minimize-button: -1");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-maximize-button: -1");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-close-button: -1");
|
||||
|
||||
expression_should_not_be_parseable("-moz-scrollbar-start-backward: true");
|
||||
expression_should_not_be_parseable("-moz-scrollbar-start-forward: true");
|
||||
@ -712,6 +728,10 @@ function run() {
|
||||
expression_should_not_be_parseable("-moz-windows-glass: true");
|
||||
expression_should_not_be_parseable("-moz-touch-enabled: true");
|
||||
expression_should_not_be_parseable("-moz-swipe-animation-enabled: true");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-available: true");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-minimize-button: true");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-maximize-button: true");
|
||||
expression_should_not_be_parseable("-moz-gtk-csd-close-button: true");
|
||||
|
||||
// windows theme media queries
|
||||
expression_should_not_be_parseable("-moz-windows-theme: aero");
|
||||
|
@ -829,7 +829,6 @@ class CompareCodecPriority {
|
||||
class ConfigureCodec {
|
||||
public:
|
||||
explicit ConfigureCodec(nsCOMPtr<nsIPrefBranch>& branch) :
|
||||
mHardwareH264Enabled(false),
|
||||
mHardwareH264Supported(false),
|
||||
mSoftwareH264Enabled(false),
|
||||
mH264Enabled(false),
|
||||
@ -963,7 +962,6 @@ class ConfigureCodec {
|
||||
}
|
||||
|
||||
private:
|
||||
bool mHardwareH264Enabled;
|
||||
bool mHardwareH264Supported;
|
||||
bool mSoftwareH264Enabled;
|
||||
bool mH264Enabled;
|
||||
|
@ -2264,17 +2264,16 @@ nsHttpChannel::ProcessResponse()
|
||||
LOG(("nsHttpChannel::ProcessResponse [this=%p httpStatus=%u]\n",
|
||||
this, httpStatus));
|
||||
|
||||
// do some telemetry
|
||||
if (gHttpHandler->IsTelemetryEnabled()) {
|
||||
// Gather data on whether the transaction and page (if this is
|
||||
// the initial page load) is being loaded with SSL.
|
||||
Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_IS_SSL,
|
||||
// Gather data on whether the transaction and page (if this is
|
||||
// the initial page load) is being loaded with SSL.
|
||||
Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_IS_SSL,
|
||||
mConnectionInfo->EndToEndSSL());
|
||||
if (mLoadFlags & LOAD_INITIAL_DOCUMENT_URI) {
|
||||
Telemetry::Accumulate(Telemetry::HTTP_PAGELOAD_IS_SSL,
|
||||
mConnectionInfo->EndToEndSSL());
|
||||
if (mLoadFlags & LOAD_INITIAL_DOCUMENT_URI) {
|
||||
Telemetry::Accumulate(Telemetry::HTTP_PAGELOAD_IS_SSL,
|
||||
mConnectionInfo->EndToEndSSL());
|
||||
}
|
||||
}
|
||||
|
||||
if (gHttpHandler->IsTelemetryEnabled()) {
|
||||
// how often do we see something like Alt-Svc: "443:quic,p=1"
|
||||
nsAutoCString alt_service;
|
||||
Unused << mResponseHead->GetHeader(nsHttp::Alternate_Service, alt_service);
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import __builtin__
|
||||
import inspect
|
||||
import logging
|
||||
import os
|
||||
@ -252,7 +253,7 @@ class ConfigureSandbox(dict):
|
||||
# The default set of builtins. We expose unicode as str to make sandboxed
|
||||
# files more python3-ready.
|
||||
BUILTINS = ReadOnlyDict({
|
||||
b: __builtins__[b]
|
||||
b: getattr(__builtin__, b)
|
||||
for b in ('None', 'False', 'True', 'int', 'bool', 'any', 'all', 'len',
|
||||
'list', 'tuple', 'set', 'dict', 'isinstance', 'getattr',
|
||||
'hasattr', 'enumerate', 'range', 'zip')
|
||||
|
@ -132,6 +132,7 @@ class TreeMetadataEmitter(LoggingMixin):
|
||||
self._binaries = OrderedDict()
|
||||
self._compile_dirs = set()
|
||||
self._host_compile_dirs = set()
|
||||
self._rust_compile_dirs = set()
|
||||
self._compile_flags = dict()
|
||||
self._linkage = []
|
||||
self._static_linking_shared = set()
|
||||
@ -774,9 +775,13 @@ class TreeMetadataEmitter(LoggingMixin):
|
||||
|
||||
# Avoid emitting compile flags for directories only containing rust
|
||||
# libraries. Emitted compile flags are only relevant to C/C++ sources
|
||||
# for the time being.
|
||||
# for the time being, however ldflags must be emitted for the benefit
|
||||
# of cargo.
|
||||
if not all(isinstance(l, (RustLibrary)) for l in linkables):
|
||||
self._compile_dirs.add(context.objdir)
|
||||
elif linkables:
|
||||
self._rust_compile_dirs.add(context.objdir)
|
||||
|
||||
if host_linkables and not all(isinstance(l, HostRustLibrary) for l in host_linkables):
|
||||
self._host_compile_dirs.add(context.objdir)
|
||||
# TODO: objdirs with only host things in them shouldn't need target
|
||||
@ -1201,6 +1206,9 @@ class TreeMetadataEmitter(LoggingMixin):
|
||||
if context.objdir in self._compile_dirs:
|
||||
self._compile_flags[context.objdir] = computed_flags
|
||||
yield computed_link_flags
|
||||
elif context.objdir in self._rust_compile_dirs:
|
||||
yield computed_link_flags
|
||||
|
||||
if context.objdir in self._host_compile_dirs:
|
||||
yield computed_host_flags
|
||||
|
||||
|
@ -1265,8 +1265,8 @@ class TestEmitterBasic(unittest.TestCase):
|
||||
extra_substs=dict(RUST_TARGET='i686-pc-windows-msvc'))
|
||||
objs = self.read_topsrcdir(reader)
|
||||
|
||||
self.assertEqual(len(objs), 1)
|
||||
lib = objs[0]
|
||||
ldflags, lib = objs
|
||||
self.assertIsInstance(ldflags, ComputedFlags)
|
||||
self.assertIsInstance(lib, RustLibrary)
|
||||
self.assertRegexpMatches(lib.lib_name, "random_crate")
|
||||
self.assertRegexpMatches(lib.import_name, "random_crate")
|
||||
@ -1285,8 +1285,8 @@ class TestEmitterBasic(unittest.TestCase):
|
||||
reader = self.reader('rust-library-features',
|
||||
extra_substs=dict(RUST_TARGET='i686-pc-windows-msvc'))
|
||||
objs = self.read_topsrcdir(reader)
|
||||
self.assertEqual(len(objs), 1)
|
||||
lib = objs[0]
|
||||
ldflags, lib = objs
|
||||
self.assertIsInstance(ldflags, ComputedFlags)
|
||||
self.assertIsInstance(lib, RustLibrary)
|
||||
self.assertEqual(lib.features, ['musthave', 'cantlivewithout'])
|
||||
|
||||
@ -1366,8 +1366,9 @@ class TestEmitterBasic(unittest.TestCase):
|
||||
extra_substs=dict(RUST_TARGET='i686-pc-windows-msvc'))
|
||||
objs = self.read_topsrcdir(reader)
|
||||
|
||||
self.assertEqual(len(objs), 1)
|
||||
self.assertIsInstance(objs[0], RustLibrary)
|
||||
ldflags, lib = objs
|
||||
self.assertIsInstance(ldflags, ComputedFlags)
|
||||
self.assertIsInstance(lib, RustLibrary)
|
||||
|
||||
def test_android_res_dirs(self):
|
||||
"""Test that ANDROID_RES_DIRS works properly."""
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "SandboxOpenedFiles.h"
|
||||
#endif
|
||||
#include "mozilla/PodOperations.h"
|
||||
#include "mozilla/TemplateLib.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
|
||||
#include <errno.h>
|
||||
@ -105,6 +106,8 @@ protected:
|
||||
|
||||
template<typename... Args>
|
||||
static intptr_t DoSyscall(long nr, Args... args) {
|
||||
static_assert(tl::And<(sizeof(Args) <= sizeof(void*))...>::value,
|
||||
"each syscall arg is at most one word");
|
||||
return ConvertError(syscall(nr, args...));
|
||||
}
|
||||
|
||||
@ -112,10 +115,11 @@ private:
|
||||
// Bug 1093893: Translate tkill to tgkill for pthread_kill; fixed in
|
||||
// bionic commit 10c8ce59a (in JB and up; API level 16 = Android 4.1).
|
||||
// Bug 1376653: musl also needs this, and security-wise it's harmless.
|
||||
static intptr_t TKillCompatTrap(const sandbox::arch_seccomp_data& aArgs,
|
||||
void *aux)
|
||||
static intptr_t TKillCompatTrap(ArgsRef aArgs, void *aux)
|
||||
{
|
||||
return DoSyscall(__NR_tgkill, getpid(), aArgs.args[0], aArgs.args[1]);
|
||||
auto tid = static_cast<pid_t>(aArgs.args[0]);
|
||||
auto sig = static_cast<int>(aArgs.args[1]);
|
||||
return DoSyscall(__NR_tgkill, getpid(), tid, sig);
|
||||
}
|
||||
|
||||
static intptr_t SetNoNewPrivsTrap(ArgsRef& aArgs, void* aux) {
|
||||
@ -923,13 +927,6 @@ public:
|
||||
// fork() fails; see bug 227246 and bug 1299581.
|
||||
return Error(ECHILD);
|
||||
|
||||
// inotify_{add,rm}_watch take filesystem paths. Pretend the
|
||||
// kernel doesn't support inotify; note that this could make
|
||||
// libgio attempt network connections for FAM.
|
||||
case __NR_inotify_init:
|
||||
case __NR_inotify_init1:
|
||||
return Error(ENOSYS);
|
||||
|
||||
case __NR_eventfd2:
|
||||
return Allow();
|
||||
|
||||
@ -1055,18 +1052,17 @@ class GMPSandboxPolicy : public SandboxPolicyCommon {
|
||||
return fd;
|
||||
}
|
||||
|
||||
static intptr_t SchedTrap(const sandbox::arch_seccomp_data& aArgs,
|
||||
void* aux)
|
||||
static intptr_t SchedTrap(ArgsRef aArgs, void* aux)
|
||||
{
|
||||
const pid_t tid = syscall(__NR_gettid);
|
||||
if (aArgs.args[0] == static_cast<uint64_t>(tid)) {
|
||||
return DoSyscall(aArgs.nr,
|
||||
0,
|
||||
aArgs.args[1],
|
||||
aArgs.args[2],
|
||||
aArgs.args[3],
|
||||
aArgs.args[4],
|
||||
aArgs.args[5]);
|
||||
static_cast<uintptr_t>(aArgs.args[1]),
|
||||
static_cast<uintptr_t>(aArgs.args[2]),
|
||||
static_cast<uintptr_t>(aArgs.args[3]),
|
||||
static_cast<uintptr_t>(aArgs.args[4]),
|
||||
static_cast<uintptr_t>(aArgs.args[5]));
|
||||
}
|
||||
SANDBOX_LOG_ERROR("unsupported tid in SchedTrap");
|
||||
return BlockedSyscallTrap(aArgs, nullptr);
|
||||
@ -1134,10 +1130,11 @@ public:
|
||||
case __NR_brk:
|
||||
CASES_FOR_geteuid:
|
||||
return Allow();
|
||||
case __NR_sched_getparam:
|
||||
case __NR_sched_getscheduler:
|
||||
case __NR_sched_get_priority_min:
|
||||
case __NR_sched_get_priority_max:
|
||||
return Allow();
|
||||
case __NR_sched_getparam:
|
||||
case __NR_sched_getscheduler:
|
||||
case __NR_sched_setscheduler: {
|
||||
Arg<pid_t> pid(0);
|
||||
return If(pid == 0, Allow())
|
||||
|
@ -3,14 +3,15 @@
|
||||
/* 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 <dlfcn.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "mozilla/Types.h"
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/inotify.h>
|
||||
|
||||
// Signal number used to enable seccomp on each thread.
|
||||
extern int gSeccompTsyncBroadcastSignum;
|
||||
@ -70,3 +71,16 @@ pthread_sigmask(int how, const sigset_t* set, sigset_t* oldset)
|
||||
|
||||
return HandleSigset(sRealFunc, how, set, oldset, false);
|
||||
}
|
||||
|
||||
extern "C" MOZ_EXPORT int
|
||||
inotify_init(void)
|
||||
{
|
||||
return inotify_init1(0);
|
||||
}
|
||||
|
||||
extern "C" MOZ_EXPORT int
|
||||
inotify_init1(int flags)
|
||||
{
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
@ -132,6 +132,7 @@ kSyncNetworkOffline: "Network is offline",
|
||||
kSyncBackoffNotMet: "Trying to sync before the server said it's okay",
|
||||
kFirstSyncChoiceNotMade: "User has not selected an action for first sync",
|
||||
kSyncNotConfigured: "Sync is not configured",
|
||||
kFirefoxShuttingDown: "Firefox is about to shut down",
|
||||
|
||||
DEVICE_TYPE_DESKTOP: "desktop",
|
||||
DEVICE_TYPE_MOBILE: "mobile",
|
||||
|
@ -1761,12 +1761,16 @@ SyncEngine.prototype = {
|
||||
|
||||
async _sync() {
|
||||
try {
|
||||
Async.checkAppReady();
|
||||
await this._syncStartup();
|
||||
Async.checkAppReady();
|
||||
Observers.notify("weave:engine:sync:status", "process-incoming");
|
||||
await this._processIncoming();
|
||||
Async.checkAppReady();
|
||||
Observers.notify("weave:engine:sync:status", "upload-outgoing");
|
||||
try {
|
||||
await this._uploadOutgoing();
|
||||
Async.checkAppReady();
|
||||
await this._syncFinish();
|
||||
} catch (ex) {
|
||||
if (!ex.status || ex.status != 412) {
|
||||
|
@ -14,6 +14,7 @@ Cu.import("resource://services-sync/record.js");
|
||||
Cu.import("resource://services-sync/util.js");
|
||||
Cu.import("resource://services-sync/constants.js");
|
||||
Cu.import("resource://services-sync/collection_validator.js");
|
||||
Cu.import("resource://services-common/async.js");
|
||||
Cu.import("resource://gre/modules/Log.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "FormHistory",
|
||||
"resource://gre/modules/FormHistory.jsm");
|
||||
@ -138,6 +139,7 @@ FormStore.prototype = {
|
||||
},
|
||||
|
||||
async applyIncomingBatch(records) {
|
||||
Async.checkAppReady();
|
||||
// We collect all the changes to be made then apply them all at once.
|
||||
this._changes = [];
|
||||
let failures = await Store.prototype.applyIncomingBatch.call(this, records);
|
||||
|
@ -182,7 +182,9 @@ HistoryStore.prototype = {
|
||||
// Convert incoming records to mozIPlaceInfo objects. Some records can be
|
||||
// ignored or handled directly, so we're rewriting the array in-place.
|
||||
let i, k;
|
||||
let maybeYield = Async.jankYielder();
|
||||
for (i = 0, k = 0; i < records.length; i++) {
|
||||
await maybeYield();
|
||||
let record = records[k] = records[i];
|
||||
let shouldApply;
|
||||
|
||||
|
@ -173,6 +173,8 @@ Resource.prototype = {
|
||||
_doRequest(action, data) {
|
||||
this._log.trace("In _doRequest.");
|
||||
return new Promise((resolve, reject) => {
|
||||
// Don't bother starting a network request if we're shutting down.
|
||||
Async.checkAppReady();
|
||||
this._deferred = { resolve, reject };
|
||||
let channel = this._createRequest(action);
|
||||
|
||||
|
@ -1034,7 +1034,8 @@ Sync11Service.prototype = {
|
||||
_shouldLogin: function _shouldLogin() {
|
||||
return this.enabled &&
|
||||
!Services.io.offline &&
|
||||
!this.isLoggedIn;
|
||||
!this.isLoggedIn &&
|
||||
Async.isAppReady();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1061,6 +1062,8 @@ Sync11Service.prototype = {
|
||||
reason = kSyncMasterPasswordLocked;
|
||||
else if (Svc.Prefs.get("firstSync") == "notReady")
|
||||
reason = kFirstSyncChoiceNotMade;
|
||||
else if (!Async.isAppReady())
|
||||
reason = kFirefoxShuttingDown;
|
||||
|
||||
if (ignore && ignore.indexOf(reason) != -1)
|
||||
return "";
|
||||
|
@ -10,7 +10,6 @@ use dom::document::Document;
|
||||
use dom::element::{CustomElementCreationMode, CustomElementState, Element, ElementCreator};
|
||||
use dom::globalscope::GlobalScope;
|
||||
use dom::htmlanchorelement::HTMLAnchorElement;
|
||||
use dom::htmlappletelement::HTMLAppletElement;
|
||||
use dom::htmlareaelement::HTMLAreaElement;
|
||||
use dom::htmlaudioelement::HTMLAudioElement;
|
||||
use dom::htmlbaseelement::HTMLBaseElement;
|
||||
@ -191,12 +190,13 @@ fn create_html_element(name: QualName,
|
||||
result
|
||||
}
|
||||
|
||||
pub fn create_native_html_element(name: QualName,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document,
|
||||
creator: ElementCreator)
|
||||
-> DomRoot<Element> {
|
||||
assert!(name.ns == ns!(html));
|
||||
pub fn create_native_html_element(
|
||||
name: QualName,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document,
|
||||
creator: ElementCreator,
|
||||
) -> DomRoot<Element> {
|
||||
assert_eq!(name.ns, ns!(html));
|
||||
|
||||
macro_rules! make(
|
||||
($ctor:ident) => ({
|
||||
@ -217,7 +217,6 @@ pub fn create_native_html_element(name: QualName,
|
||||
local_name!("abbr") => make!(HTMLElement),
|
||||
local_name!("acronym") => make!(HTMLElement),
|
||||
local_name!("address") => make!(HTMLElement),
|
||||
local_name!("applet") => make!(HTMLAppletElement),
|
||||
local_name!("area") => make!(HTMLAreaElement),
|
||||
local_name!("article") => make!(HTMLElement),
|
||||
local_name!("aside") => make!(HTMLElement),
|
||||
|
@ -47,7 +47,6 @@ use dom::forcetouchevent::ForceTouchEvent;
|
||||
use dom::globalscope::GlobalScope;
|
||||
use dom::hashchangeevent::HashChangeEvent;
|
||||
use dom::htmlanchorelement::HTMLAnchorElement;
|
||||
use dom::htmlappletelement::HTMLAppletElement;
|
||||
use dom::htmlareaelement::HTMLAreaElement;
|
||||
use dom::htmlbaseelement::HTMLBaseElement;
|
||||
use dom::htmlbodyelement::HTMLBodyElement;
|
||||
@ -413,14 +412,6 @@ impl CollectionFilter for AnchorsFilter {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(JSTraceable, MallocSizeOf)]
|
||||
struct AppletsFilter;
|
||||
impl CollectionFilter for AppletsFilter {
|
||||
fn filter(&self, elem: &Element, _root: &Node) -> bool {
|
||||
elem.is::<HTMLAppletElement>()
|
||||
}
|
||||
}
|
||||
|
||||
impl Document {
|
||||
#[inline]
|
||||
pub fn loader(&self) -> Ref<DocumentLoader> {
|
||||
@ -3373,10 +3364,8 @@ impl DocumentMethods for Document {
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-document-applets
|
||||
fn Applets(&self) -> DomRoot<HTMLCollection> {
|
||||
// FIXME: This should be return OBJECT elements containing applets.
|
||||
self.applets.or_init(|| {
|
||||
let filter = Box::new(AppletsFilter);
|
||||
HTMLCollection::create(&self.window, self.upcast(), filter)
|
||||
HTMLCollection::always_empty(&self.window, self.upcast())
|
||||
})
|
||||
}
|
||||
|
||||
@ -3530,17 +3519,6 @@ impl DocumentMethods for Document {
|
||||
None => return false,
|
||||
};
|
||||
match html_elem_type {
|
||||
HTMLElementTypeId::HTMLAppletElement => {
|
||||
match elem.get_attribute(&ns!(), &local_name!("name")) {
|
||||
Some(ref attr) if attr.value().as_atom() == name => true,
|
||||
_ => {
|
||||
match elem.get_attribute(&ns!(), &local_name!("id")) {
|
||||
Some(ref attr) => attr.value().as_atom() == name,
|
||||
None => false,
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
HTMLElementTypeId::HTMLFormElement => {
|
||||
match elem.get_attribute(&ns!(), &local_name!("name")) {
|
||||
Some(ref attr) => attr.value().as_atom() == name,
|
||||
|
@ -109,7 +109,8 @@ use style::dom_apis;
|
||||
use style::element_state::ElementState;
|
||||
use style::invalidation::element::restyle_hints::RestyleHint;
|
||||
use style::properties::{Importance, PropertyDeclaration, PropertyDeclarationBlock, parse_style_attribute};
|
||||
use style::properties::longhands::{self, background_image, border_spacing, font_family, font_size, overflow_x};
|
||||
use style::properties::longhands::{self, background_image, border_spacing, font_family, font_size};
|
||||
use style::properties::longhands::{overflow_x, overflow_y};
|
||||
use style::rule_tree::CascadeLevel;
|
||||
use style::selector_parser::{NonTSPseudoClass, PseudoElement, RestyleDamage, SelectorImpl, SelectorParser};
|
||||
use style::selector_parser::extended_filtering;
|
||||
@ -373,7 +374,7 @@ impl Element {
|
||||
fn overflow_y_is_visible(&self) -> bool {
|
||||
let window = window_from_node(self);
|
||||
let overflow_pair = window.overflow_query(self.upcast::<Node>().to_trusted_node_address());
|
||||
overflow_pair.y != overflow_x::computed_value::T::visible
|
||||
overflow_pair.y == overflow_y::computed_value::T::visible
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,62 +0,0 @@
|
||||
/* 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/. */
|
||||
|
||||
use dom::bindings::codegen::Bindings::HTMLAppletElementBinding;
|
||||
use dom::bindings::codegen::Bindings::HTMLAppletElementBinding::HTMLAppletElementMethods;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::root::DomRoot;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever::{LocalName, Prefix};
|
||||
use style::attr::AttrValue;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLAppletElement {
|
||||
htmlelement: HTMLElement
|
||||
}
|
||||
|
||||
impl HTMLAppletElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLAppletElement {
|
||||
HTMLAppletElement {
|
||||
htmlelement:
|
||||
HTMLElement::new_inherited(local_name, prefix, document)
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> DomRoot<HTMLAppletElement> {
|
||||
Node::reflect_node(Box::new(HTMLAppletElement::new_inherited(local_name, prefix, document)),
|
||||
document,
|
||||
HTMLAppletElementBinding::Wrap)
|
||||
}
|
||||
}
|
||||
|
||||
impl HTMLAppletElementMethods for HTMLAppletElement {
|
||||
// https://html.spec.whatwg.org/multipage/#the-applet-element:dom-applet-name
|
||||
make_getter!(Name, "name");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#the-applet-element:dom-applet-name
|
||||
make_atomic_setter!(SetName, "name");
|
||||
}
|
||||
|
||||
impl VirtualMethods for HTMLAppletElement {
|
||||
fn super_type(&self) -> Option<&VirtualMethods> {
|
||||
Some(self.upcast::<HTMLElement>() as &VirtualMethods)
|
||||
}
|
||||
|
||||
fn parse_plain_attribute(&self, name: &LocalName, value: DOMString) -> AttrValue {
|
||||
match name {
|
||||
&local_name!("name") => AttrValue::from_atomic(value.into()),
|
||||
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
|
||||
}
|
||||
}
|
||||
}
|
@ -80,6 +80,19 @@ impl HTMLCollection {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns a collection which is always empty.
|
||||
pub fn always_empty(window: &Window, root: &Node) -> DomRoot<Self> {
|
||||
#[derive(JSTraceable)]
|
||||
struct NoFilter;
|
||||
impl CollectionFilter for NoFilter {
|
||||
fn filter<'a>(&self, _: &'a Element, _: &'a Node) -> bool {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
Self::new(window, root, Box::new(NoFilter))
|
||||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(window: &Window, root: &Node, filter: Box<CollectionFilter + 'static>) -> DomRoot<HTMLCollection> {
|
||||
reflect_dom_object(Box::new(HTMLCollection::new_inherited(root, filter)),
|
||||
|
@ -301,7 +301,6 @@ pub mod hashchangeevent;
|
||||
pub mod headers;
|
||||
pub mod history;
|
||||
pub mod htmlanchorelement;
|
||||
pub mod htmlappletelement;
|
||||
pub mod htmlareaelement;
|
||||
pub mod htmlaudioelement;
|
||||
pub mod htmlbaseelement;
|
||||
|
@ -14,7 +14,6 @@ use dom::document::Document;
|
||||
use dom::element::{AttributeMutation, Element};
|
||||
use dom::event::Event;
|
||||
use dom::htmlanchorelement::HTMLAnchorElement;
|
||||
use dom::htmlappletelement::HTMLAppletElement;
|
||||
use dom::htmlareaelement::HTMLAreaElement;
|
||||
use dom::htmlbaseelement::HTMLBaseElement;
|
||||
use dom::htmlbodyelement::HTMLBodyElement;
|
||||
@ -154,9 +153,6 @@ pub fn vtable_for(node: &Node) -> &VirtualMethods {
|
||||
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLAnchorElement)) => {
|
||||
node.downcast::<HTMLAnchorElement>().unwrap() as &VirtualMethods
|
||||
}
|
||||
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLAppletElement)) => {
|
||||
node.downcast::<HTMLAppletElement>().unwrap() as &VirtualMethods
|
||||
}
|
||||
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLAreaElement)) => {
|
||||
node.downcast::<HTMLAreaElement>().unwrap() as &VirtualMethods
|
||||
}
|
||||
|
@ -171,6 +171,7 @@ partial interface Document {
|
||||
|
||||
[SameObject]
|
||||
readonly attribute HTMLCollection anchors;
|
||||
|
||||
[SameObject]
|
||||
readonly attribute HTMLCollection applets;
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
/* 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/. */
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#htmlappletelement
|
||||
// Note: intentionally not [HTMLConstructor]
|
||||
interface HTMLAppletElement : HTMLElement {
|
||||
// attribute DOMString align;
|
||||
// attribute DOMString alt;
|
||||
// attribute DOMString archive;
|
||||
// attribute DOMString code;
|
||||
// attribute DOMString codeBase;
|
||||
// attribute DOMString height;
|
||||
// attribute unsigned long hspace;
|
||||
attribute DOMString name;
|
||||
// attribute DOMString _object; // the underscore is not part of the identifier
|
||||
// attribute unsigned long vspace;
|
||||
// attribute DOMString width;
|
||||
};
|
@ -10,7 +10,6 @@ use context::QuirksMode;
|
||||
use cssparser::{CssStringWriter, Parser, RGBA, Token, BasicParseErrorKind};
|
||||
use euclid::ScaleFactor;
|
||||
use euclid::Size2D;
|
||||
use font_metrics::get_metrics_provider_for_product;
|
||||
use gecko::values::{convert_nscolor_to_rgba, convert_rgba_to_nscolor};
|
||||
use gecko_bindings::bindings;
|
||||
use gecko_bindings::structs;
|
||||
@ -20,11 +19,9 @@ use gecko_bindings::structs::{nsMediaFeature_ValueType, nsMediaFeature_RangeType
|
||||
use gecko_bindings::structs::{nsPresContext, RawGeckoPresContextOwned};
|
||||
use media_queries::MediaType;
|
||||
use parser::ParserContext;
|
||||
use properties::{ComputedValues, StyleBuilder};
|
||||
use properties::ComputedValues;
|
||||
use properties::longhands::font_size;
|
||||
use rule_cache::RuleCacheConditions;
|
||||
use servo_arc::Arc;
|
||||
use std::cell::RefCell;
|
||||
use std::fmt::{self, Write};
|
||||
use std::sync::atomic::{AtomicBool, AtomicIsize, AtomicUsize, Ordering};
|
||||
use str::starts_with_ignore_ascii_case;
|
||||
@ -722,26 +719,8 @@ impl Expression {
|
||||
self.feature.mRangeType == nsMediaFeature_RangeType::eMinMaxAllowed,
|
||||
"Whoops, wrong range");
|
||||
|
||||
let default_values = device.default_computed_values();
|
||||
|
||||
|
||||
let provider = get_metrics_provider_for_product();
|
||||
|
||||
// http://dev.w3.org/csswg/mediaqueries3/#units
|
||||
// em units are relative to the initial font-size.
|
||||
let mut conditions = RuleCacheConditions::default();
|
||||
let context = computed::Context {
|
||||
is_root_element: false,
|
||||
builder: StyleBuilder::for_derived_style(device, default_values, None, None),
|
||||
font_metrics_provider: &provider,
|
||||
cached_system_font: None,
|
||||
in_media_query: true,
|
||||
quirks_mode,
|
||||
for_smil_animation: false,
|
||||
for_non_inherited_property: None,
|
||||
rule_cache_conditions: RefCell::new(&mut conditions),
|
||||
};
|
||||
|
||||
let required_value = match self.value {
|
||||
Some(ref v) => v,
|
||||
None => {
|
||||
@ -750,7 +729,13 @@ impl Expression {
|
||||
return match *actual_value {
|
||||
BoolInteger(v) => v,
|
||||
Integer(v) => v != 0,
|
||||
Length(ref l) => l.to_computed_value(&context).px() != 0.,
|
||||
Length(ref l) => {
|
||||
computed::Context::for_media_query_evaluation(
|
||||
device,
|
||||
quirks_mode,
|
||||
|context| l.to_computed_value(&context).px() != 0.,
|
||||
)
|
||||
},
|
||||
_ => true,
|
||||
}
|
||||
}
|
||||
@ -759,8 +744,10 @@ impl Expression {
|
||||
// FIXME(emilio): Handle the possible floating point errors?
|
||||
let cmp = match (required_value, actual_value) {
|
||||
(&Length(ref one), &Length(ref other)) => {
|
||||
one.to_computed_value(&context).to_i32_au()
|
||||
.cmp(&other.to_computed_value(&context).to_i32_au())
|
||||
computed::Context::for_media_query_evaluation(device, quirks_mode, |context| {
|
||||
one.to_computed_value(&context).to_i32_au()
|
||||
.cmp(&other.to_computed_value(&context).to_i32_au())
|
||||
})
|
||||
}
|
||||
(&Integer(one), &Integer(ref other)) => one.cmp(other),
|
||||
(&BoolInteger(one), &BoolInteger(ref other)) => one.cmp(other),
|
||||
|
@ -77,17 +77,10 @@ impl MediaQuery {
|
||||
/// Return a media query that never matches, used for when we fail to parse
|
||||
/// a given media query.
|
||||
fn never_matching() -> Self {
|
||||
Self::new(Some(Qualifier::Not), MediaQueryType::All, vec![])
|
||||
}
|
||||
|
||||
/// Trivially constructs a new media query.
|
||||
pub fn new(qualifier: Option<Qualifier>,
|
||||
media_type: MediaQueryType,
|
||||
expressions: Vec<Expression>) -> MediaQuery {
|
||||
MediaQuery {
|
||||
qualifier: qualifier,
|
||||
media_type: media_type,
|
||||
expressions: expressions,
|
||||
Self {
|
||||
qualifier: Some(Qualifier::Not),
|
||||
media_type: MediaQueryType::All,
|
||||
expressions: vec![],
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -209,9 +202,12 @@ impl MediaQuery {
|
||||
|
||||
let media_type = match input.try(|i| i.expect_ident_cloned()) {
|
||||
Ok(ident) => {
|
||||
let result: Result<_, ParseError> = MediaQueryType::parse(&*ident)
|
||||
.map_err(|()| input.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(ident.clone())));
|
||||
result?
|
||||
MediaQueryType::parse(&*ident)
|
||||
.map_err(|()| {
|
||||
input.new_custom_error(
|
||||
SelectorParseErrorKind::UnexpectedIdent(ident.clone())
|
||||
)
|
||||
})?
|
||||
}
|
||||
Err(_) => {
|
||||
// Media type is only optional if qualifier is not specified.
|
||||
@ -229,7 +225,7 @@ impl MediaQuery {
|
||||
// Parse any subsequent expressions
|
||||
loop {
|
||||
if input.try(|input| input.expect_ident_matching("and")).is_err() {
|
||||
return Ok(MediaQuery::new(qualifier, media_type, expressions))
|
||||
return Ok(MediaQuery { qualifier, media_type, expressions })
|
||||
}
|
||||
expressions.push(Expression::parse(context, input)?)
|
||||
}
|
||||
|
@ -8,14 +8,11 @@ use app_units::Au;
|
||||
use context::QuirksMode;
|
||||
use cssparser::{Parser, RGBA};
|
||||
use euclid::{ScaleFactor, Size2D, TypedSize2D};
|
||||
use font_metrics::ServoMetricsProvider;
|
||||
use media_queries::MediaType;
|
||||
use parser::ParserContext;
|
||||
use properties::{ComputedValues, StyleBuilder};
|
||||
use properties::ComputedValues;
|
||||
use properties::longhands::font_size;
|
||||
use rule_cache::RuleCacheConditions;
|
||||
use selectors::parser::SelectorParseErrorKind;
|
||||
use std::cell::RefCell;
|
||||
use std::fmt;
|
||||
use std::sync::atomic::{AtomicBool, AtomicIsize, Ordering};
|
||||
use style_traits::{CSSPixel, DevicePixel, ToCss, ParseError};
|
||||
@ -252,29 +249,12 @@ pub enum Range<T> {
|
||||
|
||||
impl Range<specified::Length> {
|
||||
fn to_computed_range(&self, device: &Device, quirks_mode: QuirksMode) -> Range<Au> {
|
||||
let default_values = device.default_computed_values();
|
||||
let mut conditions = RuleCacheConditions::default();
|
||||
// http://dev.w3.org/csswg/mediaqueries3/#units
|
||||
// em units are relative to the initial font-size.
|
||||
let context = computed::Context {
|
||||
is_root_element: false,
|
||||
builder: StyleBuilder::for_derived_style(device, default_values, None, None),
|
||||
// Servo doesn't support font metrics
|
||||
// A real provider will be needed here once we do; since
|
||||
// ch units can exist in media queries.
|
||||
font_metrics_provider: &ServoMetricsProvider,
|
||||
in_media_query: true,
|
||||
cached_system_font: None,
|
||||
quirks_mode,
|
||||
for_smil_animation: false,
|
||||
for_non_inherited_property: None,
|
||||
rule_cache_conditions: RefCell::new(&mut conditions),
|
||||
};
|
||||
|
||||
match *self {
|
||||
Range::Min(ref width) => Range::Min(Au::from(width.to_computed_value(&context))),
|
||||
Range::Max(ref width) => Range::Max(Au::from(width.to_computed_value(&context))),
|
||||
Range::Eq(ref width) => Range::Eq(Au::from(width.to_computed_value(&context)))
|
||||
}
|
||||
computed::Context::for_media_query_evaluation(device, quirks_mode, |context| {
|
||||
match *self {
|
||||
Range::Min(ref width) => Range::Min(Au::from(width.to_computed_value(&context))),
|
||||
Range::Max(ref width) => Range::Max(Au::from(width.to_computed_value(&context))),
|
||||
Range::Eq(ref width) => Range::Eq(Au::from(width.to_computed_value(&context)))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
use {Atom, Namespace};
|
||||
use context::QuirksMode;
|
||||
use euclid::Size2D;
|
||||
use font_metrics::FontMetricsProvider;
|
||||
use font_metrics::{FontMetricsProvider, get_metrics_provider_for_product};
|
||||
use media_queries::Device;
|
||||
#[cfg(feature = "gecko")]
|
||||
use properties;
|
||||
@ -136,6 +136,36 @@ pub struct Context<'a> {
|
||||
}
|
||||
|
||||
impl<'a> Context<'a> {
|
||||
/// Creates a suitable context for media query evaluation, in which
|
||||
/// font-relative units compute against the system_font, and executes `f`
|
||||
/// with it.
|
||||
pub fn for_media_query_evaluation<F, R>(
|
||||
device: &Device,
|
||||
quirks_mode: QuirksMode,
|
||||
f: F,
|
||||
) -> R
|
||||
where
|
||||
F: FnOnce(&Context) -> R
|
||||
{
|
||||
let mut conditions = RuleCacheConditions::default();
|
||||
let default_values = device.default_computed_values();
|
||||
let provider = get_metrics_provider_for_product();
|
||||
|
||||
let context = Context {
|
||||
is_root_element: false,
|
||||
builder: StyleBuilder::for_derived_style(device, default_values, None, None),
|
||||
font_metrics_provider: &provider,
|
||||
cached_system_font: None,
|
||||
in_media_query: true,
|
||||
quirks_mode,
|
||||
for_smil_animation: false,
|
||||
for_non_inherited_property: None,
|
||||
rule_cache_conditions: RefCell::new(&mut conditions),
|
||||
};
|
||||
|
||||
f(&context)
|
||||
}
|
||||
|
||||
/// Whether the current element is the root element.
|
||||
pub fn is_root_element(&self) -> bool {
|
||||
self.is_root_element
|
||||
|
@ -76,6 +76,7 @@ pub mod length;
|
||||
pub mod percentage;
|
||||
pub mod position;
|
||||
pub mod rect;
|
||||
pub mod source_size_list;
|
||||
pub mod svg;
|
||||
pub mod table;
|
||||
pub mod text;
|
||||
|
79
servo/components/style/values/specified/source_size_list.rs
Normal file
79
servo/components/style/values/specified/source_size_list.rs
Normal file
@ -0,0 +1,79 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! https://html.spec.whatwg.org/multipage/#source-size-list
|
||||
|
||||
use app_units::Au;
|
||||
use cssparser::Parser;
|
||||
use media_queries::{Device, Expression as MediaExpression};
|
||||
use parser::{Parse, ParserContext};
|
||||
use selectors::context::QuirksMode;
|
||||
use style_traits::ParseError;
|
||||
use values::computed::{self, ToComputedValue};
|
||||
use values::specified::Length;
|
||||
|
||||
/// A value for a `<source-size>`:
|
||||
///
|
||||
/// https://html.spec.whatwg.org/multipage/#source-size
|
||||
pub struct SourceSize {
|
||||
condition: MediaExpression,
|
||||
value: Length,
|
||||
}
|
||||
|
||||
impl Parse for SourceSize {
|
||||
fn parse<'i, 't>(
|
||||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
let condition = MediaExpression::parse(context, input)?;
|
||||
let value = Length::parse_non_negative(context, input)?;
|
||||
|
||||
Ok(Self { condition, value })
|
||||
}
|
||||
}
|
||||
|
||||
/// A value for a `<source-size-list>`:
|
||||
///
|
||||
/// https://html.spec.whatwg.org/multipage/#source-size-list
|
||||
pub struct SourceSizeList {
|
||||
source_sizes: Vec<SourceSize>,
|
||||
value: Length,
|
||||
}
|
||||
|
||||
impl SourceSizeList {
|
||||
/// Evaluate this <source-size-list> to get the final viewport length.
|
||||
pub fn evaluate(&self, device: &Device, quirks_mode: QuirksMode) -> Au {
|
||||
let matching_source_size = self.source_sizes.iter().find(|source_size| {
|
||||
source_size.condition.matches(device, quirks_mode)
|
||||
});
|
||||
|
||||
computed::Context::for_media_query_evaluation(device, quirks_mode, |context| {
|
||||
match matching_source_size {
|
||||
Some(source_size) => {
|
||||
source_size.value.to_computed_value(context)
|
||||
}
|
||||
None => {
|
||||
self.value.to_computed_value(context)
|
||||
}
|
||||
}
|
||||
}).into()
|
||||
}
|
||||
}
|
||||
|
||||
impl Parse for SourceSizeList {
|
||||
fn parse<'i, 't>(
|
||||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
let source_sizes = input.try(|input| {
|
||||
input.parse_comma_separated(|input| {
|
||||
SourceSize::parse(context, input)
|
||||
})
|
||||
}).unwrap_or(vec![]);
|
||||
|
||||
let value = Length::parse_non_negative(context, input)?;
|
||||
|
||||
Ok(Self { source_sizes, value })
|
||||
}
|
||||
}
|
@ -139,31 +139,31 @@ hr[color], hr[noshade] { border-style: solid; }
|
||||
|
||||
iframe[frameborder="0"], iframe[frameborder=no i] { border: none; }
|
||||
|
||||
applet[align=left i], embed[align=left i], iframe[align=left i], img[type=image i][align=left i], object[align=left i] {
|
||||
embed[align=left i], iframe[align=left i], img[type=image i][align=left i], object[align=left i] {
|
||||
float: left;
|
||||
}
|
||||
applet[align=right i], embed[align=right i], iframe[align=right i], img[type=image i][align=right i], object[align=right i] {
|
||||
embed[align=right i], iframe[align=right i], img[type=image i][align=right i], object[align=right i] {
|
||||
float: right;
|
||||
}
|
||||
applet[align=top i], embed[align=top i], iframe[align=top i], img[type=image i][align=top i], object[align=top i] {
|
||||
embed[align=top i], iframe[align=top i], img[type=image i][align=top i], object[align=top i] {
|
||||
vertical-align: top;
|
||||
}
|
||||
applet[align=baseline i], embed[align=baseline i], iframe[align=baseline i], img[type=image i][align=baseline i], object[align=baseline i] {
|
||||
embed[align=baseline i], iframe[align=baseline i], img[type=image i][align=baseline i], object[align=baseline i] {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
applet[align=texttop i], embed[align=texttop i], iframe[align=texttop i], img[type=image i][align=texttop i], object[align=texttop i] {
|
||||
embed[align=texttop i], iframe[align=texttop i], img[type=image i][align=texttop i], object[align=texttop i] {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
applet[align=absmiddle i], embed[align=absmiddle i], iframe[align=absmiddle i], img[type=image i][align=absmiddle i], object[align=absmiddle i],
|
||||
applet[align=abscenter i], embed[align=abscenter i], iframe[align=abscenter i], img[type=image i][align=abscenter i], object[align=abscenter i] {
|
||||
embed[align=absmiddle i], iframe[align=absmiddle i], img[type=image i][align=absmiddle i], object[align=absmiddle i],
|
||||
embed[align=abscenter i], iframe[align=abscenter i], img[type=image i][align=abscenter i], object[align=abscenter i] {
|
||||
vertical-align: middle;
|
||||
}
|
||||
applet[align=bottom i], embed[align=bottom i], iframe[align=bottom i], img[type=image i][align=bottom i], object[align=bottom i] {
|
||||
embed[align=bottom i], iframe[align=bottom i], img[type=image i][align=bottom i], object[align=bottom i] {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
/*
|
||||
FIXME:
|
||||
:matches(applet, embed, iframe, img, input[type=image i], object):matches([align=center i], [align=middle i]) {
|
||||
:matches(embed, iframe, img, input[type=image i], object):matches([align=center i], [align=middle i]) {
|
||||
vertical-align: "aligns the vertical middle of the element with the parent element's baseline."
|
||||
}
|
||||
*/
|
||||
@ -235,14 +235,14 @@ hr
|
||||
legend
|
||||
align
|
||||
|
||||
applet, embed, iframe, img, input[type=image i], object
|
||||
embed, iframe, img, input[type=image i], object
|
||||
hspace
|
||||
vspace
|
||||
|
||||
img, input[type=image i], object
|
||||
border
|
||||
|
||||
applet, embed, iframe, img, input[type=image i], object, video
|
||||
embed, iframe, img, input[type=image i], object, video
|
||||
width
|
||||
height
|
||||
|
||||
|
80
taskcluster/ci/config.yml
Normal file
80
taskcluster/ci/config.yml
Normal file
@ -0,0 +1,80 @@
|
||||
treeherder:
|
||||
group-names:
|
||||
'cram': 'Cram tests'
|
||||
'mocha': 'Mocha unit tests'
|
||||
'py': 'Python unit tests'
|
||||
'tc': 'Executed by TaskCluster'
|
||||
'tc-A': 'Android Gradle tests executed by TaskCluster'
|
||||
'tc-e10s': 'Executed by TaskCluster with e10s'
|
||||
'tc-Fxfn-l': 'Firefox functional tests (local) executed by TaskCluster'
|
||||
'tc-Fxfn-l-e10s': 'Firefox functional tests (local) executed by TaskCluster with e10s'
|
||||
'tc-Fxfn-r': 'Firefox functional tests (remote) executed by TaskCluster'
|
||||
'tc-Fxfn-r-e10s': 'Firefox functional tests (remote) executed by TaskCluster with e10s'
|
||||
'tc-M': 'Mochitests executed by TaskCluster'
|
||||
'tc-M-e10s': 'Mochitests executed by TaskCluster with e10s'
|
||||
'tc-M-V': 'Mochitests on Valgrind executed by TaskCluster'
|
||||
'tc-R': 'Reftests executed by TaskCluster'
|
||||
'tc-R-e10s': 'Reftests executed by TaskCluster with e10s'
|
||||
'tc-T': 'Talos performance tests executed by TaskCluster'
|
||||
'tc-Tsd': 'Talos performance tests executed by TaskCluster with Stylo disabled'
|
||||
'tc-Tss': 'Talos performance tests executed by TaskCluster with Stylo sequential'
|
||||
'tc-T-e10s': 'Talos performance tests executed by TaskCluster with e10s'
|
||||
'tc-Tsd-e10s': 'Talos performance tests executed by TaskCluster with e10s, Stylo disabled'
|
||||
'tc-Tss-e10s': 'Talos performance tests executed by TaskCluster with e10s, Stylo sequential'
|
||||
'tc-tt-c': 'Telemetry client marionette tests'
|
||||
'tc-tt-c-e10s': 'Telemetry client marionette tests with e10s'
|
||||
'tc-SY-e10s': 'Are we slim yet tests by TaskCluster with e10s'
|
||||
'tc-SYsd-e10s': 'Are we slim yet tests by TaskCluster with e10s, Stylo disabled'
|
||||
'tc-SYss-e10s': 'Are we slim yet tests by TaskCluster with e10s, Stylo sequential'
|
||||
'tc-VP': 'VideoPuppeteer tests executed by TaskCluster'
|
||||
'tc-W': 'Web platform tests executed by TaskCluster'
|
||||
'tc-W-e10s': 'Web platform tests executed by TaskCluster with e10s'
|
||||
'tc-X': 'Xpcshell tests executed by TaskCluster'
|
||||
'tc-X-e10s': 'Xpcshell tests executed by TaskCluster with e10s'
|
||||
'tc-L10n': 'Localised Repacks executed by Taskcluster'
|
||||
'tc-L10n-Rpk': 'Localized Repackaged Repacks executed by Taskcluster'
|
||||
'tc-BM-L10n': 'Beetmover for locales executed by Taskcluster'
|
||||
'tc-BMR-L10n': 'Beetmover repackages for locales executed by Taskcluster'
|
||||
'c-Up': 'Balrog submission of complete updates'
|
||||
'tc-cs': 'Checksum signing executed by Taskcluster'
|
||||
'tc-rs': 'Repackage signing executed by Taskcluster'
|
||||
'tc-BMcs': 'Beetmover checksums, executed by Taskcluster'
|
||||
'Aries': 'Aries Device Image'
|
||||
'Nexus 5-L': 'Nexus 5-L Device Image'
|
||||
'I': 'Docker Image Builds'
|
||||
'TL': 'Toolchain builds for Linux 64-bits'
|
||||
'TM': 'Toolchain builds for OSX'
|
||||
'TMW': 'Toolchain builds for Windows MinGW'
|
||||
'TW32': 'Toolchain builds for Windows 32-bits'
|
||||
'TW64': 'Toolchain builds for Windows 64-bits'
|
||||
'SM-tc': 'Spidermonkey builds'
|
||||
'pub': 'APK publishing'
|
||||
'p': 'Partial generation'
|
||||
'ps': 'Partials signing'
|
||||
'Rel': 'Release promotion'
|
||||
|
||||
try:
|
||||
# We have a few platforms for which we want to do some "extra" builds, or at
|
||||
# least build-ish things. Sort of. Anyway, these other things are implemented
|
||||
# as different "platforms". These do *not* automatically ride along with "-p
|
||||
# all"
|
||||
ridealong-builds:
|
||||
'android-api-16':
|
||||
- 'android-api-16-l10n'
|
||||
'linux':
|
||||
- 'linux-l10n'
|
||||
'linux64':
|
||||
- 'linux64-l10n'
|
||||
- 'sm-plain'
|
||||
- 'sm-nonunified'
|
||||
- 'sm-arm-sim'
|
||||
- 'sm-arm64-sim'
|
||||
- 'sm-compacting'
|
||||
- 'sm-rootanalysis'
|
||||
- 'sm-package'
|
||||
- 'sm-tsan'
|
||||
- 'sm-asan'
|
||||
- 'sm-mozjs-sys'
|
||||
- 'sm-msan'
|
||||
- 'sm-fuzzing'
|
||||
- 'sm-rust-bindings'
|
26
taskcluster/taskgraph/config.py
Normal file
26
taskcluster/taskgraph/config.py
Normal file
@ -0,0 +1,26 @@
|
||||
# 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/.
|
||||
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
from .util.schema import validate_schema, Schema
|
||||
from voluptuous import Required
|
||||
|
||||
graph_config_schema = Schema({
|
||||
Required('treeherder'): {
|
||||
# Mapping of treeherder group symbols to descriptive names
|
||||
Required('group-names'): {basestring: basestring}
|
||||
},
|
||||
Required('try'): {
|
||||
# We have a few platforms for which we want to do some "extra" builds, or at
|
||||
# least build-ish things. Sort of. Anyway, these other things are implemented
|
||||
# as different "platforms". These do *not* automatically ride along with "-p
|
||||
# all"
|
||||
Required('ridealong-builds', default={}): {basestring: [basestring]},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
def validate_graph_config(config):
|
||||
return validate_schema(graph_config_schema, config, "Invalid graph configuration:")
|
@ -39,6 +39,10 @@ PER_PROJECT_PARAMETERS = {
|
||||
'include_nightly': True,
|
||||
},
|
||||
|
||||
'try-comm-central': {
|
||||
'target_tasks_method': 'try_tasks',
|
||||
},
|
||||
|
||||
'ash': {
|
||||
'target_tasks_method': 'ash_tasks',
|
||||
'optimize_target_tasks': True,
|
||||
@ -201,7 +205,7 @@ def get_decision_parameters(options):
|
||||
task_config_file = os.path.join(os.getcwd(), 'try_task_config.json')
|
||||
|
||||
# load try settings
|
||||
if project == 'try':
|
||||
if 'try' in project:
|
||||
parameters['try_mode'] = None
|
||||
if os.path.isfile(task_config_file):
|
||||
parameters['try_mode'] = 'try_task_config'
|
||||
|
@ -24,7 +24,7 @@ def filter_task(name):
|
||||
|
||||
|
||||
@filter_task('target_tasks_method')
|
||||
def filter_target_tasks(graph, parameters):
|
||||
def filter_target_tasks(graph, parameters, graph_config):
|
||||
"""Proxy filter to use legacy target tasks code.
|
||||
|
||||
This should go away once target_tasks are converted to filters.
|
||||
@ -32,11 +32,11 @@ def filter_target_tasks(graph, parameters):
|
||||
|
||||
attr = parameters.get('target_tasks_method', 'all_tasks')
|
||||
fn = target_tasks.get_method(attr)
|
||||
return fn(graph, parameters)
|
||||
return fn(graph, parameters, graph_config)
|
||||
|
||||
|
||||
@filter_task('check_servo')
|
||||
def filter_servo(graph, parameters):
|
||||
def filter_servo(graph, parameters, graph_config):
|
||||
"""Filter out tasks for Servo vendoring changesets.
|
||||
|
||||
If the change triggering is related to Servo vendoring, impact is minimal
|
||||
|
@ -20,16 +20,18 @@ from .util.verify import (
|
||||
verify_docs,
|
||||
verifications,
|
||||
)
|
||||
from .config import validate_graph_config
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Kind(object):
|
||||
|
||||
def __init__(self, name, path, config):
|
||||
def __init__(self, name, path, config, graph_config):
|
||||
self.name = name
|
||||
self.path = path
|
||||
self.config = config
|
||||
self.graph_config = graph_config
|
||||
|
||||
def _get_loader(self):
|
||||
try:
|
||||
@ -55,7 +57,7 @@ class Kind(object):
|
||||
|
||||
# perform the transformations on the loaded inputs
|
||||
trans_config = TransformConfig(self.name, self.path, config, parameters,
|
||||
kind_dependencies_tasks)
|
||||
kind_dependencies_tasks, self.graph_config)
|
||||
tasks = [Task(self.name,
|
||||
label=task_dict['label'],
|
||||
attributes=task_dict['attributes'],
|
||||
@ -179,7 +181,7 @@ class TaskGraphGenerator(object):
|
||||
"""
|
||||
return self._run_until('morphed_task_graph')
|
||||
|
||||
def _load_kinds(self):
|
||||
def _load_kinds(self, graph_config):
|
||||
for path in os.listdir(self.root_dir):
|
||||
path = os.path.join(self.root_dir, path)
|
||||
if not os.path.isdir(path):
|
||||
@ -194,13 +196,27 @@ class TaskGraphGenerator(object):
|
||||
with open(kind_yml) as f:
|
||||
config = yaml.load(f)
|
||||
|
||||
yield Kind(kind_name, path, config)
|
||||
yield Kind(kind_name, path, config, graph_config)
|
||||
|
||||
def _load_graph_config(self):
|
||||
config_yml = os.path.join(self.root_dir, "config.yml")
|
||||
if not os.path.exists(config_yml):
|
||||
raise Exception("Couldn't find taskgraph configuration: {}".format(config_yml))
|
||||
|
||||
logger.debug("loading config from `{}`".format(config_yml))
|
||||
with open(config_yml) as f:
|
||||
config = yaml.load(f)
|
||||
|
||||
return validate_graph_config(config)
|
||||
|
||||
def _run(self):
|
||||
logger.info("Loading graph configuration.")
|
||||
graph_config = self._load_graph_config()
|
||||
|
||||
logger.info("Loading kinds")
|
||||
# put the kinds into a graph and sort topologically so that kinds are loaded
|
||||
# in post-order
|
||||
kinds = {kind.name: kind for kind in self._load_kinds()}
|
||||
kinds = {kind.name: kind for kind in self._load_kinds(graph_config)}
|
||||
self.verify_kinds(kinds)
|
||||
|
||||
edges = set()
|
||||
@ -242,7 +258,7 @@ class TaskGraphGenerator(object):
|
||||
Graph(set(all_tasks.keys()), set()))
|
||||
for fltr in self.filters:
|
||||
old_len = len(target_task_set.graph.nodes)
|
||||
target_tasks = set(fltr(target_task_set, self.parameters))
|
||||
target_tasks = set(fltr(target_task_set, self.parameters, graph_config))
|
||||
target_task_set = TaskGraph(
|
||||
{l: all_tasks[l] for l in target_tasks},
|
||||
Graph(target_tasks, set()))
|
||||
|
@ -93,15 +93,15 @@ def standard_filter(task, parameters):
|
||||
)
|
||||
|
||||
|
||||
def _try_task_config(full_task_graph, parameters):
|
||||
def _try_task_config(full_task_graph, parameters, graph_config):
|
||||
requested_tasks = parameters['try_task_config']['tasks']
|
||||
return list(set(requested_tasks) & full_task_graph.graph.nodes)
|
||||
|
||||
|
||||
def _try_option_syntax(full_task_graph, parameters):
|
||||
def _try_option_syntax(full_task_graph, parameters, graph_config):
|
||||
"""Generate a list of target tasks based on try syntax in
|
||||
parameters['message'] and, for context, the full task graph."""
|
||||
options = try_option_syntax.TryOptionSyntax(parameters, full_task_graph)
|
||||
options = try_option_syntax.TryOptionSyntax(parameters, full_task_graph, graph_config)
|
||||
target_tasks_labels = [t.label for t in full_task_graph.tasks.itervalues()
|
||||
if options.task_matches(t)]
|
||||
|
||||
@ -147,12 +147,12 @@ def _try_option_syntax(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('try_tasks')
|
||||
def target_tasks_try(full_task_graph, parameters):
|
||||
def target_tasks_try(full_task_graph, parameters, graph_config):
|
||||
try_mode = parameters['try_mode']
|
||||
if try_mode == 'try_task_config':
|
||||
return _try_task_config(full_task_graph, parameters)
|
||||
return _try_task_config(full_task_graph, parameters, graph_config)
|
||||
elif try_mode == 'try_option_syntax':
|
||||
return _try_option_syntax(full_task_graph, parameters)
|
||||
return _try_option_syntax(full_task_graph, parameters, graph_config)
|
||||
else:
|
||||
# With no try mode, we schedule nothing, allowing the user to add tasks
|
||||
# later via treeherder.
|
||||
@ -160,7 +160,7 @@ def target_tasks_try(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('default')
|
||||
def target_tasks_default(full_task_graph, parameters):
|
||||
def target_tasks_default(full_task_graph, parameters, graph_config):
|
||||
"""Target the tasks which have indicated they should be run on this project
|
||||
via the `run_on_projects` attributes."""
|
||||
return [l for l, t in full_task_graph.tasks.iteritems()
|
||||
@ -168,7 +168,7 @@ def target_tasks_default(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('ash_tasks')
|
||||
def target_tasks_ash(full_task_graph, parameters):
|
||||
def target_tasks_ash(full_task_graph, parameters, graph_config):
|
||||
"""Target tasks that only run on the ash branch."""
|
||||
def filter(task):
|
||||
platform = task.attributes.get('build_platform')
|
||||
@ -204,7 +204,7 @@ def target_tasks_ash(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('cedar_tasks')
|
||||
def target_tasks_cedar(full_task_graph, parameters):
|
||||
def target_tasks_cedar(full_task_graph, parameters, graph_config):
|
||||
"""Target tasks that only run on the cedar branch."""
|
||||
def filter(task):
|
||||
platform = task.attributes.get('build_platform')
|
||||
@ -220,7 +220,7 @@ def target_tasks_cedar(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('graphics_tasks')
|
||||
def target_tasks_graphics(full_task_graph, parameters):
|
||||
def target_tasks_graphics(full_task_graph, parameters, graph_config):
|
||||
"""In addition to doing the filtering by project that the 'default'
|
||||
filter does, also remove artifact builds because we have csets on
|
||||
the graphics branch that aren't on the candidate branches of artifact
|
||||
@ -235,7 +235,7 @@ def target_tasks_graphics(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('mochitest_valgrind')
|
||||
def target_tasks_valgrind(full_task_graph, parameters):
|
||||
def target_tasks_valgrind(full_task_graph, parameters, graph_config):
|
||||
"""Target tasks that only run on the cedar branch."""
|
||||
def filter(task):
|
||||
platform = task.attributes.get('test_platform', '').split('/')[0]
|
||||
@ -251,7 +251,7 @@ def target_tasks_valgrind(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('nightly_fennec')
|
||||
def target_tasks_nightly_fennec(full_task_graph, parameters):
|
||||
def target_tasks_nightly_fennec(full_task_graph, parameters, graph_config):
|
||||
"""Select the set of tasks required for a nightly build of fennec. The
|
||||
nightly build process involves a pipeline of builds, signing,
|
||||
and, eventually, uploading the tasks to balrog."""
|
||||
@ -270,7 +270,7 @@ def target_tasks_nightly_fennec(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('nightly_linux')
|
||||
def target_tasks_nightly_linux(full_task_graph, parameters):
|
||||
def target_tasks_nightly_linux(full_task_graph, parameters, graph_config):
|
||||
"""Select the set of tasks required for a nightly build of linux. The
|
||||
nightly build process involves a pipeline of builds, signing,
|
||||
and, eventually, uploading the tasks to balrog."""
|
||||
@ -282,7 +282,7 @@ def target_tasks_nightly_linux(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('mozilla_beta_tasks')
|
||||
def target_tasks_mozilla_beta(full_task_graph, parameters):
|
||||
def target_tasks_mozilla_beta(full_task_graph, parameters, graph_config):
|
||||
"""Select the set of tasks required for a promotable beta or release build
|
||||
of desktop, plus android CI. The candidates build process involves a pipeline
|
||||
of builds and signing, but does not include beetmover or balrog jobs."""
|
||||
@ -292,7 +292,7 @@ def target_tasks_mozilla_beta(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('mozilla_release_tasks')
|
||||
def target_tasks_mozilla_release(full_task_graph, parameters):
|
||||
def target_tasks_mozilla_release(full_task_graph, parameters, graph_config):
|
||||
"""Select the set of tasks required for a promotable beta or release build
|
||||
of desktop, plus android CI. The candidates build process involves a pipeline
|
||||
of builds and signing, but does not include beetmover or balrog jobs."""
|
||||
@ -304,7 +304,7 @@ def target_tasks_mozilla_release(full_task_graph, parameters):
|
||||
@_target_task('maple_desktop_promotion')
|
||||
@_target_task('mozilla-beta_desktop_promotion')
|
||||
@_target_task('mozilla-release_desktop_promotion')
|
||||
def target_tasks_mozilla_beta_desktop_promotion(full_task_graph, parameters):
|
||||
def target_tasks_mozilla_beta_desktop_promotion(full_task_graph, parameters, graph_config):
|
||||
"""Select the superset of tasks required to promote a beta or release build
|
||||
of desktop. This should include all non-android mozilla_beta tasks, plus
|
||||
l10n, beetmover, balrog, etc."""
|
||||
@ -349,7 +349,7 @@ def target_tasks_mozilla_beta_desktop_promotion(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('publish_firefox')
|
||||
def target_tasks_publish_firefox(full_task_graph, parameters):
|
||||
def target_tasks_publish_firefox(full_task_graph, parameters, graph_config):
|
||||
"""Select the set of tasks required to publish a candidates build of firefox.
|
||||
Previous build deps will be optimized out via action task."""
|
||||
filtered_for_candidates = target_tasks_mozilla_beta_desktop_promotion(
|
||||
@ -375,7 +375,7 @@ def target_tasks_publish_firefox(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('candidates_fennec')
|
||||
def target_tasks_candidates_fennec(full_task_graph, parameters):
|
||||
def target_tasks_candidates_fennec(full_task_graph, parameters, graph_config):
|
||||
"""Select the set of tasks required for a candidates build of fennec. The
|
||||
nightly build process involves a pipeline of builds, signing,
|
||||
and, eventually, uploading the tasks to balrog."""
|
||||
@ -403,7 +403,7 @@ def target_tasks_candidates_fennec(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('publish_fennec')
|
||||
def target_tasks_publish_fennec(full_task_graph, parameters):
|
||||
def target_tasks_publish_fennec(full_task_graph, parameters, graph_config):
|
||||
"""Select the set of tasks required to publish a candidates build of fennec.
|
||||
Previous build deps will be optimized out via action task."""
|
||||
filtered_for_candidates = target_tasks_candidates_fennec(full_task_graph, parameters)
|
||||
@ -435,7 +435,7 @@ def target_tasks_publish_fennec(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('pine_tasks')
|
||||
def target_tasks_pine(full_task_graph, parameters):
|
||||
def target_tasks_pine(full_task_graph, parameters, graph_config):
|
||||
"""Bug 1339179 - no mobile automation needed on pine"""
|
||||
def filter(task):
|
||||
platform = task.attributes.get('build_platform')
|
||||
@ -452,7 +452,7 @@ def target_tasks_pine(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('nightly_macosx')
|
||||
def target_tasks_nightly_macosx(full_task_graph, parameters):
|
||||
def target_tasks_nightly_macosx(full_task_graph, parameters, graph_config):
|
||||
"""Select the set of tasks required for a nightly build of macosx. The
|
||||
nightly build process involves a pipeline of builds, signing,
|
||||
and, eventually, uploading the tasks to balrog."""
|
||||
@ -464,7 +464,7 @@ def target_tasks_nightly_macosx(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('nightly_win32')
|
||||
def target_tasks_nightly_win32(full_task_graph, parameters):
|
||||
def target_tasks_nightly_win32(full_task_graph, parameters, graph_config):
|
||||
"""Select the set of tasks required for a nightly build of win32 and win64.
|
||||
The nightly build process involves a pipeline of builds, signing,
|
||||
and, eventually, uploading the tasks to balrog."""
|
||||
@ -478,7 +478,7 @@ def target_tasks_nightly_win32(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('nightly_win64')
|
||||
def target_tasks_nightly_win64(full_task_graph, parameters):
|
||||
def target_tasks_nightly_win64(full_task_graph, parameters, graph_config):
|
||||
"""Select the set of tasks required for a nightly build of win32 and win64.
|
||||
The nightly build process involves a pipeline of builds, signing,
|
||||
and, eventually, uploading the tasks to balrog."""
|
||||
@ -492,7 +492,7 @@ def target_tasks_nightly_win64(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('nightly_desktop')
|
||||
def target_tasks_nightly_desktop(full_task_graph, parameters):
|
||||
def target_tasks_nightly_desktop(full_task_graph, parameters, graph_config):
|
||||
"""Select the set of tasks required for a nightly build of linux, mac,
|
||||
windows."""
|
||||
# Avoid duplicate tasks.
|
||||
@ -506,7 +506,7 @@ def target_tasks_nightly_desktop(full_task_graph, parameters):
|
||||
|
||||
# Opt DMD builds should only run nightly
|
||||
@_target_task('nightly_dmd')
|
||||
def target_tasks_dmd(full_task_graph, parameters):
|
||||
def target_tasks_dmd(full_task_graph, parameters, graph_config):
|
||||
"""Target DMD that run nightly on the m-c branch."""
|
||||
def filter(task):
|
||||
platform = task.attributes.get('build_platform', '')
|
||||
@ -515,7 +515,7 @@ def target_tasks_dmd(full_task_graph, parameters):
|
||||
|
||||
|
||||
@_target_task('file_update')
|
||||
def target_tasks_file_update(full_task_graph, parameters):
|
||||
def target_tasks_file_update(full_task_graph, parameters, graph_config):
|
||||
"""Select the set of tasks required to perform nightly in-tree file updates
|
||||
"""
|
||||
def filter(task):
|
||||
|
@ -48,14 +48,17 @@ class FakeKind(Kind):
|
||||
|
||||
class WithFakeKind(TaskGraphGenerator):
|
||||
|
||||
def _load_kinds(self):
|
||||
def _load_kinds(self, graph_config):
|
||||
for kind_name, cfg in self.parameters['_kinds']:
|
||||
config = {
|
||||
'transforms': [],
|
||||
}
|
||||
if cfg:
|
||||
config.update(cfg)
|
||||
yield FakeKind(kind_name, '/fake', config)
|
||||
yield FakeKind(kind_name, '/fake', config, graph_config)
|
||||
|
||||
def _load_graph_config(self):
|
||||
return {}
|
||||
|
||||
|
||||
class FakeParameters(dict):
|
||||
@ -88,7 +91,7 @@ class TestGenerator(unittest.TestCase):
|
||||
FakeKind.loaded_kinds = []
|
||||
self.target_tasks = target_tasks or []
|
||||
|
||||
def target_tasks_method(full_task_graph, parameters):
|
||||
def target_tasks_method(full_task_graph, parameters, graph_config):
|
||||
return self.target_tasks
|
||||
|
||||
def make_fake_strategies():
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user