Commit e28b2f91 authored by Carsten Schoenert's avatar Carsten Schoenert
Browse files

New upstream version 91.0~b5

parent 90a153bf
......@@ -102,7 +102,7 @@ async function init(aEvent) {
}
}
if (AppConstants.MOZ_APP_VERSION_DISPLAY.endsWith("esr")) {
if (AppConstants.IS_ESR) {
document.getElementById("release").hidden = false;
}
......
......@@ -919,7 +919,7 @@ var BookmarksEventHandler = {
var cropped = false;
var targetURI;
if (aTooltip.triggerNode == "treechildren") {
if (aTooltip.triggerNode.localName == "treechildren") {
var tree = aTooltip.triggerNode.parentNode;
var cell = tree.getCellAt(aEvent.clientX, aEvent.clientY);
if (cell.row == -1) {
......
......@@ -1415,7 +1415,7 @@ toolbarpaletteitem:not([place="palette"]) > #stop-reload-button {
}
.printPreviewBrowser {
display: none;
visibility: collapse;
opacity: 1;
transition: opacity 60ms;
}
......@@ -1423,7 +1423,7 @@ toolbarpaletteitem:not([place="palette"]) > #stop-reload-button {
.previewStack[previewtype="source"] > .printPreviewBrowser[previewtype="source"],
.previewStack[previewtype="selection"] > .printPreviewBrowser[previewtype="selection"],
.previewStack[previewtype="simplified"] > .printPreviewBrowser[previewtype="simplified"] {
display: block;
visibility: visible;
}
.previewStack[rendering=true] > .printPreviewBrowser {
......
......@@ -80,7 +80,7 @@ const PREFS_AFTER_SECTIONS = ({
? "home-prefs-snippets-description-new"
: "home-prefs-snippets-description",
},
icon: "info",
icon: "chrome://global/skin/icons/info.svg",
eventSource: "SNIPPETS",
},
];
......
......@@ -145,7 +145,7 @@ const PREFS_CONFIG = new Map([
api_key_pref: "extensions.pocket.oAuthConsumerKey",
// Use the opposite value as what default value the feed would have used
hidden: !PREFS_CONFIG.get("feeds.system.topstories").getValue(args),
provider_icon: "pocket",
provider_icon: "chrome://global/skin/icons/pocket.svg",
provider_name: "Pocket",
read_more_endpoint:
"https://getpocket.com/explore/trending?src=fx_new_tab",
......
......@@ -1839,8 +1839,7 @@ getHardcodedLayout = isBasicLayout => ({
id: "newtab-pocket-learn-more",
},
link_url: "https://getpocket.com/firefox/new_tab_learn_more",
icon:
"chrome://activity-stream/content/data/content/assets/glyph-pocket-16.svg",
icon: "chrome://global/skin/icons/pocket.svg",
},
properties: {},
styles: {
......
......@@ -137,7 +137,7 @@ const BUILT_IN_SECTIONS = ({
},
shouldHidePref: false,
eventSource: "HIGHLIGHTS",
icon: "highlights",
icon: "chrome://global/skin/icons/highlights.svg",
title: {
id:
newNewtabExperienceEnabled || customizationMenuEnabled
......@@ -149,7 +149,7 @@ const BUILT_IN_SECTIONS = ({
maxRows: 4,
emptyState: {
message: { id: "newtab-empty-section-highlights" },
icon: "highlights",
icon: "chrome://global/skin/icons/highlights.svg",
},
shouldSendImpressionStats: false,
}),
......
......@@ -265,8 +265,7 @@ const MESSAGES = () => [
scene1_button_label: "Continue",
scene1_button_color: "#712b00",
scene1_button_background_color: "#ff9400",
scene1_section_title_icon:
"chrome://activity-stream/content/data/content/assets/glyph-pocket-16.svg",
scene1_section_title_icon: "chrome://global/skin/icons/pocket.svg",
scene1_section_title_text:
"All the Firefox news that's fit to Firefox print!",
scene2_title: "Let's do this!",
......@@ -329,8 +328,7 @@ const MESSAGES = () => [
scene1_title_icon: TEST_ICON_16,
scene1_title_icon_dark_theme: TEST_ICON_BW,
scene1_section_title_icon:
"chrome://activity-stream/content/data/content/assets/glyph-pocket-16.svg",
scene1_section_title_icon: "chrome://global/skin/icons/pocket.svg",
scene1_section_title_text: "Firefox Accounts: Receivable benefits",
scene2_text:
......@@ -475,8 +473,7 @@ const MESSAGES = () => [
scene1_title: "Full-featured. Customizable. Lightning fast",
scene1_title_icon: TEST_ICON_16,
scene1_title_icon_dark_theme: TEST_ICON_BW,
scene1_section_title_icon:
"chrome://activity-stream/content/data/content/assets/glyph-pocket-16.svg",
scene1_section_title_icon: "chrome://global/skin/icons/pocket.svg",
scene1_section_title_text: "Send Firefox to your mobile device!",
scene2_button_label: "Send",
......@@ -578,8 +575,7 @@ const MESSAGES = () => [
syncLink: { url: "https://www.mozilla.org/en-US/firefox/accounts" },
},
block_button_text: "Block",
section_title_icon:
"chrome://activity-stream/content/data/content/assets/glyph-pocket-16.svg",
section_title_icon: "chrome://global/skin/icons/pocket.svg",
section_title_text: "Messages from Mozilla",
},
},
......@@ -593,8 +589,7 @@ const MESSAGES = () => [
text:
"Sync it, link it, take it with you. All this and more with a Firefox Account.",
block_button_text: "Block",
section_title_icon:
"chrome://activity-stream/content/data/content/assets/glyph-pocket-16.svg",
section_title_icon: "chrome://global/skin/icons/pocket.svg",
section_title_text: "Messages from Mozilla (click for info)",
section_title_url: "https://www.mozilla.org/about",
},
......
......@@ -337,6 +337,12 @@ this.TopSitesFeed = class TopSitesFeed {
sponsored_impression_url: site.impression_url,
sponsored_tile_id: site.id,
};
if (site.image_url && site.image_size >= MIN_FAVICON_SIZE) {
// Only use the image from Contile if it's hi-res, otherwise, fallback
// to the built-in favicons.
link.favicon = site.image_url;
link.faviconSize = site.image_size;
}
DEFAULT_TOP_SITES.push(link);
}
hasContileTiles = sponsoredPosition > 1;
......
......@@ -20,7 +20,8 @@
"subtitle": "",
"link_text": "How it works",
"link_url": "https://getpocket.com/firefox/new_tab_learn_more",
"icon": "chrome://activity-stream/content/data/content/assets/glyph-pocket-16.svg"
"icon": "chrome://global/skin/icons/pocket.svg"
},
"properties": null,
"styles": {
......
......@@ -24,7 +24,7 @@ describe("<isAllowedCSS>", () => {
assert.isTrue(
isAllowedCSS(
"background-image",
`url("chrome://activity-stream/content/data/content/assets/glyph-info-16.svg")`
`url("chrome://global/skin/icons/info.svg")`
)
);
});
......
......@@ -234,14 +234,14 @@ describe("AboutPreferences Feed", () => {
);
});
it("should use desired glyph icon", () => {
prefStructure = [{ icon: "highlights", pref: { feed: "feed" } }];
prefStructure = [{ icon: "mail", pref: { feed: "feed" } }];
testRender();
assert.calledWith(
node.setAttribute,
"src",
"chrome://activity-stream/content/data/content/assets/glyph-highlights-16.svg"
"chrome://activity-stream/content/data/content/assets/glyph-mail-16.svg"
);
});
it("should use specified chrome icon", () => {
......
......@@ -2190,7 +2190,7 @@ describe("Top Sites Feed", () => {
{ url: "https://bar.com", title: "bar", sponsored_position: 2 },
{ url: "https://test.com", title: "test", sponsored_position: 3 },
]);
global.Services.prefs.getStringPref
global.Services.prefs.getBoolPref
.withArgs(CONTILE_ENABLED_PREF)
.returns(true);
......@@ -2212,5 +2212,45 @@ describe("Top Sites Feed", () => {
assert.equal(DEFAULT_TOP_SITES.length, 1);
assert.equal(DEFAULT_TOP_SITES[0].label, "foo");
});
it("should take the image from Contile if it's a hi-res one", async () => {
global.Services.prefs.getBoolPref
.withArgs(CONTILE_ENABLED_PREF)
.returns(true);
sandbox.stub(feed, "_getRemoteConfig").resolves([]);
sandbox.stub(feed._contile, "sites").get(() => [
{
url: "https://test.com",
image_url: "https://images.test.com/test-com.png",
image_size: 192,
click_url: "https://www.test-click.com",
impression_url: "https://www.test-impression.com",
name: "test",
},
{
url: "https://test1.com",
image_url: "https://images.test1.com/test1-com.png",
image_size: 32,
click_url: "https://www.test1-click.com",
impression_url: "https://www.test1-impression.com",
name: "test1",
},
]);
await feed._readDefaults();
const [site1, site2] = DEFAULT_TOP_SITES;
assert.propertyVal(
site1,
"favicon",
"https://images.test.com/test-com.png"
);
assert.propertyVal(site1, "faviconSize", 192);
// Should not be taken as it's not hi-res
assert.isUndefined(site2.favicon);
assert.isUndefined(site2.faviconSize);
});
});
});
......@@ -20,7 +20,7 @@
"subtitle": "",
"link_text": "How it works",
"link_url": "https://getpocket.com/firefox/new_tab_learn_more",
"icon": "chrome://activity-stream/content/data/content/assets/glyph-pocket-16.svg"
"icon": "chrome://global/skin/icons/pocket.svg"
},
"properties": null,
"styles": {
......
......@@ -250,9 +250,9 @@ var PKT_PANEL_OVERLAY = function(options) {
Date.now() - this.changestamp > 250
) {
e.preventDefault();
$(".pkt_ext_containersaved")
.find(".pkt_ext_btn")
.trigger("click");
document
.querySelector(`.pkt_ext_containersaved .pkt_ext_btn`)
.click();
}
}
})
......
......@@ -88,8 +88,9 @@ this.startBackground = (function() {
.then(() => {
browser.tabs
.query({ currentWindow: true, active: true })
.then(tabs => {
.then(async tabs => {
const activeTab = tabs[0];
zoomFactor = await browser.tabs.getZoom(activeTab.id);
main.onCommand(activeTab);
})
.catch(error => {
......
This diff is collapsed.
# Define indicating that this build is prior to one of the early betas. To be
# unset mid-way through the beta cycle.
EARLY_BETA_OR_EARLIER=1
EARLY_BETA_OR_EARLIER=
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment