mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge m-c to fx-team
This commit is contained in:
commit
aba46fd69a
@ -56,6 +56,7 @@ var tests = {
|
||||
doc.body.appendChild(div);
|
||||
let swap = document.getAnonymousElementByAttribute(chats.selectedChat, "anonid", "swap");
|
||||
swap.click();
|
||||
port.close();
|
||||
break;
|
||||
case "got-chatbox-message":
|
||||
ok(true, "got chatbox message");
|
||||
@ -73,13 +74,16 @@ var tests = {
|
||||
.getInterface(Components.interfaces.nsIDOMWindow);
|
||||
Services.wm.removeListener(this);
|
||||
// wait for load to ensure the window is ready for us to test
|
||||
domwindow.addEventListener("load", function _load() {
|
||||
domwindow.addEventListener("load", function _load(event) {
|
||||
let doc = domwindow.document;
|
||||
if (doc.location.href != "chrome://browser/content/chatWindow.xul")
|
||||
return;
|
||||
if (event.target != doc)
|
||||
return;
|
||||
|
||||
domwindow.removeEventListener("load", _load, false);
|
||||
|
||||
domwindow.addEventListener("unload", function _close() {
|
||||
domwindow.addEventListener("unload", function _close(event) {
|
||||
if (event.target != doc)
|
||||
return;
|
||||
domwindow.removeEventListener("unload", _close, false);
|
||||
info("window has been closed");
|
||||
waitForCondition(function() {
|
||||
@ -160,13 +164,15 @@ var tests = {
|
||||
Services.wm.removeListener(this);
|
||||
// wait for load to ensure the window is ready for us to test, make sure
|
||||
// we're not getting called for about:blank
|
||||
domwindow.addEventListener("load", function _load() {
|
||||
domwindow.addEventListener("load", function _load(event) {
|
||||
let doc = domwindow.document;
|
||||
if (doc.location.href != "chrome://browser/content/chatWindow.xul")
|
||||
return;
|
||||
if (event.target != doc)
|
||||
return;
|
||||
domwindow.removeEventListener("load", _load, false);
|
||||
|
||||
domwindow.addEventListener("unload", function _close() {
|
||||
domwindow.addEventListener("unload", function _close(event) {
|
||||
if (event.target != doc)
|
||||
return;
|
||||
domwindow.removeEventListener("unload", _close, false);
|
||||
ok(true, "window has been closed");
|
||||
next();
|
||||
@ -184,6 +190,7 @@ var tests = {
|
||||
},function() {
|
||||
// logout, we should get unload next
|
||||
port.postMessage({topic: "test-logout"});
|
||||
port.close();
|
||||
}, domwindow);
|
||||
|
||||
}, false);
|
||||
|
@ -2,7 +2,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
pref("startup.homepage_override_url","https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/whatsnew/?oldversion=%OLD_VERSION%");
|
||||
pref("startup.homepage_override_url","");
|
||||
pref("startup.homepage_welcome_url","https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/firstrun/");
|
||||
// Interval: Time between checks for a new version (in seconds)
|
||||
pref("app.update.interval", 43200); // 12 hours
|
||||
|
@ -463,21 +463,26 @@
|
||||
|
||||
// clear explicit width and columns before calculating from avail. height again
|
||||
let gridStyle = this._grid.style;
|
||||
gridStyle.removeProperty('min-width');
|
||||
gridStyle.removeProperty('-moz-column-count');
|
||||
gridStyle.removeProperty("min-width");
|
||||
gridStyle.removeProperty("-moz-column-count");
|
||||
|
||||
// We favor overflowing horizontally, not vertically (rows then colums)
|
||||
// rows attribute = max rows
|
||||
let maxRowCount = Math.min(this.getAttribute("rows") || Infinity, Math.floor(containerDims.height / itemDims.height));
|
||||
this._rowCount = Math.min(this.itemCount, maxRowCount);
|
||||
if (this.hasAttribute("vertical")) {
|
||||
this._columnCount = Math.floor(containerDims.width / itemDims.width) || 1;
|
||||
this._rowCount = Math.floor(this.itemCount / this._columnCount);
|
||||
} else {
|
||||
// We favor overflowing horizontally, not vertically (rows then colums)
|
||||
// rows attribute = max rows
|
||||
let maxRowCount = Math.min(this.getAttribute("rows") || Infinity, Math.floor(containerDims.height / itemDims.height));
|
||||
this._rowCount = Math.min(this.itemCount, maxRowCount);
|
||||
|
||||
// columns attribute = min cols
|
||||
this._columnCount = this.itemCount ?
|
||||
Math.max(
|
||||
// at least 1 column when there are items
|
||||
this.getAttribute("columns") || 1,
|
||||
Math.ceil(this.itemCount / this._rowCount)
|
||||
) : this.getAttribute("columns") || 0;
|
||||
// columns attribute = min cols
|
||||
this._columnCount = this.itemCount ?
|
||||
Math.max(
|
||||
// at least 1 column when there are items
|
||||
this.getAttribute("columns") || 1,
|
||||
Math.ceil(this.itemCount / this._rowCount)
|
||||
) : this.getAttribute("columns") || 0;
|
||||
}
|
||||
|
||||
// width is typically auto, cap max columns by truncating items collection
|
||||
// or, setting max-width style property with overflow hidden
|
||||
|
@ -323,10 +323,6 @@ let BookmarksStartView = {
|
||||
this._view.destruct();
|
||||
}
|
||||
},
|
||||
|
||||
show: function show() {
|
||||
this._grid.arrangeItems();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -302,10 +302,6 @@ let HistoryStartView = {
|
||||
_view: null,
|
||||
get _grid() { return document.getElementById("start-history-grid"); },
|
||||
|
||||
show: function show() {
|
||||
this._grid.arrangeItems();
|
||||
},
|
||||
|
||||
init: function init() {
|
||||
this._view = new HistoryView(this._grid, StartUI.maxResultsPerSection, true);
|
||||
this._view.populateGrid();
|
||||
|
@ -98,6 +98,7 @@ RemoteTabsView.prototype = Util.extend(Object.create(View.prototype), {
|
||||
}, this);
|
||||
}
|
||||
this.setUIAccessVisible(show);
|
||||
this._set.arrangeItems();
|
||||
},
|
||||
|
||||
destruct: function destruct() {
|
||||
@ -127,8 +128,4 @@ let RemoteTabsStartView = {
|
||||
this._view.destruct();
|
||||
}
|
||||
},
|
||||
|
||||
show: function show() {
|
||||
this._grid.arrangeItems();
|
||||
}
|
||||
};
|
||||
|
@ -6,10 +6,6 @@
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
// When setting the max-height of the start tab contents, this is the buffer we subtract
|
||||
// for the nav bar plus white space above it.
|
||||
const kBottomContentMargin = 50;
|
||||
|
||||
var StartUI = {
|
||||
get startUI() { return document.getElementById("start-container"); },
|
||||
|
||||
@ -30,7 +26,6 @@ var StartUI = {
|
||||
document.getElementById("bcast_preciseInput").setAttribute("input",
|
||||
this.chromeWin.InputSourceHelper.isPrecise ? "precise" : "imprecise");
|
||||
|
||||
this._updateStartHeight();
|
||||
this._adjustDOMforViewState();
|
||||
|
||||
TopSitesStartView.init();
|
||||
@ -38,12 +33,6 @@ var StartUI = {
|
||||
HistoryStartView.init();
|
||||
RemoteTabsStartView.init();
|
||||
|
||||
TopSitesStartView.show();
|
||||
BookmarksStartView.show();
|
||||
HistoryStartView.show();
|
||||
RemoteTabsStartView.show();
|
||||
|
||||
this.chromeWin.document.getElementById("browsers").addEventListener("SizeChanged", this, true);
|
||||
this.chromeWin.addEventListener("MozPrecisePointer", this, true);
|
||||
this.chromeWin.addEventListener("MozImprecisePointer", this, true);
|
||||
Services.obs.addObserver(this, "metro_viewstate_changed", false);
|
||||
@ -60,7 +49,6 @@ var StartUI = {
|
||||
RemoteTabsStartView.uninit();
|
||||
|
||||
if (this.chromeWin) {
|
||||
this.chromeWin.document.getElementById("browsers").removeEventListener("SizeChanged", this, true);
|
||||
this.chromeWin.removeEventListener("MozPrecisePointer", this, true);
|
||||
this.chromeWin.removeEventListener("MozImprecisePointer", this, true);
|
||||
}
|
||||
@ -108,7 +96,8 @@ var StartUI = {
|
||||
this.onClick(aEvent);
|
||||
break;
|
||||
case "MozMousePixelScroll":
|
||||
if (this.startUI.getAttribute("viewstate") == "snapped") {
|
||||
let viewstate = this.startUI.getAttribute("viewstate");
|
||||
if (viewstate === "snapped" || viewstate === "portrait") {
|
||||
window.scrollBy(0, aEvent.detail);
|
||||
} else {
|
||||
window.scrollBy(aEvent.detail, 0);
|
||||
@ -117,17 +106,9 @@ var StartUI = {
|
||||
aEvent.preventDefault();
|
||||
aEvent.stopPropagation();
|
||||
break;
|
||||
case "SizeChanged":
|
||||
this._updateStartHeight();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
_updateStartHeight: function () {
|
||||
document.getElementById("start-container").style.maxHeight =
|
||||
(this.chromeWin.ContentAreaObserver.contentHeight - kBottomContentMargin) + "px";
|
||||
},
|
||||
|
||||
_adjustDOMforViewState: function() {
|
||||
if (this.chromeWin.MetroUtils.immersive) {
|
||||
let currViewState = "";
|
||||
|
@ -311,8 +311,4 @@ let TopSitesStartView = {
|
||||
this._view.destruct();
|
||||
}
|
||||
},
|
||||
|
||||
show: function show() {
|
||||
this._grid.arrangeItems();
|
||||
}
|
||||
};
|
||||
|
@ -29,9 +29,18 @@ function View() {
|
||||
View.prototype = {
|
||||
_adjustDOMforViewState: function _adjustDOMforViewState(aState) {
|
||||
if (this._set) {
|
||||
if (undefined == aState)
|
||||
aState = this._set.getAttribute("viewstate");
|
||||
if (undefined == aState)
|
||||
aState = this._set.getAttribute("viewstate");
|
||||
|
||||
this._set.setAttribute("suppressonselect", (aState == "snapped"));
|
||||
|
||||
if (aState == "portrait") {
|
||||
this._set.setAttribute("vertical", true);
|
||||
} else {
|
||||
this._set.removeAttribute("vertical");
|
||||
}
|
||||
|
||||
this._set.arrangeItems();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -190,15 +190,19 @@ documenttab[selected] .documenttab-selection {
|
||||
#startui-page {
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#startui-body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#start-container {
|
||||
display: -moz-box;
|
||||
min-width: @grid_double_column_width@;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#start-topsites {
|
||||
@ -210,7 +214,8 @@ documenttab[selected] .documenttab-selection {
|
||||
padding-bottom: @toolbar_height@;
|
||||
}
|
||||
|
||||
#start-container[viewstate="snapped"] {
|
||||
#start-container[viewstate="snapped"],
|
||||
#start-container[viewstate="portrait"] {
|
||||
-moz-box-orient: vertical;
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,7 @@
|
||||
|
||||
%define tile_border_color #dbdcde
|
||||
%define tile_spacing 12px
|
||||
%define tile_side_margin 6px
|
||||
|
||||
%define scroller_thickness 4px
|
||||
%define scroller_minimum 8px
|
||||
|
@ -624,6 +624,7 @@ arrowbox {
|
||||
}
|
||||
|
||||
.meta-section-title {
|
||||
margin: @metro_spacing_normal@ @tile_side_margin@;
|
||||
font-size: @metro_font_large@;
|
||||
font-weight: 100;
|
||||
cursor: default;
|
||||
|
@ -68,7 +68,7 @@ richgriditem {
|
||||
background-origin: padding-box;
|
||||
/* content positioning within the grid "cell"
|
||||
gives us the gutters/spacing between tiles */
|
||||
top: 2px; right: 6px; bottom: 10px; left: 6px;
|
||||
top: 2px; right: @tile_side_margin@; bottom: 10px; left: @tile_side_margin@;
|
||||
border: @metro_border_thin@ solid @tile_border_color@;
|
||||
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);
|
||||
transition: 150ms transform ease-out;
|
||||
|
@ -8,7 +8,7 @@ var timer;
|
||||
|
||||
function handleRequest(req, resp) {
|
||||
resp.processAsync();
|
||||
resp.setHeader("Cache-Control", "no-cache", false);
|
||||
resp.setHeader("Cache-Control", "no-cache, no-store", false);
|
||||
resp.setHeader("Content-Type", "text/html;charset=utf-8", false);
|
||||
|
||||
let opts = {};
|
||||
|
Loading…
Reference in New Issue
Block a user