Merge remote-tracking branch 'origin/master' into custom

This commit is contained in:
Roy Tam 2019-05-31 07:28:33 +08:00
commit 6431b85501
96 changed files with 16647 additions and 13653 deletions

View file

@ -1040,12 +1040,6 @@ pref("browser.newtabpage.introShown", false);
// Toggles the content of 'about:newtab'. Shows the grid when enabled.
pref("browser.newtabpage.enabled", true);
// Toggles the enhanced content of 'about:newtab'. Shows sponsored tiles.
sticky_pref("browser.newtabpage.enhanced", false);
// enables Activity Stream inspired layout
pref("browser.newtabpage.compact", false);
// Disables capturing of page thumbnails
pref("browser.pagethumbnails.capturing_disabled", false);

View file

@ -1,50 +0,0 @@
{
"directory": [
{
"bgColor": "#ffffff",
"directoryId": 10000000,
"imageURI": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAIX0lEQVR4nO1afXDbZh1+sxbWsbGvsrLbuBt36766sR3sOEgiuU4kx2vTpFGKm0SKsyyOlI8laUZTulLojQEHx4CyAaNnt72yrivklo1YSpxcW7YVbKXHgCvduCvroDt6o6OtLSWN1MRWX/5I4imyJMu2bPNHnrvfSZbf6P09z+/jfV+3ACxhCUsoAEouNWGlMRLri5GuZwUSe1Ug8bcFEjsjUPgHAoX/UyCxkyKJjQoU/iOhCd8WJSvW/8vpXFFsx7PGeaJsVaytul+g8KMiic+IFA7NTNB/rggk/jeRcu26RGFris3JEqIUtkFsdo2KFK6kI52pCSR2UmirZgY9YFmxeaYg1uyqFSj8lMXI5mofRb3rOwEAJcXmDS72ex8QvO43skjv3MeT2DtRX2150cgLzVUDIonF8xBh64KQ2FWRwncPejyFK4tYq/Nmoa1mPE/pnZ1ILe4TFxpdd+SdvOhxrhabXaeLTVjfsHfzSj5K4V8QKfyjnGs3P2UiCt/v/1LeyAsNlXebkbeRSOZ/Q+JCrBH/Yt7IX+qlbhS96dM+Y+dJLC6S+BWRwmazFizf5AEAQPRtHLEhukqMwo8KTfg2oamy8t+e0uvUczwDwDWxhopHBBLvElrc+wUSm/r/IN9a3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lj6Bssw/EI4+i3DM+0iQPomy9JiD69hdztI7SoPtTWWvddry7w5LWIIx/gdCuvcjoZqlLQAAAABJRU5ErkJggg==",
"type": "affiliate",
"title": "Google",
"url": "https://www.google.com/"
},
{
"bgColor": "#E62117",
"directoryId": 10000001,
"imageURI": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAACd0lEQVR4nO3av0tVYRzH8WOIBEVDUUIGCa32FwQ5OrS42NKeRUOTdGmoqUGiLVBqa5UG+7WUREGiEqhTDkVJEA2iYZBkxKvhHumo96o3uM9z0ucNZ7zn834+XO59znm+WZZIJBKJRCKRSGwCx3AWfbiIaxjEPYzgOd7gLWbwIb8WsFjjWrU9q3U+u1C4/0yeOZ47jOROg6jkrn25e3uji27NbzC9A9n/hWnVNbVut/hOTMZ1bSqT6Ky3+A58jOsXhE/o2Lj4FryILBaSF2gpFtAT2ygCPcUCHse2icDTtcW3YSW2TQRW0JahK7ZJRLoy9Ma2iEhvhoHYFhEZyDAU2yIiwxkeBgj6FSDjXxjN8CpA0A1cxucAWY0wkeFdgKBK/pe7H1fxNUDmTpjLMB8gqLJh631A9dF6IUD2Vsxn+BYgaF0BhSIO4WYgh1osZVgOEFSzgEIRh3EL3wO4FFnOAgVtWUChiKO4gx+BvJSqgEIRx3EXP5stVsoCCkWcxH1N3EeUuoBCEafwshlipS8AJzTxW1DaAnAEtzX5B7F0BeAgrmMphFhpClB9M3UFXwI5oQQFYB8u4H0gl3VE3QninOoxVyyWozwL4AxeB8jdjqWgT4M4jUcB8nbKfKj3AUN4gN8BshphLtQbobIyEeqdYFkZzTAc2yIiw+lcQDoZSmeDe/t0ON+gPIltE4Fnxa3pnp8QacFYbKOAjCnOCOUldKhOUO12Nk+JFUroxFRkwWYypd6cYKGEVvTbfZOil2w3KVqjjHZ047xqKRWbZ4XHVed2Z/2d5a0167vYgHC9z6/df9bWs8L9uXO3RmeFE4lEIpFIJPYKfwAcall+TY3q/wAAAABJRU5ErkJggg==",
"type": "affiliate",
"title": "YouTube",
"url": "https://www.youtube.com/"
},
{
"directoryId": 10000002,
"imageURI": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAACT0lEQVR4nO3bzWsTQRgG8PlPHMVLqRVMoQiFehJyUBAFtRCFHspExaaSoFg8CMGPSg+R3kQhh3osIbOlMVrbGKtrsbYESTbB0gqNVGu1WCkWutnXg+ihQjqxi7Oz8w481533+V32iyGEEEIZ76Rho0SZ4ewOG+D3UMatXSx9nPwqb5ySPZC0dPMzhDJelD6IrDCjQijjtvRBJIWGeY3IHkJ2EED2ALKDALIHkB2lAJoujkIwnoNQwoQL96aha3AKQgkTTtyZhKM383D4+gQEoll/AQRiWbg1XILZ+VWwaw6IrE3bgZbejNoAe8+PwEC6DOsbm0Klt679lxQGCESzMD335Z+KKw+wrzcDpcVvOyqvNMCwubjj8soCnBx44Up5ZQGeFZf1BWi7/BhqjthtzpcAseRsQwVrjgNzS9/hZWUFJq3Pf6U5MqoWQHJ8Qbh8aqoKB688cWVfzwBMvP0kVN6srMCec+7t6xmAmfmvQgCRBzOu7usZgHJ1TQjgyI283gCHrj3VG6C9bwwBEAABEEAtgAPRR9A3VKibpdUfQgD9KWvba529+8pbAMF4TqicW+th/r3eAP0pS2+Anvtv9AY4dvu53gCtMfGfI74DWN+wG5rNdwDl6preAGOFj3oDJMcXvAfQHMlAKGHWTeWD2KPw1aFC3et0NPi9wDPvAq/fif0LDMZzru6LALKLIwACIAACIAACIAACIAACIAACIAACIAACIMD/BvDKwUkZAJRx2zNHZyUBFAntTp+WXV4iQCf5c3yecUsXAMq49bv8Txsl6ZCTabOAAAAAAElFTkSuQmCC",
"title": "Facebook",
"type": "affiliate",
"url": "https://www.facebook.com/"
},
{
"bgColor": "#ffffff",
"directoryId": 10000003,
"imageURI": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAA/CAYAAABQHc7KAAAEyUlEQVRoge2abYhVRRjHf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iCnTj2lG5yVyqvX+QaOSYOsNk7y8WiPo+c1Ah2tFPesbJTmFfEfX7qU2BZVmRoSPnkMU+D1EUW5L0WErMHKq9P0o149NeqZ+w7wq7qO77f02p11Qmo6/laWnoVlFvnbh+uaJTAW616Dwo6rjmIw3lLnTjminZ+38DM8Q92yv1HfUnOh3AL/H9I7hnpA1lKrXnb0nRkqSXxf0nFC3bK7XMqCdT6o2NeIiirEE3Lvfks6kesI6hf1m2nTt8TW2uIeeLhub8vsxAT5IOUB2+8qTm2RStlYqOnOV7xLXBRj5EUWxJ0hKic/2k98dJ367azh32Es0Tz4hrTcn5fZE9I8s+ajc6m20CgrUWrdVEK0yFJub8RRhEN56UMjk+TVO7xtuK6yFMS1hIuuk82+SETSk6h3A/hmsJ7egfPypEh555ej/hHOzZYktyfl9keiqLzzc+LUlqWc7vSyfRJ3Rpegw4zUOrj/ofoKU5vy/91Jp+vIDWLkPL/J9h/0mmAT9TXa58vvIkzKe6ydpQ3FogEAgEAoFAIBCI+Rf5q90lTPZHIwAAAABJRU5ErkJggg==",
"title": "Wikipedia",
"type": "affiliate",
"url": "https://www.wikipedia.org/"
},
{
"bgColor": "#400090",
"directoryId": 10000004,
"imageURI": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAD3ElEQVR4nO3bS4xecxjH8WmLBVVEx63JBIkEISkhJqURpAsZQioWqpeNSxraYlKpSwiDIRY0aSakqgS9qHRBIhKxYdFFFxWXIGkilYZEUCKj4zLzsfi/LN55zpiZc/lr+/6Ss3nfc57ze77n9r88/y7swxaswgLM7jpMhTlYiNWtnPd1Ga9RfIVtuB+L0J3b/FSFeejDQ9iBvRhrTzYCUKTv8RFewlrcgAtxQsYk5+Ii3IQHsBm78ONkk5oKgIn0Mz7BO3gBA7gHS3EtLsXZre1UnITj2pI5vvV7D85BL67DCvRjEJvwHj7HcBXGqwJwyKoDILeB3OoAyG0gt8oAGMYj0qdnJ17DY3i2vK1CPYmn8Cq2YwgP4rfpBix7BwwE3+aZ2F0ybqQPMSM439NlgpYFMILzAlO9glZXCf2F+cF5LsafZQJX8Q4oujKbK4j9j4aC+EdhT9nAVb0Ebw8MduNABbF/wMlB/LUVxK4MwE84JTC5uoLYK4O48/BrBbEr/Qy+XnCbfloi5h7MCuJurcSxagGMYWFg9qr/SbxQVTeEiq7Ym9OI9UYQ52ipJ1iZ6mgJ3h0Y7zG17usvOC2I01+12ToAHBCMIGHdFGKsCo4/QwJTqerqC2wMEjgGX0zi2KLH6JU6jNYFYBSXBElc/R/HjaE3OO4y1bYs/1WdvcFd4hbilgmOie6cGa1Ytaju7vDSIKHTxc9yUYtvWZ0G6wawH8cGSa0J9r0t2G92K0ZtamJA5PEgsfaOTNHjMlC3uSYADKMnSG6B9GIr6uqehYN1m2tqSGxre4KtJDdhfcF/O5ow1hSAMVweJNmNOcHvlbb3J1KTg6K7MTO62m3Jz1LBQMdk1fSo8IpJALizSUNNA/jWBNPvOFGahG1MOeYFnpgAwHNNm8kB4CDODJI/F380bSbXzNAzAYD1OYzkAjAYABjKYaQDIMdJxQDqnFMsVC4A6wIAgzmMdADkOKkYwKM5jOQCcFcAYCqjxpUpF4Bovu+IB3BfDiO5AIzrFWJlDiO5ACzpABgP4I4cRnIBWBwAWJLDSC4AfR0A4wHcksNILgCLAgB9OYzkAnDFkQ5gDZbj3ta2XCp5bVydYuncBnKrAyC3gdzqAMhtILfqBDCCb6SZ3velatGXsUFa5NC+vdjatrf2/QAfSyUyv9dlsgyAEXyGt/G8VBl+PS7A3PaGTllJCy7n40Zp8GQD3sWXSgCaDIBRqcBxGx7GYmll57hixlySaojPx83SuqW3pLXC0wKwX7oF+3GloILjUJE03X6NtAh8J76LAOzFRtwqKGY63CStX14mLen5+m9Vgqdbrd+9cgAAAABJRU5ErkJggg==",
"title": "Yahoo!",
"type": "affiliate",
"url": "https://www.yahoo.com/"
},
{
"directoryId": 10000005,
"imageURI": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg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UPVWOeSpK50AAAAABJRU5ErkJggg==",
"title": "Amazon",
"type": "affiliate",
"url": "https://www.amazon.com/"
}
]
}

View file

@ -9,7 +9,6 @@ var gCustomize = {
"blank",
"button",
"classic",
"enhanced",
"panel",
"overlay",
"learn"
@ -83,13 +82,10 @@ var gCustomize = {
}
switch (event.currentTarget.id) {
case "newtab-customize-blank":
sendAsyncMessage("NewTab:Customize", {enabled: false, enhanced: false});
sendAsyncMessage("NewTab:Customize", {enabled: false});
break;
case "newtab-customize-classic":
sendAsyncMessage("NewTab:Customize", {enabled: true, enhanced: false});
break;
case "newtab-customize-enhanced":
sendAsyncMessage("NewTab:Customize", {enabled: true, enhanced: !gAllPages.enhanced});
sendAsyncMessage("NewTab:Customize", {enabled: true});
break;
case "newtab-customize-learn":
this.showLearn();

View file

@ -9,7 +9,6 @@
*/
const GRID_BOTTOM_EXTRA = 7; // title's line-height extends 7px past the margin
const GRID_WIDTH_EXTRA = 1; // provide 1px buffer to allow for rounding error
const SPONSORED_TAG_BUFFER = 2; // 2px buffer to clip off top of sponsored tag
/**
* This singleton represents the grid that contains all sites.
@ -142,13 +141,9 @@ var gGrid = {
// Create sites.
let numLinks = Math.min(links.length, cells.length);
let hasHistoryTiles = false;
for (let i = 0; i < numLinks; i++) {
if (links[i]) {
this.createSite(links[i], cells[i]);
if (links[i].type == "history") {
hasHistoryTiles = true;
}
}
}
@ -157,9 +152,6 @@ var gGrid = {
this._gridDefaultContent.nextSibling.remove();
}
this._node.appendChild(fragment);
document.getElementById("topsites-heading").textContent =
hasHistoryTiles ? "Your Top Sites" : "Top Sites";
},
/**
@ -182,18 +174,15 @@ var gGrid = {
// Create the site's inner HTML code.
site.innerHTML =
'<span class="newtab-sponsored">' + newTabString("sponsored.button") + '</span>' +
'<a class="newtab-link">' +
' <span class="newtab-thumbnail placeholder"/>' +
' <span class="newtab-thumbnail thumbnail"/>' +
' <span class="newtab-thumbnail enhanced-content"/>' +
' <span class="newtab-title"/>' +
'</a>' +
'<input type="button" title="' + newTabString("pin") + '"' +
' class="newtab-control newtab-control-pin"/>' +
'<input type="button" title="' + newTabString("block") + '"' +
' class="newtab-control newtab-control-block"/>' +
'<span class="newtab-suggested"/>';
' class="newtab-control newtab-control-block"/>';
this._siteFragment = document.createDocumentFragment();
this._siteFragment.appendChild(site);
@ -274,6 +263,6 @@ var gGrid = {
this._node.style.maxWidth = gGridPrefs.gridColumns * this._cellWidth +
GRID_WIDTH_EXTRA + "px";
this._node.style.height = this._computeHeight() + "px";
this._node.style.maxHeight = this._computeHeight(gridRows) - SPONSORED_TAG_BUFFER + "px";
this._node.style.maxHeight = this._computeHeight(gridRows) + "px";
}
};

View file

@ -122,10 +122,6 @@ input[type=button] {
pointer-events: none;
}
body:not(.compact) #topsites-heading {
display: none;
}
/*
* If you change the sizes here, make sure you
* change the preferences:
@ -140,12 +136,6 @@ body:not(.compact) #topsites-heading {
width: 290px;
}
body.compact .newtab-cell {
width: 110px;
height: 110px;
margin: 12px;
}
/* SITES */
.newtab-site {
position: relative;
@ -175,16 +165,13 @@ body.compact .newtab-cell {
}
/* TITLES */
.newtab-sponsored,
.newtab-title,
.newtab-suggested {
.newtab-title {
overflow: hidden;
position: absolute;
right: 0;
text-align: center;
}
.newtab-sponsored,
.newtab-title {
bottom: 0;
white-space: nowrap;
@ -192,103 +179,11 @@ body.compact .newtab-cell {
vertical-align: middle;
}
.newtab-suggested {
border: 1px solid transparent;
border-radius: 2px;
font-size: 12px;
height: 17px;
line-height: 17px;
margin-bottom: -1px;
padding: 2px 8px;
display: none;
margin-left: auto;
margin-right: auto;
left: 0;
top: 215px;
-moz-user-select: none;
}
.newtab-suggested-bounds {
max-height: 34px; /* 34 / 17 = 2 lines maximum */
}
.newtab-title {
left: 0;
padding: 0 4px;
}
.newtab-sponsored {
background-color: #FFFFFF;
border: 1px solid #E2E2E2;
border-radius: 3px;
color: #4A4A4A;
cursor: pointer;
display: none;
font-family: Arial;
font-size: 9px;
height: 17px;
left: 0;
line-height: 6px;
padding: 4px;
right: auto;
top: -15px;
}
.newtab-site[suggested=true] > .newtab-sponsored {
background-color: #E2E2E2;
border: none;
}
.newtab-site > .newtab-sponsored:-moz-any(:hover, [active]) {
background-color: #4A90E2;
border: 0;
color: white;
}
.newtab-site > .newtab-sponsored[active] {
background-color: #000000;
}
.newtab-sponsored:dir(rtl) {
right: 0;
left: auto;
}
.newtab-site:-moz-any([type=enhanced], [type=sponsored], [suggested]) .newtab-sponsored {
display: block;
}
.newtab-site[suggested] .newtab-suggested {
display: table;
}
.sponsored-explain,
.sponsored-explain a,
.suggested-explain,
.suggested-explain a {
color: white;
}
.sponsored-explain,
.suggested-explain {
background-color: rgba(51, 51, 51, 0.95);
bottom: 30px;
line-height: 20px;
padding: 15px 10px;
position: absolute;
text-align: start;
}
.sponsored-explain input,
.suggested-explain input {
background-size: 18px;
height: 18px;
opacity: 1;
pointer-events: none;
position: static;
width: 18px;
}
/* CONTROLS */
.newtab-control {
position: absolute;
@ -333,11 +228,6 @@ body.compact .newtab-cell {
margin: 40px 0 15px;
}
body.compact #newtab-search-container {
margin-top: 0;
margin-bottom: 80px;
}
#newtab-search-container[page-disabled] {
opacity: 0;
pointer-events: none;

File diff suppressed because it is too large Load diff

View file

@ -11,7 +11,6 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/PageThumbs.jsm");
Cu.import("resource://gre/modules/BackgroundPageThumbs.jsm");
Cu.import("resource:///modules/DirectoryLinksProvider.jsm");
Cu.import("resource://gre/modules/NewTabUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Rect",

View file

@ -73,7 +73,6 @@
<div id="newtab-horizontal-margin">
<div class="newtab-side-margin"/>
<div id="newtab-grid">
<h1 id="topsites-heading"/>
</div>
<div class="newtab-side-margin"/>
</div>

View file

@ -48,11 +48,6 @@ var gPage = {
let enabled = gAllPages.enabled;
this._updateAttributes(enabled);
// Update thumbnails to the new enhanced setting
if (aData == "browser.newtabpage.enhanced") {
this.update();
}
// Initialize the whole page if we haven't done that, yet.
if (enabled) {
this._init();
@ -79,10 +74,7 @@ var gPage = {
update(reason = "") {
// Update immediately if we're visible.
if (!document.hidden) {
// Ignore updates where reason=links-changed as those signal that the
// provider's set of links changed. We don't want to update visible pages
// in that case, it is ok to wait until the user opens the next tab.
if (reason != "links-changed" && gGrid.ready) {
if (gGrid.ready) {
gGrid.refresh();
}
@ -119,10 +111,6 @@ var gPage = {
document.getElementById("newtab-search-submit").value =
document.body.getAttribute("dir") == "ltr" ? "\u25B6" : "\u25C0";
if (Services.prefs.getBoolPref("browser.newtabpage.compact")) {
document.body.classList.add("compact");
}
// Initialize search.
gSearch.init();
@ -174,16 +162,6 @@ var gPage = {
*/
_handleUnloadEvent: function Page_handleUnloadEvent() {
gAllPages.unregister(this);
// compute page life-span and send telemetry probe: using milli-seconds will leave
// many low buckets empty. Instead we use half-second precision to make low end
// of histogram linear and not lose the change in user attention
let delta = Math.round((Date.now() - this._firstVisibleTime) / 500);
if (this._suggestedTilePresent) {
Services.telemetry.getHistogramById("NEWTAB_PAGE_LIFE_SPAN_SUGGESTED").add(delta);
}
else {
Services.telemetry.getHistogramById("NEWTAB_PAGE_LIFE_SPAN").add(delta);
}
},
/**
@ -258,40 +236,5 @@ var gPage = {
},
onPageVisibleAndLoaded() {
// Send the index of the last visible tile.
this.reportLastVisibleTileIndex();
// Maybe tell the user they can undo an initial automigration
this.maybeShowAutoMigrationUndoNotification();
},
reportLastVisibleTileIndex() {
let cwu = window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils);
let rect = cwu.getBoundsWithoutFlushing(gGrid.node);
let nodes = cwu.nodesFromRect(rect.left, rect.top, 0, rect.width,
rect.height, 0, true, false);
let i = -1;
let lastIndex = -1;
let sites = gGrid.sites;
for (let node of nodes) {
if (node.classList && node.classList.contains("newtab-cell")) {
if (sites[++i]) {
lastIndex = i;
if (sites[i].link.targetedSite) {
// record that suggested tile is shown to use suggested-tiles-histogram
this._suggestedTilePresent = true;
}
}
}
}
DirectoryLinksProvider.reportSitesAction(sites, "view", lastIndex);
},
maybeShowAutoMigrationUndoNotification() {
sendAsyncMessage("NewTab:MaybeShowAutoMigrationUndoNotification");
},
}
};

View file

@ -62,7 +62,7 @@ Site.prototype = {
this._updateAttributes(true);
let changed = gPinnedLinks.pin(this._link, aIndex);
if (changed) {
// render site again to remove suggested/sponsored tags
// render site again
this._render();
}
return changed;
@ -136,15 +136,6 @@ Site.prototype = {
return str;
},
_getSuggestedTileExplanation: function() {
let targetedName = `<strong> ${this.link.targetedName} </strong>`;
let targetedSite = `<strong> ${this.link.targetedSite} </strong>`;
if (this.link.explanation) {
return this._newTabString(this.link.explanation, [targetedName, targetedSite]);
}
return newTabString("suggested.button", [targetedName]);
},
/**
* Checks for and modifies link at campaign end time
*/
@ -155,11 +146,8 @@ Site.prototype = {
this.link.url = Services.io.newURI(this.url, null, null).resolve("/");
// clear supplied images - this triggers thumbnail download for new url
delete this.link.imageURI;
delete this.link.enhancedImageURI;
// remove endTime to avoid further time checks
delete this.link.endTime;
// clear enhanced-content image that may still exist in preloaded page
this._querySelector(".enhanced-content").style.backgroundImage = "";
gPinnedLinks.replace(oldUrl, this.link);
}
},
@ -171,11 +159,8 @@ Site.prototype = {
// first check for end time, as it may modify the link
this._checkLinkEndTime();
// setup display variables
let enhanced = gAllPages.enhanced && DirectoryLinksProvider.getEnhancedLink(this.link);
let url = this.url;
let title = enhanced && enhanced.title ? enhanced.title :
this.link.type == "history" ? this.link.baseDomain :
this.title;
let title = this.link.type == "history" ? this.link.baseDomain : this.title;
let tooltip = (this.title == url ? this.title : this.title + "\n" + url);
let link = this._querySelector(".newtab-link");
@ -189,22 +174,6 @@ Site.prototype = {
titleNode.style.backgroundColor = this.link.titleBgColor;
}
// remove "suggested" attribute to avoid showing "suggested" tag
// after site was pinned or dropped
this.node.removeAttribute("suggested");
if (this.link.targetedSite) {
if (this.node.getAttribute("type") != "sponsored") {
this._querySelector(".newtab-sponsored").textContent =
newTabString("suggested.tag");
}
this.node.setAttribute("suggested", true);
let explanation = this._getSuggestedTileExplanation();
this._querySelector(".newtab-suggested").innerHTML =
`<div class='newtab-suggested-bounds'> ${explanation} </div>`;
}
if (this.isPinned())
this._updateAttributes(true);
// Capture the page if the thumbnail is missing, which will cause page.js
@ -244,8 +213,7 @@ Site.prototype = {
*/
refreshThumbnail: function Site_refreshThumbnail() {
// Only enhance tiles if that feature is turned on
let link = gAllPages.enhanced && DirectoryLinksProvider.getEnhancedLink(this.link) ||
this.link;
let link = this.link;
let thumbnail = this._querySelector(".newtab-thumbnail.thumbnail");
if (link.bgColor) {
@ -267,16 +235,6 @@ Site.prototype = {
placeholder.style.backgroundColor = "hsl(" + hue + ",80%,40%)";
placeholder.textContent = link.baseDomain.substr(0,1).toUpperCase();
}
if (link.enhancedImageURI) {
let enhanced = this._querySelector(".enhanced-content");
enhanced.style.backgroundImage = 'url("' + link.enhancedImageURI + '")';
if (this.link.type != link.type) {
this.node.setAttribute("type", "enhanced");
this.enhancedId = link.directoryId;
}
}
},
_ignoreHoverEvents: function(element) {
@ -296,13 +254,6 @@ Site.prototype = {
this._node.addEventListener("dragstart", this, false);
this._node.addEventListener("dragend", this, false);
this._node.addEventListener("mouseover", this, false);
// Specially treat the sponsored icon & suggested explanation
// text to prevent regular hover effects
let sponsored = this._querySelector(".newtab-sponsored");
let suggested = this._querySelector(".newtab-suggested");
this._ignoreHoverEvents(sponsored);
this._ignoreHoverEvents(suggested);
},
/**
@ -333,31 +284,6 @@ Site.prototype = {
.add(aIndex);
},
_toggleLegalText: function(buttonClass, explanationTextClass) {
let button = this._querySelector(buttonClass);
if (button.hasAttribute("active")) {
let explain = this._querySelector(explanationTextClass);
explain.parentNode.removeChild(explain);
button.removeAttribute("active");
}
else {
let explain = document.createElementNS(HTML_NAMESPACE, "div");
explain.className = explanationTextClass.slice(1); // Slice off the first character, '.'
this.node.appendChild(explain);
let link = '<a href="' + TILES_EXPLAIN_LINK + '">' +
newTabString("learn.link") + "</a>";
let type = (this.node.getAttribute("suggested") && this.node.getAttribute("type") == "affiliate") ?
"suggested" : this.node.getAttribute("type");
let icon = '<input type="button" class="newtab-control newtab-' +
(type == "enhanced" ? "customize" : "control-block") + '"/>';
explain.innerHTML = newTabString(type + (type == "sponsored" ? ".explain2" : ".explain"), [icon, link]);
button.setAttribute("active", "true");
}
},
/**
* Handles site click events.
*/
@ -376,48 +302,25 @@ Site.prototype = {
action = "click";
}
}
// Handle sponsored explanation link click
else if (target.parentElement.classList.contains("sponsored-explain")) {
action = "sponsored_link";
}
else if (target.parentElement.classList.contains("suggested-explain")) {
action = "suggested_link";
}
// Only handle primary clicks for the remaining targets
else if (button == 0) {
aEvent.preventDefault();
if (target.classList.contains("newtab-control-block")) {
// Notify DirectoryLinksProvider of suggested tile block, this may
// affect if and how suggested tiles are recommended and needs to
// be reported before pages are updated inside block() call
if (this.link.targetedSite) {
DirectoryLinksProvider.handleSuggestedTileBlock();
}
this.block();
action = "block";
}
else if (target.classList.contains("sponsored-explain") ||
target.classList.contains("newtab-sponsored")) {
this._toggleLegalText(".newtab-sponsored", ".sponsored-explain");
action = "sponsored";
}
else if (pinned && target.classList.contains("newtab-control-pin")) {
this.unpin();
action = "unpin";
}
else if (!pinned && target.classList.contains("newtab-control-pin")) {
if (this.pin()) {
// suggested link has changed - update rest of the pages
// link has changed - update rest of the pages
gAllPages.update(gPage);
}
action = "pin";
}
}
// Report all link click actions
if (action) {
DirectoryLinksProvider.reportSitesAction(gGrid.sites, action, tileIndex);
}
},
/**

View file

@ -117,8 +117,6 @@ browser.jar:
content/browser/newtab/newTab.xhtml (content/newtab/newTab.xhtml)
* content/browser/newtab/newTab.js (content/newtab/newTab.js)
content/browser/newtab/newTab.css (content/newtab/newTab.css)
content/browser/newtab/newTab.inadjacent.json (content/newtab/newTab.inadjacent.json)
content/browser/newtab/alternativeDefaultSites.json (content/newtab/alternativeDefaultSites.json)
* content/browser/pageinfo/pageInfo.xul (content/pageinfo/pageInfo.xul)
content/browser/pageinfo/pageInfo.js (content/pageinfo/pageInfo.js)
content/browser/pageinfo/pageInfo.css (content/pageinfo/pageInfo.css)

View file

@ -21,7 +21,6 @@ const gPrefsMap = new Map([
["browser.newtabpage.remote.mode", "str"],
["browser.newtabpage.remote.version", "str"],
["browser.newtabpage.enabled", "bool"],
["browser.newtabpage.enhanced", "bool"],
["browser.newtabpage.introShown", "bool"],
["browser.newtabpage.updateIntroShown", "bool"],
["browser.newtabpage.pinned", "str"],
@ -34,7 +33,6 @@ const gPrefsMap = new Map([
// prefs that are important for the newtab page
const gNewtabPagePrefs = new Set([
"browser.newtabpage.enabled",
"browser.newtabpage.enhanced",
"browser.newtabpage.pinned",
"browser.newtabpage.blocked",
"browser.newtabpage.introShown",

View file

@ -32,7 +32,6 @@ XPCOMUtils.defineLazyServiceGetter(this, "AlertsService", "@mozilla.org/alerts-s
["ContentPrefServiceParent", "resource://gre/modules/ContentPrefServiceParent.jsm"],
["ContentSearch", "resource:///modules/ContentSearch.jsm"],
["DateTimePickerHelper", "resource://gre/modules/DateTimePickerHelper.jsm"],
["DirectoryLinksProvider", "resource:///modules/DirectoryLinksProvider.jsm"],
["Feeds", "resource:///modules/Feeds.jsm"],
["FileUtils", "resource://gre/modules/FileUtils.jsm"],
["FormValidationHandler", "resource:///modules/FormValidationHandler.jsm"],
@ -655,9 +654,7 @@ BrowserGlue.prototype = {
webrtcUI.init();
AboutHome.init();
DirectoryLinksProvider.init();
NewTabUtils.init();
NewTabUtils.links.addProvider(DirectoryLinksProvider);
AboutNewTab.init();
NewTabMessages.init();

View file

@ -9,6 +9,7 @@ browser.search.defaultenginename=DuckDuckGo
browser.search.order.1=DuckDuckGo
browser.search.order.2=Yahoo
browser.search.order.3=Bing
browser.search.order.4=Ecosia
# This is the default set of web based feed handlers shown in the reader
# selection UI
@ -20,11 +21,7 @@ browser.contentHandlers.types.0.uri=https://add.my.yahoo.com/rss?url=%s
# profile database. Note that "new" is defined as "has a different URL"; this
# means that it's not possible to update the name of existing handler, so
# don't make any spelling errors here.
gecko.handlerService.defaultHandlersVersion=4
# The default set of protocol handlers for webcal:
gecko.handlerService.schemes.webcal.0.name=30 Boxes
gecko.handlerService.schemes.webcal.0.uriTemplate=https://30boxes.com/external/widget?refer=ff&url=%s
gecko.handlerService.defaultHandlersVersion=5
# The default set of protocol handlers for mailto:
gecko.handlerService.schemes.mailto.0.name=Yahoo! Mail

View file

@ -5,12 +5,9 @@
<!-- These strings are used in the about:newtab page -->
<!ENTITY newtab.pageTitle "New Tab">
<!ENTITY newtab.customize.classic "Show your top sites">
<!ENTITY newtab.customize.cog.enhanced "Include suggested sites">
<!ENTITY newtab.customize.cog.title2 "NEW TAB CONTROLS">
<!ENTITY newtab.customize.cog.learn "Learn about New Tab">
<!ENTITY newtab.customize.title "Customize your New Tab page">
<!ENTITY newtab.customize.suggested "Show suggested and your top sites">
<!ENTITY newtab.customize.topsites "Show your top sites">
<!ENTITY newtab.customize.blank2 "Show blank page">
<!ENTITY newtab.undo.removedLabel "Thumbnail removed.">
<!ENTITY newtab.undo.undoButton "Undo.">

View file

@ -5,42 +5,3 @@
newtab.pin=Pin this site at its current position
newtab.unpin=Unpin this site
newtab.block=Remove this site
# LOCALIZATION NOTE(newtab.sponsored.button): This text appears for sponsored
# and enhanced tiles on the same line as the tile's title, so prefer short
# strings to avoid overlap. This string should be uppercase.
newtab.sponsored.button=SPONSORED
# LOCALIZATION NOTE(newtab.suggested.button): This text appears for sponsored
# and suggested tiles on the same line as the tile's title, so prefer short
# strings to avoid overlap. This string should be uppercase.
newtab.suggested.tag=SUGGESTED
# LOCALIZATION NOTE(newtab.suggested.button): %1$S will be replaced inline by
# one of the user's top 100 sites that triggered this suggested tile.
# This text appears for suggested tiles under the tile's title, so prefer short
# strings to avoid truncating important text.
newtab.suggested.button=Suggested for %1$S visitors
# LOCALIZATION NOTE(newtab.sponsored.explain): %1$S will be replaced inline by
# the (X) block icon. %2$S will be replaced by an active link using string
# newtab.learn.link as text.
newtab.sponsored.explain=This tile is being shown to you on behalf of a Mozilla partner. You can remove it at any time by clicking the %1$S button. %2$S
# LOCALIZATION NOTE(newtab.sponsored.explain2): %1$S will be replaced inline by
# the (X) block icon. %2$S will be replaced by an active link using string
# newtab.learn.link as text.
newtab.sponsored.explain2=This site is suggested to you on behalf of a Mozilla partner. You can remove it at any time by clicking the %1$S button. %2$S
# LOCALIZATION NOTE(newtab.suggested.explain): %1$S will be replaced inline by
# the (X) block icon. %2$S will be replaced by an active link using string
# newtab.learn.link as text.
newtab.suggested.explain=This site is suggested to you by Mozilla. You can remove it at any time by clicking the %1$S button. %2$S
# LOCALIZATION NOTE(newtab.enhanced.explain): %1$S will be replaced inline by
# the gear icon used to customize the new tab window. %2$S will be replaced by
# an active link using string newtab.learn.link as text.
newtab.enhanced.explain=A Mozilla partner has visually enhanced this tile, replacing the screenshot. You can turn off enhanced tiles by clicking the %1$S button for your preferences. %2$S
newtab.intro1.paragraph1=Now when you open New Tab, you’ll also see sites we think might be interesting to you. Some may be suggested by Mozilla or sponsored by one of our partners.
# LOCALIZATION NOTE(newtab.intro1.paragraph2): %1$S will be replaced inline by
# an active link using string newtab.privacy.link as text. %2$S will be replaced
# inline by the gear icon used to customize the new tab window.
newtab.intro1.paragraph2=In order to provide this service, some data is automatically sent back to us in accordance with our %1$S. You can turn this off by unchecking the option under the gear icon (%2$S).
newtab.learn.link=Learn more…
newtab.privacy.link=Privacy Notice
newtab.learn.link2=More about New Tab
newtab.intro.header.update=New Tab got an update!
newtab.intro.gotit=Got it!

View file

@ -33,7 +33,6 @@ var AboutNewTab = {
customize: function(message) {
NewTabUtils.allPages.enabled = message.data.enabled;
NewTabUtils.allPages.enhanced = message.data.enhanced;
},
uninit: function() {

File diff suppressed because it is too large Load diff

View file

@ -16,7 +16,6 @@ EXTRA_JS_MODULES += [
'ContentObservers.jsm',
'ContentSearch.jsm',
'ContentWebRTC.jsm',
'DirectoryLinksProvider.jsm',
'E10SUtils.jsm',
'Feeds.jsm',
'FormSubmitObserver.jsm',

View file

@ -99,19 +99,6 @@
border-radius: 2px;
}
/* GRID */
#topsites-heading {
color: #7A7A7A;
font-size: 1em;
font-weight: normal;
/* Position the heading such that it doesn't affect how many cells we
can fit into the grid. */
position: absolute;
/* The top margin moves the heading away from the grid.
The horizontal margin aligns the heading with the cells. */
margin: -1em 10px 0;
}
/* CELLS */
.newtab-cell {
--cell-corner-radius: 8px;
@ -119,10 +106,6 @@
border-radius: var(--cell-corner-radius);
}
body.compact .newtab-cell {
--cell-corner-radius: 2px;
}
.newtab-cell:empty {
outline: 2px dashed #c1c1c1;
outline-offset: -2px;
@ -172,49 +155,16 @@ body.compact .newtab-cell {
transition: opacity 100ms ease-out;
}
body.compact .newtab-thumbnail {
height: 100%;
border-radius: calc(var(--cell-corner-radius) + 1px);
outline: 1px solid hsla(0,0%,0%,.1);
-moz-outline-radius: var(--cell-corner-radius);
outline-offset: -1px;
}
.newtab-thumbnail.placeholder {
color: white;
font-size: 85px;
line-height: 200%;
}
body.compact .newtab-thumbnail.placeholder {
font-size: 45px;
}
.newtab-cell:not([ignorehover]) .newtab-site:hover .newtab-thumbnail.enhanced-content {
opacity: 0;
}
.newtab-site[type=affiliate] .newtab-thumbnail,
.newtab-site[type=enhanced] .newtab-thumbnail,
.newtab-site[type=organic] .newtab-thumbnail,
.newtab-site[type=sponsored] .newtab-thumbnail {
background-position: center center;
}
body.compact .newtab-site[type=affiliate] .newtab-thumbnail {
background-position: center 30%;
}
.newtab-site[type=affiliate] .newtab-thumbnail,
body:not(.compact) .newtab-site[type=enhanced] .newtab-thumbnail,
body:not(.compact) .newtab-site[type=organic] .newtab-thumbnail,
body:not(.compact) .newtab-site[type=sponsored] .newtab-thumbnail {
background-size: auto;
}
/* TITLES */
.newtab-title {
color: #5c5c5c;
background-color: #F2F2F2;
font-size: 13px;
line-height: 30px;
@ -222,45 +172,13 @@ body:not(.compact) .newtab-site[type=sponsored] .newtab-thumbnail {
border-radius: 0 0 var(--cell-corner-radius) var(--cell-corner-radius);
}
body.compact .newtab-title {
background-color: hsla(0,0%,100%,.85);
font-size: 12px;
line-height: 21px;
border: 1px solid hsla(0,0%,80%,.8);
border-top-color: hsla(0,0%,0%,.1);
background-clip: padding-box;
}
.newtab-title,
.newtab-suggested {
color: #5c5c5c;
}
body.compact .newtab-title,
body.compact .newtab-suggested {
color: black;
}
.newtab-suggested[active] {
background-color: rgba(51, 51, 51, 0.95);
border: 0;
color: white;
}
body:not(.compact) .newtab-site:hover .newtab-title {
.newtab-site:hover .newtab-title {
color: white;
background-color: #333;
border-color: #333;
border-top-color: white;
}
body.compact .newtab-site:hover .newtab-title {
color: white;
background-color: hsla(0,0%,20%,.85);
border-color: hsla(0,0%,0%,.8);
border-top-color: white;
}
.newtab-site[pinned] .newtab-title {
padding-inline-start: 24px;
}
@ -302,20 +220,6 @@ body.compact .newtab-site:hover .newtab-title {
right: 4px;
}
body.compact .newtab-control {
top: -8px;
}
body.compact .newtab-control-pin:dir(ltr),
body.compact .newtab-control-block:dir(rtl) {
left: -8px;
}
body.compact .newtab-control-block:dir(ltr),
body.compact .newtab-control-pin:dir(rtl) {
right: -8px;
}
.newtab-control-pin,
.newtab-site[pinned] .newtab-control-pin:hover:active {
background-image: -moz-image-rect(url(chrome://browser/skin/newtab/controls.svg), 0, 96, 32, 64);

View file

@ -1077,9 +1077,6 @@ pref("browser.newtab.preload", false);
// Toggles the content of 'about:newtab'. Shows the grid when enabled.
pref("browser.newtabpage.enabled", true);
// XXX: Remove this when "enhanced" tiles are dead
pref("browser.newtabpage.enhanced", false);
// Disables capturing of page thumbnails
pref("browser.pagethumbnails.capturing_disabled", false);

View file

@ -568,7 +568,7 @@ function checkForUpdates()
// If there's an update ready to be applied, show the "Update Downloaded"
// UI instead and let the user know they have to restart the application for
// the changes to be applied.
if (um.activeUpdate && um.activeUpdate.state == "pending")
if (um.activeUpdate && ["pending", "pending-elevate", "applied"].includes(um.activeUpdate.state))
prompter.showUpdateDownloaded(um.activeUpdate);
else
prompter.checkForUpdates();

View file

@ -130,13 +130,9 @@ var gGrid = {
// Create sites.
let numLinks = Math.min(links.length, cells.length);
let hasHistoryTiles = false;
for (let i = 0; i < numLinks; i++) {
if (links[i]) {
this.createSite(links[i], cells[i]);
if (links[i].type == "history") {
hasHistoryTiles = true;
}
}
}

View file

@ -47,11 +47,6 @@ var gPage = {
let enabled = gAllPages.enabled;
this._updateAttributes(enabled);
// Update thumbnails to the new enhanced setting
if (aData == "browser.newtabpage.enhanced") {
this.update();
}
// Initialize the whole page if we haven't done that, yet.
if (enabled) {
this._init();
@ -166,16 +161,6 @@ var gPage = {
*/
_handleUnloadEvent: function Page_handleUnloadEvent() {
gAllPages.unregister(this);
// compute page life-span and send telemetry probe: using milli-seconds will leave
// many low buckets empty. Instead we use half-second precision to make low end
// of histogram linear and not lose the change in user attention
let delta = Math.round((Date.now() - this._firstVisibleTime) / 500);
if (this._suggestedTilePresent) {
Services.telemetry.getHistogramById("NEWTAB_PAGE_LIFE_SPAN_SUGGESTED").add(delta);
}
else {
Services.telemetry.getHistogramById("NEWTAB_PAGE_LIFE_SPAN").add(delta);
}
},
/**
@ -250,43 +235,10 @@ var gPage = {
},
onPageVisibleAndLoaded() {
// Send the index of the last visible tile.
this.reportLastVisibleTileIndex();
// Maybe tell the user they can undo an initial automigration
this.maybeShowAutoMigrationUndoNotification();
},
reportLastVisibleTileIndex() {
let cwu = window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils);
let rect = cwu.getBoundsWithoutFlushing(gGrid.node);
let nodes = cwu.nodesFromRect(rect.left, rect.top, 0, rect.width,
rect.height, 0, true, false);
let i = -1;
let lastIndex = -1;
let sites = gGrid.sites;
for (let node of nodes) {
if (node.classList && node.classList.contains("newtab-cell")) {
if (sites[++i]) {
lastIndex = i;
if (sites[i].link.targetedSite) {
// record that suggested tile is shown to use suggested-tiles-histogram
this._suggestedTilePresent = true;
}
}
}
}
},
toggleEnabled: function(aEvent) {
gAllPages.enabled = !gAllPages.enabled;
event.stopPropagation();
},
maybeShowAutoMigrationUndoNotification() {
// sendAsyncMessage("NewTab:MaybeShowAutoMigrationUndoNotification");
},
aEvent.stopPropagation();
}
};

View file

@ -136,15 +136,6 @@ Site.prototype = {
return str;
},
_getSuggestedTileExplanation: function() {
let targetedName = `<strong> ${this.link.targetedName} </strong>`;
let targetedSite = `<strong> ${this.link.targetedSite} </strong>`;
if (this.link.explanation) {
return this._newTabString(this.link.explanation, [targetedName, targetedSite]);
}
return newTabString("suggested.button", [targetedName]);
},
/**
* Checks for and modifies link at campaign end time
*/
@ -155,11 +146,8 @@ Site.prototype = {
this.link.url = Services.io.newURI(this.url, null, null).resolve("/");
// clear supplied images - this triggers thumbnail download for new url
delete this.link.imageURI;
delete this.link.enhancedImageURI;
// remove endTime to avoid further time checks
delete this.link.endTime;
// clear enhanced-content image that may still exist in preloaded page
this._querySelector(".enhanced-content").style.backgroundImage = "";
gPinnedLinks.replace(oldUrl, this.link);
}
},
@ -337,7 +325,7 @@ Site.prototype = {
}
else if (!pinned && target.classList.contains("newtab-control-pin")) {
if (this.pin()) {
// suggested link has changed - update rest of the pages
// link has changed - update rest of the pages
gAllPages.update(gPage);
}
action = "pin";

View file

@ -14,29 +14,25 @@ browser.search.order.4=Ecosia
# This is the default set of web based feed handlers shown in the reader
# selection UI
browser.contentHandlers.types.0.title=My Yahoo!
browser.contentHandlers.types.0.uri=http://add.my.yahoo.com/rss?url=%s
browser.contentHandlers.types.0.uri=https://add.my.yahoo.com/rss?url=%s
# increment this number when anything gets changed in the list below. This will
# cause Firefox to re-read these prefs and inject any new handlers into the
# profile database. Note that "new" is defined as "has a different URL"; this
# means that it's not possible to update the name of existing handler, so
# don't make any spelling errors here.
goanna.handlerService.defaultHandlersVersion=3
# The default set of protocol handlers for webcal:
goanna.handlerService.schemes.webcal.0.name=30 Boxes
goanna.handlerService.schemes.webcal.0.uriTemplate=http://30boxes.com/external/widget?refer=ff&url=%s
gecko.handlerService.defaultHandlersVersion=5
# The default set of protocol handlers for mailto:
goanna.handlerService.schemes.mailto.0.name=Yahoo! Mail
goanna.handlerService.schemes.mailto.0.uriTemplate=https://compose.mail.yahoo.com/?To=%s
goanna.handlerService.schemes.mailto.1.name=Gmail
goanna.handlerService.schemes.mailto.1.uriTemplate=https://mail.google.com/mail/?extsrc=mailto&url=%s
gecko.handlerService.schemes.mailto.0.name=Yahoo! Mail
gecko.handlerService.schemes.mailto.0.uriTemplate=https://compose.mail.yahoo.com/?To=%s
gecko.handlerService.schemes.mailto.1.name=Gmail
gecko.handlerService.schemes.mailto.1.uriTemplate=https://mail.google.com/mail/?extsrc=mailto&url=%s
# The default set of protocol handlers for irc:
goanna.handlerService.schemes.irc.0.name=Mibbit
goanna.handlerService.schemes.irc.0.uriTemplate=https://www.mibbit.com/?url=%s
gecko.handlerService.schemes.irc.0.name=Mibbit
gecko.handlerService.schemes.irc.0.uriTemplate=https://www.mibbit.com/?url=%s
# The default set of protocol handlers for ircs:
goanna.handlerService.schemes.ircs.0.name=Mibbit
goanna.handlerService.schemes.ircs.0.uriTemplate=https://www.mibbit.com/?url=%s
gecko.handlerService.schemes.ircs.0.name=Mibbit
gecko.handlerService.schemes.ircs.0.uriTemplate=https://www.mibbit.com/?url=%s

View file

@ -38,6 +38,8 @@ elif CONFIG['OS_TARGET'] in ('FreeBSD', 'OpenBSD', 'NetBSD'):
SOURCES += ['/nsprpub/pr/src/md/unix/%s.c' % CONFIG['OS_TARGET'].lower()]
elif CONFIG['OS_TARGET'] == 'Darwin':
OS_LIBS += ['-framework CoreServices']
DEFINES['FD_SETSIZE'] = 10240
DEFINES['_DARWIN_UNLIMITED_SELECT'] = True
DEFINES.update(
DARWIN=True,
HAVE_BSD_FLOCK=True,

View file

@ -10,4 +10,4 @@
# hardcoded milestones in the tree from these two files.
#--------------------------------------------------------
4.1.10
4.2.1

View file

@ -84,3 +84,45 @@ Important when editing/adding code:
```
3. Comment your code where prudent! Documenting what you're doing, especially in a complex piece of code, is very important to keep it easy to debug.
4. Try not to write "as compact as possible" source code. Many languages have facilities to write very compact source code by gluing a lot of statements together on single lines, but you should avoid this to keep it readable. Other people than yourself will be looking at and trying to understand your code, and it's important to keep proper paragraphing, whitespace and above all logical names for variables and functions.
## Commit Message Style
With rare exception, it is advisable to use the following style for commit messages. This ensures proper tracking and linking of commits to issues.
### Commits with existing issue
This would directly apply to anyone making a pull request.
- Single Commit: `Issue #xxx - Cited issue title or appropriate direct description of changes`
- *`Issue #1083 - Deprecate FUEL extension helper javascript library`*
- Multi-Part Commits: `Issue #xxx - Part Number: Appropriate direct description of changes`
- *`Issue #492 - Part 1: Remove files`*
- *`Issue #492 - Part 2: Build system, Installer/Packaging`*
- *`Issue #492 - Part 3: nsUpdateService.js, updater.cpp, nsUpdateDriver.cpp`*
- *`Issue #492 - Part 4: Remove superfluous brackets in nsUpdateService.js and updater.cpp`*
An exception exists for multi-part commits where the issue is anticipated or ends up being long term such as "Stop using unified compilation of sources". In these instances the multi-part form is not required.
### Commits with no issue
Sometimes developers with direct push access will commit without an issue being created. You should, where applicable, prefix the commit message with the application, component, or lib you are working on in square brackets.
- `[COMPONENT] Description of what is being changed`
- *`[TychoAM] Give the second <hbox> an ID so it can be targeted in extensions.xul`*
- *`[Pale Moon] Use generic application icon for external applications in about:feeds`*
Multi-part changes by definition are not trival and should have a corresponding issue.
### Additional information in commit messages
It may be benefical to include supplementary information such as a longer description, caveats, specific Mozilla bug numbers, links to forum posts or other such references. If you do add additional information, you should seperate it from the main commit message by a blank line.
*Example: (This happens to also be an example of the long term multi-part exception)*
```
Issue #80 - Stop building /accessible unified and fix deprot
Note: excludes changes to Mac-specific code because I can't build
for OS X to check and fix deprot there.
```
In general, if you have a question about commit message form or content, please ask.

View file

@ -1283,7 +1283,7 @@ Element::ToggleAttribute(const nsAString& aName,
if (aForce.WasPassed() && !aForce.Value()) {
return false;
}
nsCOMPtr<nsIAtom> nameAtom = NS_Atomize(nameToUse);
nsCOMPtr<nsIAtom> nameAtom = NS_AtomizeMainThread(nameToUse);
if (!nameAtom) {
aError.Throw(NS_ERROR_OUT_OF_MEMORY);
return false;

View file

@ -304,7 +304,8 @@ nsContentSink::ProcessHeaderData(nsIAtom* aHeader, const nsAString& aValue,
mDocument->SetHeaderData(aHeader, aValue);
if (aHeader == nsGkAtoms::setcookie) {
if (aHeader == nsGkAtoms::setcookie &&
Preferences::GetBool("dom.meta-set-cookie.enabled", true)) {
// Don't allow setting cookies in cookie-averse documents.
if (mDocument->IsCookieAverse()) {
return NS_OK;

View file

@ -301,7 +301,7 @@ nsNodeInfoManager::GetNodeInfo(const nsAString& aName, nsIAtom *aPrefix,
return NS_OK;
}
nsCOMPtr<nsIAtom> nameAtom = NS_Atomize(aName);
nsCOMPtr<nsIAtom> nameAtom = NS_AtomizeMainThread(aName);
NS_ENSURE_TRUE(nameAtom, NS_ERROR_OUT_OF_MEMORY);
RefPtr<NodeInfo> newNodeInfo =

View file

@ -2406,7 +2406,11 @@ CanvasRenderingContext2D::SetStyleFromUnion(const StringOrCanvasGradientOrCanvas
}
if (aValue.IsCanvasPattern()) {
SetStyleFromPattern(aValue.GetAsCanvasPattern(), aWhichStyle);
CanvasPattern& pattern = aValue.GetAsCanvasPattern();
SetStyleFromPattern(pattern, aWhichStyle);
if (pattern.mForceWriteOnly) {
SetWriteOnly();
}
return;
}
@ -2581,11 +2585,12 @@ CanvasRenderingContext2D::CreatePattern(const CanvasImageSource& aSource,
nsLayoutUtils::SurfaceFromElement(element,
nsLayoutUtils::SFE_WANT_FIRST_FRAME, mTarget);
if (!res.GetSourceSurface()) {
RefPtr<SourceSurface> surface = res.GetSourceSurface();
if (!surface) {
return nullptr;
}
RefPtr<CanvasPattern> pat = new CanvasPattern(this, res.GetSourceSurface(), repeatMode,
RefPtr<CanvasPattern> pat = new CanvasPattern(this, surface, repeatMode,
res.mPrincipal, res.mIsWriteOnly,
res.mCORSUsed);
return pat.forget();
@ -4895,8 +4900,8 @@ CanvasRenderingContext2D::CachedSurfaceFromElement(Element* aElement)
res.mSize = res.mSourceSurface->GetSize();
res.mPrincipal = principal.forget();
res.mIsWriteOnly = false;
res.mImageRequest = imgRequest.forget();
res.mIsWriteOnly = CheckWriteOnlySecurity(res.mCORSUsed, res.mPrincipal);
return res;
}

View file

@ -126,5 +126,25 @@ CoerceDouble(const JS::Value& v, double* d)
return true;
}
bool CheckWriteOnlySecurity(bool aCORSUsed, nsIPrincipal* aPrincipal) {
if (!aPrincipal) {
return true;
}
if (!aCORSUsed) {
nsIGlobalObject* incumbentSettingsObject = dom::GetIncumbentGlobal();
if (NS_WARN_IF(!incumbentSettingsObject)) {
return true;
}
nsIPrincipal* principal = incumbentSettingsObject->PrincipalOrNull();
if (NS_WARN_IF(!principal) || !(principal->Subsumes(aPrincipal))) {
return true;
}
}
return false;
}
} // namespace CanvasUtils
} // namespace mozilla

View file

@ -11,6 +11,7 @@
#include "mozilla/dom/ToJSValue.h"
#include "jsapi.h"
#include "mozilla/FloatingPoint.h"
#include "nsLayoutUtils.h"
class nsIPrincipal;
@ -156,6 +157,10 @@ DashArrayToJSVal(nsTArray<T>& dashes,
}
}
// returns true if write-only mode must used for this principal based on
// the incumbent global.
bool CheckWriteOnlySecurity(bool aCORSUsed, nsIPrincipal* aPrincipal);
} // namespace CanvasUtils
} // namespace mozilla

View file

@ -315,36 +315,6 @@ private:
const Maybe<IntRect>& mCropRect;
};
static bool
CheckSecurityForHTMLElements(bool aIsWriteOnly, bool aCORSUsed, nsIPrincipal* aPrincipal)
{
MOZ_ASSERT(aPrincipal);
if (aIsWriteOnly) {
return false;
}
if (!aCORSUsed) {
nsIGlobalObject* incumbentSettingsObject = GetIncumbentGlobal();
if (NS_WARN_IF(!incumbentSettingsObject)) {
return false;
}
nsIPrincipal* principal = incumbentSettingsObject->PrincipalOrNull();
if (NS_WARN_IF(!principal) || !(principal->Subsumes(aPrincipal))) {
return false;
}
}
return true;
}
static bool
CheckSecurityForHTMLElements(const nsLayoutUtils::SurfaceFromElementResult& aRes)
{
return CheckSecurityForHTMLElements(aRes.mIsWriteOnly, aRes.mCORSUsed, aRes.mPrincipal);
}
/*
* A wrapper to the nsLayoutUtils::SurfaceFromElement() function followed by the
* security checking.
@ -365,7 +335,7 @@ GetSurfaceFromElement(nsIGlobalObject* aGlobal, HTMLElementType& aElement,
}
// Check origin-clean and pass back
*aWriteOnly = !CheckSecurityForHTMLElements(res);
*aWriteOnly = res.mIsWriteOnly;
return surface.forget();
}
@ -818,7 +788,7 @@ ImageBitmap::CreateInternal(nsIGlobalObject* aGlobal, HTMLVideoElement& aVideoEl
nsCOMPtr<nsIPrincipal> principal = aVideoEl.GetCurrentVideoPrincipal();
bool CORSUsed = aVideoEl.GetCORSMode() != CORS_NONE;
writeOnly = !CheckSecurityForHTMLElements(false, CORSUsed, principal);
writeOnly = CheckWriteOnlySecurity(CORSUsed, principal);
// Create ImageBitmap.
ImageContainer *container = aVideoEl.GetImageContainer();

View file

@ -115,7 +115,7 @@ WebGLBuffer::BufferData(GLenum target, size_t size, const void* data, GLenum usa
const ScopedLazyBind lazyBind(gl, target, this);
mContext->InvalidateBufferFetching();
#ifdef XP_MACOSX
#if defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK)
// bug 790879
if (gl->WorkAroundDriverBugs() &&
size > INT32_MAX)

View file

@ -39,6 +39,7 @@
#include "mozilla/dom/OSFileSystem.h"
#include "mozilla/dom/Promise.h"
#include "nsNetUtil.h"
#include "nsReadableUtils.h"
namespace mozilla {
namespace dom {
@ -644,6 +645,13 @@ DataTransfer::PrincipalMaySetData(const nsAString& aType,
NS_WARNING("Disallowing adding x-moz-file or x-moz-file-promize types to DataTransfer");
return false;
}
// Disallow content from creating x-moz-place flavors, so that it cannot
// create fake Places smart queries exposing user data.
if (StringBeginsWith(aType, NS_LITERAL_STRING("text/x-moz-place"))) {
NS_WARNING("Disallowing adding moz-place types to DataTransfer");
return false;
}
}
return true;
}

View file

@ -23717,32 +23717,38 @@ TransactionDatabaseOperationBase::SendPreprocessInfoOrResults(
MOZ_ASSERT(mTransaction);
if (NS_WARN_IF(IsActorDestroyed())) {
// Don't send any notifications if the actor was destroyed already.
// Normally we wouldn't need to send any notifications if the actor was
// already destroyed, but this can be a VersionChangeOp which needs to
// notify its parent operation (OpenDatabaseOp) about the failure.
// So SendFailureResult needs to be called even when the actor was
// destroyed. Normal operations redundantly check if the actor was
// destroyed in SendSuccessResult and SendFailureResult, therefore it's
// ok to call it in all cases here.
if (NS_SUCCEEDED(mResultCode)) {
IDB_REPORT_INTERNAL_ERR();
mResultCode = NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
}
} else {
if (mTransaction->IsInvalidated() || mTransaction->IsAborted()) {
// Aborted transactions always see their requests fail with ABORT_ERR,
// even if the request succeeded or failed with another error.
mResultCode = NS_ERROR_DOM_INDEXEDDB_ABORT_ERR;
} else if (NS_SUCCEEDED(mResultCode)) {
if (aSendPreprocessInfo) {
// This should not release the IPDL reference.
mResultCode = SendPreprocessInfo();
} else {
// This may release the IPDL reference.
mResultCode = SendSuccessResult();
}
} else if (mTransaction->IsInvalidated() || mTransaction->IsAborted()) {
// Aborted transactions always see their requests fail with ABORT_ERR,
// even if the request succeeded or failed with another error.
mResultCode = NS_ERROR_DOM_INDEXEDDB_ABORT_ERR;
}
if (NS_SUCCEEDED(mResultCode)) {
if (aSendPreprocessInfo) {
// This should not release the IPDL reference.
mResultCode = SendPreprocessInfo();
} else {
// This may release the IPDL reference.
mResultCode = SendSuccessResult();
}
}
if (NS_FAILED(mResultCode)) {
// This should definitely release the IPDL reference.
if (!SendFailureResult(mResultCode)) {
// Abort the transaction.
mTransaction->Abort(mResultCode, /* aForce */ false);
}
if (NS_FAILED(mResultCode)) {
// This should definitely release the IPDL reference.
if (!SendFailureResult(mResultCode)) {
// Abort the transaction.
mTransaction->Abort(mResultCode, /* aForce */ false);
}
}

View file

@ -5,8 +5,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "AudioConverter.h"
#include <string.h>
#include <speex/speex_resampler.h>
#include <string.h>
#include <cmath>
/*
@ -140,24 +140,28 @@ static inline int16_t clipTo15(int32_t aX)
size_t
AudioConverter::DownmixAudio(void* aOut, const void* aIn, size_t aFrames) const
{
MOZ_ASSERT(mIn.Format() == AudioConfig::FORMAT_S16 ||
mIn.Format() == AudioConfig::FORMAT_FLT);
MOZ_ASSERT(mIn.Channels() >= mOut.Channels());
MOZ_ASSERT(mIn.Layout() == AudioConfig::ChannelLayout(mIn.Channels()),
"Can only downmix input data in SMPTE layout");
MOZ_ASSERT(mOut.Layout() == AudioConfig::ChannelLayout(2) ||
mOut.Layout() == AudioConfig::ChannelLayout(1));
MOZ_DIAGNOSTIC_ASSERT(mIn.Format() == AudioConfig::FORMAT_S16 ||
mIn.Format() == AudioConfig::FORMAT_FLT);
MOZ_DIAGNOSTIC_ASSERT(mIn.Channels() >= mOut.Channels());
MOZ_DIAGNOSTIC_ASSERT(
mIn.Layout() == AudioConfig::ChannelLayout(mIn.Channels()),
"Can only downmix input data in SMPTE layout");
MOZ_DIAGNOSTIC_ASSERT(mOut.Layout() == AudioConfig::ChannelLayout(2) ||
mOut.Layout() == AudioConfig::ChannelLayout(1),
"Can only downmix to stereo or mono");
uint32_t channels = mIn.Channels();
uint32_t inChannels = mIn.Channels();
uint32_t outChannels = mOut.Channels();
if (channels == 1 && mOut.Channels() == 1) {
if (inChannels == outChannels) {
// Number of channels is equal; no processing needed, just move data.
if (aOut != aIn) {
memmove(aOut, aIn, FramesOutToBytes(aFrames));
}
return aFrames;
}
if (channels > 2) {
if (inChannels > 2) {
if (mIn.Format() == AudioConfig::FORMAT_FLT) {
// Downmix matrix. Per-row normalization 1 for rows 3,4 and 2 for rows 5-8.
static const float dmatrix[6][8][2]= {
@ -174,12 +178,18 @@ AudioConverter::DownmixAudio(void* aOut, const void* aIn, size_t aFrames) const
for (uint32_t i = 0; i < aFrames; i++) {
float sampL = 0.0;
float sampR = 0.0;
for (uint32_t j = 0; j < channels; j++) {
sampL += in[i*mIn.Channels()+j]*dmatrix[mIn.Channels()-3][j][0];
sampR += in[i*mIn.Channels()+j]*dmatrix[mIn.Channels()-3][j][1];
for (uint32_t j = 0; j < inChannels; j++) {
sampL += in[i * inChannels + j] * dmatrix[inChannels - 3][j][0];
sampR += in[i * inChannels + j] * dmatrix[inChannels - 3][j][1];
}
if (outChannels == 2) {
// Stereo
*out++ = sampL;
*out++ = sampR;
} else {
// Mono
*out++ = (sampL + sampR) * 0.5;
}
*out++ = sampL;
*out++ = sampR;
}
} else if (mIn.Format() == AudioConfig::FORMAT_S16) {
// Downmix matrix. Per-row normalization 1 for rows 3,4 and 2 for rows 5-8.
@ -198,45 +208,51 @@ AudioConverter::DownmixAudio(void* aOut, const void* aIn, size_t aFrames) const
for (uint32_t i = 0; i < aFrames; i++) {
int32_t sampL = 0;
int32_t sampR = 0;
for (uint32_t j = 0; j < channels; j++) {
sampL+=in[i*channels+j]*dmatrix[channels-3][j][0];
sampR+=in[i*channels+j]*dmatrix[channels-3][j][1];
for (uint32_t j = 0; j < inChannels; j++) {
sampL += in[i * inChannels + j] * dmatrix[inChannels - 3][j][0];
sampR += in[i * inChannels + j] * dmatrix[inChannels - 3][j][1];
}
sampL = clipTo15((sampL + 8192) >> 14);
sampR = clipTo15((sampR + 8192) >> 14);
if (outChannels == 2) {
// Stereo
*out++ = sampL;
*out++ = sampR;
} else {
// Mono
*out++ = (sampL + sampR) * 0.5;
}
*out++ = clipTo15((sampL + 8192)>>14);
*out++ = clipTo15((sampR + 8192)>>14);
}
} else {
MOZ_DIAGNOSTIC_ASSERT(false, "Unsupported data type");
}
// If we are to continue downmixing to mono, start working on the output
// buffer.
aIn = aOut;
channels = 2;
return aFrames;
}
if (mOut.Channels() == 1) {
if (mIn.Format() == AudioConfig::FORMAT_FLT) {
const float* in = static_cast<const float*>(aIn);
float* out = static_cast<float*>(aOut);
for (size_t fIdx = 0; fIdx < aFrames; ++fIdx) {
float sample = 0.0;
// The sample of the buffer would be interleaved.
sample = (in[fIdx*channels] + in[fIdx*channels + 1]) * 0.5;
*out++ = sample;
}
} else if (mIn.Format() == AudioConfig::FORMAT_S16) {
const int16_t* in = static_cast<const int16_t*>(aIn);
int16_t* out = static_cast<int16_t*>(aOut);
for (size_t fIdx = 0; fIdx < aFrames; ++fIdx) {
int32_t sample = 0.0;
// The sample of the buffer would be interleaved.
sample = (in[fIdx*channels] + in[fIdx*channels + 1]) * 0.5;
*out++ = sample;
}
} else {
MOZ_DIAGNOSTIC_ASSERT(false, "Unsupported data type");
// If we get here, we're doing a stereo -> mono conversion.
MOZ_DIAGNOSTIC_ASSERT(inChannels == 2 && outChannels == 1);
if (mIn.Format() == AudioConfig::FORMAT_FLT) {
const float* in = static_cast<const float*>(aIn);
float* out = static_cast<float*>(aOut);
for (size_t fIdx = 0; fIdx < aFrames; ++fIdx) {
float sample = 0.0;
// The sample of the buffer would be interleaved.
sample = (in[fIdx * inChannels] + in[fIdx * inChannels + 1]) * 0.5;
*out++ = sample;
}
} else if (mIn.Format() == AudioConfig::FORMAT_S16) {
const int16_t* in = static_cast<const int16_t*>(aIn);
int16_t* out = static_cast<int16_t*>(aOut);
for (size_t fIdx = 0; fIdx < aFrames; ++fIdx) {
int32_t sample = 0.0;
// The sample of the buffer would be interleaved.
sample = (in[fIdx * inChannels] + in[fIdx * inChannels + 1]) * 0.5;
*out++ = sample;
}
} else {
MOZ_DIAGNOSTIC_ASSERT(false, "Unsupported data type");
}
return aFrames;
}

View file

@ -932,7 +932,7 @@ nsFind::ResetAll()
// Take nodes out of the tree with NextNode, until null (NextNode will return 0
// at the end of our range).
NS_IMETHODIMP
nsFind::Find(const char16_t* aPatText, nsIDOMRange* aSearchRange,
nsFind::Find(const nsAString& aPatText, nsIDOMRange* aSearchRange,
nsIDOMRange* aStartPoint, nsIDOMRange* aEndPoint,
nsIDOMRange** aRangeRet)
{
@ -949,10 +949,6 @@ nsFind::Find(const char16_t* aPatText, nsIDOMRange* aSearchRange,
NS_ENSURE_ARG_POINTER(aRangeRet);
*aRangeRet = 0;
if (!aPatText) {
return NS_ERROR_NULL_POINTER;
}
ResetAll();
nsAutoString patAutoStr(aPatText);
@ -966,6 +962,11 @@ nsFind::Find(const char16_t* aPatText, nsIDOMRange* aSearchRange,
const char16_t* patStr = patAutoStr.get();
int32_t patLen = patAutoStr.Length() - 1;
// If this function is called with an empty string, we should early exit.
if (patLen < 0) {
return NS_OK;
}
// current offset into the pattern -- reset to beginning/end:
int32_t pindex = (mFindBackward ? patLen : 0);

View file

@ -29,6 +29,6 @@ interface nsIFind : nsISupports
* end (forward) or start (backward).
* @retval A range spanning the match that was found (or null).
*/
nsIDOMRange Find(in wstring aPatText, in nsIDOMRange aSearchRange,
nsIDOMRange Find(in AString aPatText, in nsIDOMRange aSearchRange,
in nsIDOMRange aStartPoint, in nsIDOMRange aEndPoint);
};

View file

@ -751,7 +751,7 @@ nsWebBrowserFind::SearchInFrame(nsPIDOMWindowOuter* aWindow, bool aWrapping,
NS_ENSURE_SUCCESS(rv, rv);
rv = find->Find(mSearchString.get(), searchRange, startPt, endPt,
rv = find->Find(mSearchString, searchRange, startPt, endPt,
getter_AddRefs(foundRange));
if (NS_SUCCEEDED(rv) && foundRange) {

View file

@ -33,20 +33,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=450048
var startPt = searchRange;
var endPt = searchRange;
// Check |null| detection on |aPatText| parameter.
try {
rf.Find(null, searchRange, startPt, endPt);
ok(false, "Missing NS_ERROR_NULL_POINTER exception");
} catch (e) {
e = SpecialPowers.wrap(e);
if (e.result == SpecialPowers.Cr.NS_ERROR_NULL_POINTER) {
ok(true, null);
} else {
throw e;
}
}
// Check |null| detection on |aSearchRange| parameter.
try {
rf.Find("", null, startPt, endPt);

View file

@ -1,7 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<META HTTP-EQUIV="Set-Cookie" CONTENT="meta=tag">
<script type="text/javascript">
document.cookie = "can=has";

View file

@ -0,0 +1 @@
Set-Cookie: meta=tag

View file

@ -1,7 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<META HTTP-EQUIV="Set-Cookie" CONTENT="meta2=tag2">
<script type="text/javascript">
document.cookie = "can2=has2";

View file

@ -0,0 +1 @@
Set-Cookie: meta2=tag2

View file

@ -1,7 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<META HTTP-EQUIV="Set-Cookie" CONTENT="meta3=tag3">
<script type="text/javascript">
document.cookie = "can3=has3";

View file

@ -0,0 +1 @@
Set-Cookie: meta3=tag3

View file

@ -1,7 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<META HTTP-EQUIV="Set-Cookie" CONTENT="meta=tag">
<script type="text/javascript">
document.cookie = "can=has";

View file

@ -0,0 +1 @@
Set-Cookie: meta=tag

View file

@ -1,7 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<META HTTP-EQUIV="Set-Cookie" CONTENT="meta2=tag2">
<script type="text/javascript">
document.cookie = "can2=has2";

View file

@ -0,0 +1 @@
Set-Cookie: meta2=tag2

View file

@ -1,7 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<META HTTP-EQUIV="Set-Cookie" CONTENT="meta=tag">
<script type="text/javascript">
document.cookie = "can=has";

View file

@ -0,0 +1 @@
Set-Cookie: meta=tag

View file

@ -3,7 +3,6 @@
<head>
<link rel="stylesheet" type="text/css" media="all" href="http://example.org/tests/extensions/cookie/test/test1.css" />
<link rel="stylesheet" type="text/css" media="all" href="http://example.com/tests/extensions/cookie/test/test2.css" />
<META HTTP-EQUIV="Set-Cookie" CONTENT="meta2=tag2">
<script type="text/javascript">
function runTest() {
document.cookie = "can2=has2";

View file

@ -0,0 +1 @@
Set-Cookie: meta2=tag2

View file

@ -1,7 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<META HTTP-EQUIV="Set-Cookie" CONTENT="meta=tag">
<script type="text/javascript">
function runTest() {
document.cookie = "can=has";

View file

@ -0,0 +1 @@
Set-Cookie: meta=tag

View file

@ -1,7 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<META HTTP-EQUIV="Set-Cookie" CONTENT="meta=tag">
<script type="text/javascript">
document.cookie = "can=has";

View file

@ -0,0 +1 @@
Set-Cookie: meta=tag

View file

@ -1,7 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<META HTTP-EQUIV="Set-Cookie" CONTENT="meta=tag">
<script type="text/javascript">
document.cookie = "can=has";

View file

@ -0,0 +1 @@
Set-Cookie: meta=tag

View file

@ -1,7 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<META HTTP-EQUIV="Set-Cookie" CONTENT="meta=tag">
<script type="text/javascript">
document.cookie = "can=has";

View file

@ -0,0 +1 @@
Set-Cookie: meta=tag

View file

@ -6,16 +6,27 @@ support-files =
damonbowling.jpg^headers^
file_chromecommon.js
file_domain_hierarchy_inner.html
file_domain_hierarchy_inner.html^headers^
file_domain_hierarchy_inner_inner.html
file_domain_hierarchy_inner_inner.html^headers^
file_domain_hierarchy_inner_inner_inner.html
file_domain_hierarchy_inner_inner_inner.html^headers^
file_domain_inner.html
file_domain_inner.html^headers^
file_domain_inner_inner.html
file_domain_inner_inner.html^headers^
file_image_inner.html
file_image_inner.html^headers^
file_image_inner_inner.html
file_image_inner_inner.html^headers^
file_loadflags_inner.html
file_loadflags_inner.html^headers^
file_localhost_inner.html
file_localhost_inner.html^headers^
file_loopback_inner.html
file_loopback_inner.html^headers^
file_subdomain_inner.html
file_subdomain_inner.html^headers^
file_testcommon.js
file_testloadflags.js
file_testloadflags_chromescript.js

View file

@ -5,7 +5,7 @@
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body onload="setupTest('http://test1.example.org/tests/extensions/cookie/test/file_domain_inner.html', 5, 2)">
<body onload="setupTest('http://test1.example.org/tests/extensions/cookie/test/file_domain_inner.html', 4, 2)">
<p id="display"></p>
<pre id="test">
<script class="testbody" type="text/javascript" src="file_testcommon.js">

View file

@ -5,7 +5,7 @@
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body onload="setupTest('http://test1.example.org/tests/extensions/cookie/test/file_subdomain_inner.html', 5, 2)">
<body onload="setupTest('http://test1.example.org/tests/extensions/cookie/test/file_subdomain_inner.html', 4, 2)">
<p id="display"></p>
<pre id="test">
<script class="testbody" type="text/javascript" src="file_testcommon.js">

View file

@ -5,7 +5,7 @@
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body onload="setupTest('http://example.org/tests/extensions/cookie/test/file_subdomain_inner.html', 5, 2)">
<body onload="setupTest('http://example.org/tests/extensions/cookie/test/file_subdomain_inner.html', 4, 2)">
<p id="display"></p>
<pre id="test">
<script class="testbody" type="text/javascript" src="file_testcommon.js">

View file

@ -5,7 +5,7 @@
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body onload="setupTest('http://sub1.test1.example.org/tests/extensions/cookie/test/file_subdomain_inner.html', 5, 2)">
<body onload="setupTest('http://sub1.test1.example.org/tests/extensions/cookie/test/file_subdomain_inner.html', 4, 2)">
<p id="display"></p>
<pre id="test">
<script class="testbody" type="text/javascript" src="file_testcommon.js">

View file

@ -5,7 +5,7 @@
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body onload="setupTest('http://example.org/tests/extensions/cookie/test/file_domain_inner.html', 5, 2)">
<body onload="setupTest('http://example.org/tests/extensions/cookie/test/file_domain_inner.html', 4, 2)">
<p id="display"></p>
<pre id="test">
<script class="testbody" type="text/javascript" src="file_testcommon.js">

View file

@ -43,9 +43,13 @@ bool
CanvasLayerComposite::SetCompositableHost(CompositableHost* aHost)
{
switch (aHost->GetType()) {
case CompositableType::IMAGE:
case CompositableType::IMAGE: {
if (mCompositableHost && aHost != mCompositableHost) {
mCompositableHost->Detach(this);
}
mCompositableHost = aHost;
return true;
}
default:
return false;
}

View file

@ -50,9 +50,14 @@ bool
ImageLayerComposite::SetCompositableHost(CompositableHost* aHost)
{
switch (aHost->GetType()) {
case CompositableType::IMAGE:
mImageHost = static_cast<ImageHost*>(aHost);
case CompositableType::IMAGE: {
ImageHost* newImageHost = static_cast<ImageHost*>(aHost);
if (mImageHost && newImageHost != mImageHost) {
mImageHost->Detach(this);
}
mImageHost = newImageHost;
return true;
}
default:
return false;
}

View file

@ -49,9 +49,14 @@ PaintedLayerComposite::SetCompositableHost(CompositableHost* aHost)
switch (aHost->GetType()) {
case CompositableType::CONTENT_TILED:
case CompositableType::CONTENT_SINGLE:
case CompositableType::CONTENT_DOUBLE:
mBuffer = static_cast<ContentHost*>(aHost);
case CompositableType::CONTENT_DOUBLE: {
ContentHost* newBuffer = static_cast<ContentHost*>(aHost);
if (mBuffer && newBuffer != mBuffer) {
mBuffer->Detach(this);
}
mBuffer = newBuffer;
return true;
}
default:
return false;
}

View file

@ -1620,10 +1620,10 @@ void SkPath::reverseAddPath(const SkPath& srcPath) {
src = tmp.set(srcPath);
}
SkPathRef::Editor ed(&fPathRef, src->fPathRef->countPoints(), src->fPathRef->countVerbs());
SkPathRef::Editor ed(&fPathRef, src->countPoints(), src->countVerbs());
const SkPoint* pts = src->fPathRef->pointsEnd();
// we will iterator through src's verbs backwards
// we will iterate through src's verbs backwards
const uint8_t* verbs = src->fPathRef->verbsMemBegin(); // points at the last verb
const uint8_t* verbsEnd = src->fPathRef->verbs(); // points just past the first verb
const SkScalar* conicWeights = src->fPathRef->conicWeightsEnd();
@ -1743,6 +1743,7 @@ void SkPath::transform(const SkMatrix& matrix, SkPath* dst) const {
SkPathRef::CreateTransformedCopy(&dst->fPathRef, *fPathRef.get(), matrix);
if (this != dst) {
dst->fLastMoveToIndex = fLastMoveToIndex;
dst->fFillType = fFillType;
dst->fConvexity = kUnknown_Convexity;
dst->fIsVolatile = fIsVolatile;

View file

@ -2260,12 +2260,14 @@ BytecodeEmitter::locationOfNameBoundInFunctionScope(JSAtom* name, EmitterScope*
bool
BytecodeEmitter::emitCheck(ptrdiff_t delta, ptrdiff_t* offset)
{
*offset = code().length();
size_t oldLength = code().length();
*offset = ptrdiff_t(oldLength);
// Start it off moderately large to avoid repeated resizings early on.
// ~98% of cases fit within 1024 bytes.
if (code().capacity() == 0 && !code().reserve(1024))
return false;
size_t newLength = oldLength + size_t(delta);
if (MOZ_UNLIKELY(newLength > MaxBytecodeLength)) {
ReportAllocationOverflow(cx);
return false;
}
if (!code().growBy(delta)) {
ReportOutOfMemory(cx);
@ -10697,17 +10699,19 @@ BytecodeEmitter::emitTreeInBranch(ParseNode* pn)
static bool
AllocSrcNote(ExclusiveContext* cx, SrcNotesVector& notes, unsigned* index)
{
// Start it off moderately large to avoid repeated resizings early on.
// ~99% of cases fit within 256 bytes.
if (notes.capacity() == 0 && !notes.reserve(256))
return false;
size_t oldLength = notes.length();
if (MOZ_UNLIKELY(oldLength + 1 > MaxSrcNotesLength)) {
ReportAllocationOverflow(cx);
return false;
}
if (!notes.growBy(1)) {
ReportOutOfMemory(cx);
return false;
}
*index = notes.length() - 1;
*index = oldLength;
return true;
}
@ -10833,6 +10837,10 @@ BytecodeEmitter::setSrcNoteOffset(unsigned index, unsigned which, ptrdiff_t offs
/* Maybe this offset was already set to a four-byte value. */
if (!(*sn & SN_4BYTE_OFFSET_FLAG)) {
/* Insert three dummy bytes that will be overwritten shortly. */
if (MOZ_UNLIKELY(notes.length() + 3 > MaxSrcNotesLength)) {
ReportAllocationOverflow(cx);
return false;
}
jssrcnote dummy = 0;
if (!(sn = notes.insert(sn, dummy)) ||
!(sn = notes.insert(sn, dummy)) ||

View file

@ -109,10 +109,12 @@ struct CGYieldOffsetList {
void finish(YieldOffsetArray& array, uint32_t prologueLength);
};
// Use zero inline elements because these go on the stack and affect how many
// nested functions are possible.
typedef Vector<jsbytecode, 0> BytecodeVector;
typedef Vector<jssrcnote, 0> SrcNotesVector;
static size_t MaxBytecodeLength = INT32_MAX;
static size_t MaxSrcNotesLength = INT32_MAX;
// Have a few inline elements to avoid heap allocation for tiny sequences.
typedef Vector<jsbytecode, 256> BytecodeVector;
typedef Vector<jssrcnote, 64> SrcNotesVector;
// Linked list of jump instructions that need to be patched. The linked list is
// stored in the bytes of the incomplete bytecode that will be patched, so no

View file

@ -31,6 +31,7 @@
#include "jit/shared/Lowering-shared-inl.h"
#include "vm/Interpreter-inl.h"
#include "vm/Shape-inl.h"
#include "vm/UnboxedObject-inl.h"
using namespace js;
using namespace js::jit;

View file

@ -30,6 +30,7 @@
#include "vm/Interpreter-inl.h"
#include "vm/NativeObject-inl.h"
#include "vm/UnboxedObject-inl.h"
using namespace js;
using namespace js::jit;

View file

@ -2401,7 +2401,12 @@ Assembler::as_b(Label* l, Condition c)
if (oom())
return BufferOffset();
as_b(BufferOffset(l).diffB<BOffImm>(ret), c, ret);
BOffImm off = BufferOffset(l).diffB<BOffImm>(ret);
if (off.isInvalid()) {
m_buffer.fail_bail();
return BufferOffset();
}
as_b(off, c, ret);
#ifdef JS_DISASM_ARM
spewBranch(m_buffer.getInstOrNull(ret), l);
#endif

View file

@ -5012,7 +5012,10 @@ void
MacroAssembler::patchCall(uint32_t callerOffset, uint32_t calleeOffset)
{
BufferOffset inst(callerOffset - 4);
as_bl(BufferOffset(calleeOffset).diffB<BOffImm>(inst), Always, inst);
BOffImm off = BufferOffset(calleeOffset).diffB<BOffImm>(inst);
MOZ_RELEASE_ASSERT(!off.isInvalid(),
"Failed to insert necessary far jump islands");
as_bl(off, Always, inst);
}
CodeOffset

View file

@ -147,7 +147,7 @@
# define JS_64BIT
# endif
#elif defined(__GNUC__)
# if defined(__x86_64__) || defined(__64BIT__)
# if defined(__x86_64__) || defined(__LP64__)
# define JS_64BIT
# endif
#elif defined(__xlc__) || defined(__xlC__) /* IBM XL C/C++ */

View file

@ -8,6 +8,7 @@
#include "mozilla/ArrayUtils.h"
#include "mozilla/BasicEvents.h"
#include "mozilla/dom/CanvasUtils.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/EffectCompositor.h"
#include "mozilla/EffectSet.h"
@ -7285,10 +7286,10 @@ nsLayoutUtils::SurfaceFromElement(nsIImageLoadingContent* aElement,
}
result.mPrincipal = principal.forget();
// no images, including SVG images, can load content from another domain.
result.mIsWriteOnly = false;
result.mImageRequest = imgRequest.forget();
return result;
result.mIsWriteOnly =
CanvasUtils::CheckWriteOnlySecurity(result.mCORSUsed, result.mPrincipal);
}
nsLayoutUtils::SurfaceFromElementResult
@ -7400,7 +7401,8 @@ nsLayoutUtils::SurfaceFromElement(HTMLVideoElement* aElement,
result.mHasSize = true;
result.mSize = result.mLayersImage->GetSize();
result.mPrincipal = principal.forget();
result.mIsWriteOnly = false;
result.mIsWriteOnly =
CanvasUtils::CheckWriteOnlySecurity(result.mCORSUsed, result.mPrincipal);
return result;
}

View file

@ -4517,8 +4517,7 @@ png_image_free(png_imagep image)
if (image != NULL && image->opaque != NULL &&
image->opaque->error_buf == NULL)
{
/* Ignore errors here: */
(void)png_safe_execute(image, png_image_free_function, image);
png_image_free_function(image);
image->opaque = NULL;
}
}

View file

@ -82,7 +82,10 @@ MediaType::Assign(const AM_MEDIA_TYPE* aMediaType)
Clear();
// Shallow copy.
memcpy(this, aMediaType, sizeof(AM_MEDIA_TYPE));
memcpy(static_cast<AM_MEDIA_TYPE*>(this), aMediaType, sizeof(AM_MEDIA_TYPE));
if (pUnk)
pUnk->AddRef();
// Create deep copy of incoming data...
if (cbFormat) {
@ -92,9 +95,6 @@ MediaType::Assign(const AM_MEDIA_TYPE* aMediaType)
memcpy(pbFormat, aMediaType->pbFormat, cbFormat);
}
if (pUnk)
pUnk->AddRef();
return S_OK;
}

View file

@ -1384,6 +1384,7 @@ pref("network.protocol-handler.external.vbscript", false);
pref("network.protocol-handler.external.javascript", false);
pref("network.protocol-handler.external.data", false);
pref("network.protocol-handler.external.ms-help", false);
pref("network.protocol-handler.external.res", false);
pref("network.protocol-handler.external.shell", false);
pref("network.protocol-handler.external.vnd.ms.radio", false);
#ifdef XP_MACOSX
@ -5207,6 +5208,9 @@ pref("intl.allow-insecure-text-input", false);
// Enable meta-viewport support in remote APZ-enabled frames.
pref("dom.meta-viewport.enabled", false);
// Disable <meta http-equiv=set-cookie> support. See m-c bug 1457503 / UXP #1102.
pref("dom.meta-set-cookie.enabled", false);
// MozSettings debugging prefs for each component
pref("dom.mozSettings.SettingsDB.debug.enabled", false);
pref("dom.mozSettings.SettingsManager.debug.enabled", false);

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -908,6 +908,7 @@ this.PlacesUtils = {
* @param type
* The content type of the blob.
* @returns An array of objects representing each item contained by the source.
* @throws if the blob contains invalid data.
*/
unwrapNodes: function PU_unwrapNodes(blob, type) {
// We split on "\n" because the transferable system converts "\r\n" to "\n"
@ -939,7 +940,7 @@ this.PlacesUtils = {
catch (e) {}
}
// note: this._uri() will throw if uriString is not a valid URI
if (this._uri(uriString)) {
if (this._uri(uriString) && this._uri(uriString).scheme != "place") {
nodes.push({ uri: uriString,
title: titleString ? titleString : uriString,
type: this.TYPE_X_MOZ_URL });
@ -952,11 +953,12 @@ this.PlacesUtils = {
for (let i = 0; i < parts.length; i++) {
let uriString = parts[i];
// text/uri-list is converted to TYPE_UNICODE but it could contain
// comments line prepended by #, we should skip them
if (uriString.substr(0, 1) == '\x23')
// comments line prepended by #, we should skip them, as well as
// empty URIs
if (uriString.substr(0, 1) == '\x23' || uriString == "")
continue;
// note: this._uri() will throw if uriString is not a valid URI
if (uriString != "" && this._uri(uriString))
if (this._uri(uriString).scheme != "place")
nodes.push({ uri: uriString,
title: uriString,
type: this.TYPE_X_MOZ_URL });

View file

@ -420,7 +420,7 @@ nsTypeAheadFind::FindItNow(nsIPresShell *aPresShell, bool aIsLinksOnly,
while (true) { // ----- Outer while loop: go through all docs -----
while (true) { // === Inner while loop: go through a single doc ===
mFind->Find(mTypeAheadBuffer.get(), mSearchRange, mStartPointRange,
mFind->Find(mTypeAheadBuffer, mSearchRange, mStartPointRange,
mEndPointRange, getter_AddRefs(returnRange));
if (!returnRange)

View file

@ -36,7 +36,6 @@ XPCOMUtils.defineLazyGetter(this, "gUnicodeConverter", function () {
// Boolean preferences that control newtab content
const PREF_NEWTAB_ENABLED = "browser.newtabpage.enabled";
const PREF_NEWTAB_ENHANCED = "browser.newtabpage.enhanced";
// The preference that tells the number of rows of the newtab grid.
const PREF_NEWTAB_ROWS = "browser.newtabpage.rows";
@ -199,11 +198,6 @@ var AllPages = {
*/
_enabled: null,
/**
* Cached value that tells whether the New Tab Page feature is enhanced.
*/
_enhanced: null,
/**
* Adds a page to the internal list of pages.
* @param aPage The page to register.
@ -241,29 +235,6 @@ var AllPages = {
Services.prefs.setBoolPref(PREF_NEWTAB_ENABLED, !!aEnabled);
},
/**
* Returns whether the history tiles are enhanced.
*/
get enhanced() {
#if defined(MC_BASILISK) || defined(HYPE_ICEWEASEL)
// Hard-block the use of sponsored tiles.
return false;
#else
if (this._enhanced === null)
this._enhanced = Services.prefs.getBoolPref(PREF_NEWTAB_ENHANCED);
return this._enhanced;
#endif
},
/**
* Enables or disables the enhancement of history tiles feature.
*/
set enhanced(aEnhanced) {
if (this.enhanced != aEnhanced)
Services.prefs.setBoolPref(PREF_NEWTAB_ENHANCED, !!aEnhanced);
},
/**
* Returns the number of registered New Tab Pages (i.e. the number of open
* about:newtab instances).
@ -296,9 +267,6 @@ var AllPages = {
case PREF_NEWTAB_ENABLED:
this._enabled = null;
break;
case PREF_NEWTAB_ENHANCED:
this._enhanced = null;
break;
}
}
// and all notifications get forwarded to each page.
@ -313,7 +281,6 @@ var AllPages = {
*/
_addObserver: function AllPages_addObserver() {
Services.prefs.addObserver(PREF_NEWTAB_ENABLED, this, true);
Services.prefs.addObserver(PREF_NEWTAB_ENHANCED, this, true);
Services.obs.addObserver(this, "page-thumbnail:create", true);
this._addObserver = function () {};
},
@ -480,8 +447,6 @@ var PinnedLinks = {
return false;
}
aLink.type = "history";
// always remove targetedSite
delete aLink.targetedSite;
return true;
},
@ -1099,11 +1064,8 @@ var Links = {
_getMergedProviderLinks: function Links__getMergedProviderLinks() {
// Build a list containing a copy of each provider's sortedLinks list.
let linkLists = [];
let { console } = Cu.import("resource://gre/modules/Console.jsm", {});
for (let provider of this._providers.keys()) {
if (!AllPages.enhanced && provider != PlacesProvider) {
// Only show history tiles if we're not in 'enhanced' mode.
continue;
}
let links = this._providers.get(provider);
if (links && links.sortedLinks) {
linkLists.push(links.sortedLinks.slice());
@ -1305,8 +1267,6 @@ var Telemetry = {
let probes = [
{ histogram: "NEWTAB_PAGE_ENABLED",
value: AllPages.enabled },
{ histogram: "NEWTAB_PAGE_ENHANCED",
value: AllPages.enhanced },
{ histogram: "NEWTAB_PAGE_PINNED_SITES_COUNT",
value: PinnedLinks.links.length },
{ histogram: "NEWTAB_PAGE_BLOCKED_SITES_COUNT",

View file

@ -3498,8 +3498,8 @@ UpdatePrompt.prototype = {
return;
}
this._showUnobtrusiveUI(null, URI_UPDATE_PROMPT_DIALOG, null,
UPDATE_WINDOW_NAME, "updatesavailable", update);
this._showUI(null, URI_UPDATE_PROMPT_DIALOG, null,
UPDATE_WINDOW_NAME, "updatesavailable", update);
},
/**
@ -3515,13 +3515,8 @@ UpdatePrompt.prototype = {
if (this._getAltUpdateWindow())
return;
if (background) {
this._showUnobtrusiveUI(null, URI_UPDATE_PROMPT_DIALOG, null,
UPDATE_WINDOW_NAME, "finishedBackground", update);
} else {
this._showUI(null, URI_UPDATE_PROMPT_DIALOG, null,
UPDATE_WINDOW_NAME, "finishedBackground", update);
}
this._showUI(null, URI_UPDATE_PROMPT_DIALOG, null,
UPDATE_WINDOW_NAME, "finishedBackground", update);
},
/**

View file

@ -291,16 +291,20 @@ nsresult nsClipboard::GetGlobalData(HGLOBAL aHGBL, void ** aData, uint32_t * aLe
nsresult result = NS_ERROR_FAILURE;
if (aHGBL != nullptr) {
LPSTR lpStr = (LPSTR) GlobalLock(aHGBL);
DWORD allocSize = GlobalSize(aHGBL);
char* data = static_cast<char*>(malloc(allocSize + 3));
CheckedInt<uint32_t> allocSize = CheckedInt<uint32_t>(GlobalSize(aHGBL)) + 3;
if (!allocSize.isValid()) {
return NS_ERROR_INVALID_ARG;
}
char* data = static_cast<char*>(malloc(allocSize.value()));
if ( data ) {
memcpy ( data, lpStr, allocSize );
data[allocSize] = data[allocSize + 1] = data[allocSize + 2] =
'\0'; // null terminate for safety
uint32_t size = allocSize.value() - 3;
memcpy(data, lpStr, size);
// null terminate for safety
data[size] = data[size + 1] = data[size + 2] = '\0';
GlobalUnlock(aHGBL);
*aData = data;
*aLen = allocSize;
*aLen = size;
result = NS_OK;
}

View file

@ -2832,6 +2832,11 @@ nsCycleCollector::ForgetSkippable(bool aRemoveChildlessNodes,
{
CheckThreadSafety();
// Avoid this when we're aleady dealing with snow-white objects.
if (mFreeingSnowWhite) {
return;
}
mozilla::Maybe<mozilla::AutoGlobalTimelineMarker> marker;
if (NS_IsMainThread()) {
marker.emplace("nsCycleCollector::ForgetSkippable", MarkerStackRequest::NO_STACK);

View file

@ -3037,6 +3037,7 @@ nsLocalFile::IsExecutable(bool* aResult)
"ins",
"isp",
"jar", // java application bundle
"jnlp", // java web start
"js",
"jse",
"lnk",