"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "application/palemoon/base/content/browser.js" between
UXP-2019.03.27.tar.gz and UXP-2019.06.08.tar.gz

About: Basilisk is a full-featured, optimized browser derived from the code behind the pre-Servo Firefox browser (29–56 era). UXP = Unified XUL Platform. Source code.

browser.js  (UXP-2019.03.27):browser.js  (UXP-2019.06.08)
skipping to change at line 415 skipping to change at line 415
prefKeyword: "keyword.enabled", prefKeyword: "keyword.enabled",
observe: function(aSubject, aTopic, aData) { observe: function(aSubject, aTopic, aData) {
if (aTopic != "nsPref:changed") if (aTopic != "nsPref:changed")
return; return;
this.writePlaceholder(); this.writePlaceholder();
}, },
writePlaceholder: function() { writePlaceholder: function() {
if (!gURLBar) {
return;
}
let attribute = "placeholder"; let attribute = "placeholder";
let prefs = this.prefSuggests.map(pref => { let prefs = this.prefSuggests.map(pref => {
return this.prefSuggest + pref; return this.prefSuggest + pref;
}); });
prefs.push(this.prefKeyword); prefs.push(this.prefKeyword);
let placeholderDefault = prefs.some(pref => { let placeholderDefault = prefs.some(pref => {
return gPrefService.getBoolPref(pref); return gPrefService.getBoolPref(pref);
}); });
if (placeholderDefault) { if (placeholderDefault) {
skipping to change at line 1150 skipping to change at line 1154
gBidiUI = isBidiEnabled(); gBidiUI = isBidiEnabled();
if (gBidiUI) { if (gBidiUI) {
document.getElementById("documentDirection-separator").hidden = false; document.getElementById("documentDirection-separator").hidden = false;
document.getElementById("documentDirection-swap").hidden = false; document.getElementById("documentDirection-swap").hidden = false;
document.getElementById("textfieldDirection-separator").hidden = false; document.getElementById("textfieldDirection-separator").hidden = false;
document.getElementById("textfieldDirection-swap").hidden = false; document.getElementById("textfieldDirection-swap").hidden = false;
} }
// Setup click-and-hold gestures access to the session history // Setup click-and-hold gestures access to the session history
// menus if global click-and-hold isn't turned on // menus if global click-and-hold isn't turned on
if (!getBoolPref("ui.click_hold_context_menus", false)) if (!Services.prefs.getBoolPref("ui.click_hold_context_menus", false))
SetClickAndHoldHandlers(); SetClickAndHoldHandlers();
// Initialize the full zoom setting. // Initialize the full zoom setting.
// We do this before the session restore service gets initialized so we can // We do this before the session restore service gets initialized so we can
// apply full zoom settings to tabs restored by the session restore service. // apply full zoom settings to tabs restored by the session restore service.
FullZoom.init(); FullZoom.init();
// Bug 666804 - NetworkPrioritizer support for e10s // Bug 666804 - NetworkPrioritizer support for e10s
if (!gMultiProcessBrowser) { if (!gMultiProcessBrowser) {
let NP = {}; let NP = {};
skipping to change at line 1785 skipping to change at line 1789
where = "tab"; where = "tab";
// openUILinkIn in utilityOverlay.js doesn't handle loading multiple pages // openUILinkIn in utilityOverlay.js doesn't handle loading multiple pages
switch (where) { switch (where) {
case "current": case "current":
loadOneOrMoreURIs(homePage); loadOneOrMoreURIs(homePage);
break; break;
case "tabshifted": case "tabshifted":
case "tab": case "tab":
urls = homePage.split("|"); urls = homePage.split("|");
var loadInBackground = getBoolPref("browser.tabs.loadBookmarksInBackground", false); var loadInBackground = Services.prefs.getBoolPref("browser.tabs.loadBookmark sInBackground", false);
gBrowser.loadTabs(urls, loadInBackground); gBrowser.loadTabs(urls, loadInBackground);
break; break;
case "window": case "window":
OpenBrowserWindow(); OpenBrowserWindow();
break; break;
} }
} }
function loadOneOrMoreURIs(aURIString) function loadOneOrMoreURIs(aURIString)
{ {
skipping to change at line 3403 skipping to change at line 3407
CombinedStopReload.uninit(); CombinedStopReload.uninit();
PlacesToolbarHelper.customizeStart(); PlacesToolbarHelper.customizeStart();
BookmarkingUI.customizeStart(); BookmarkingUI.customizeStart();
DownloadsButton.customizeStart(); DownloadsButton.customizeStart();
TabsInTitlebar.allowedBy("customizing-toolbars", false); TabsInTitlebar.allowedBy("customizing-toolbars", false);
var customizeURL = "chrome://global/content/customizeToolbar.xul"; var customizeURL = "chrome://global/content/customizeToolbar.xul";
gCustomizeSheet = getBoolPref("toolbar.customization.usesheet", false); gCustomizeSheet = Services.prefs.getBoolPref("toolbar.customization.usesheet", false);
if (gCustomizeSheet) { if (gCustomizeSheet) {
let sheetFrame = document.createElement("iframe"); let sheetFrame = document.createElement("iframe");
let panel = document.getElementById("customizeToolbarSheetPopup"); let panel = document.getElementById("customizeToolbarSheetPopup");
sheetFrame.id = "customizeToolbarSheetIFrame"; sheetFrame.id = "customizeToolbarSheetIFrame";
sheetFrame.toolbox = gNavToolbox; sheetFrame.toolbox = gNavToolbox;
sheetFrame.panel = panel; sheetFrame.panel = panel;
sheetFrame.setAttribute("style", panel.getAttribute("sheetstyle")); sheetFrame.setAttribute("style", panel.getAttribute("sheetstyle"));
panel.appendChild(sheetFrame); panel.appendChild(sheetFrame);
skipping to change at line 3472 skipping to change at line 3476
DownloadsButton.customizeDone(); DownloadsButton.customizeDone();
// The url bar splitter state is dependent on whether stop/reload // The url bar splitter state is dependent on whether stop/reload
// and the location bar are combined, so we need this ordering // and the location bar are combined, so we need this ordering
CombinedStopReload.init(); CombinedStopReload.init();
UpdateUrlbarSearchSplitterState(); UpdateUrlbarSearchSplitterState();
setUrlAndSearchBarWidthForConditionalForwardButton(); setUrlAndSearchBarWidthForConditionalForwardButton();
// Update the urlbar // Update the urlbar
if (gURLBar) { if (gURLBar) {
gURLBarSettings.writePlaceholder();
URLBarSetURI(); URLBarSetURI();
XULBrowserWindow.asyncUpdateUI(); XULBrowserWindow.asyncUpdateUI();
BookmarkingUI.updateStarState(); BookmarkingUI.updateStarState();
} }
TabsInTitlebar.allowedBy("customizing-toolbars", true); TabsInTitlebar.allowedBy("customizing-toolbars", true);
// Re-enable parts of the UI we disabled during the dialog // Re-enable parts of the UI we disabled during the dialog
var menubar = document.getElementById("main-menubar"); var menubar = document.getElementById("main-menubar");
for (let childNode of menubar.childNodes) for (let childNode of menubar.childNodes)
childNode.setAttribute("disabled", false); childNode.setAttribute("disabled", false);
var cmd = document.getElementById("cmd_CustomizeToolbars"); var cmd = document.getElementById("cmd_CustomizeToolbars");
cmd.removeAttribute("disabled"); cmd.removeAttribute("disabled");
// make sure to re-enable click-and-hold // make sure to re-enable click-and-hold
if (!getBoolPref("ui.click_hold_context_menus", false)) if (!Services.prefs.getBoolPref("ui.click_hold_context_menus", false))
SetClickAndHoldHandlers(); SetClickAndHoldHandlers();
gBrowser.selectedBrowser.focus(); gBrowser.selectedBrowser.focus();
} }
function BrowserToolboxCustomizeChange(aType) { function BrowserToolboxCustomizeChange(aType) {
switch (aType) { switch (aType) {
case "iconsize": case "iconsize":
case "mode": case "mode":
retrieveToolbarIconsizesFromTheme(); retrieveToolbarIconsizesFromTheme();
skipping to change at line 4477 skipping to change at line 4482
} }
if (isExternal && (!aURI || aURI.spec == "about:blank")) { if (isExternal && (!aURI || aURI.spec == "about:blank")) {
win.BrowserOpenTab(); // this also focuses the location bar win.BrowserOpenTab(); // this also focuses the location bar
win.focus(); win.focus();
newWindow = win.content; newWindow = win.content;
break; break;
} }
let loadInBackground = gPrefService.getBoolPref("browser.tabs.loadDivert edInBackground"); let loadInBackground = gPrefService.getBoolPref("browser.tabs.loadDivert edInBackground");
let referrer = aOpener ? makeURI(aOpener.location.href) : null; let openerWindow = (aContext & Ci.nsIBrowserDOMWindow.OPEN_NO_OPENER) ? null : aOpener;
let tab = win.gBrowser.loadOneTab(aURI ? aURI.spec : "about:blank", { let tab = win.gBrowser.loadOneTab(aURI ? aURI.spec : "about:blank", {
triggeringPrincipal: triggeringPrincip al, triggeringPrincipal: triggeringPrincip al,
referrerURI: referrer, referrerURI: referrer,
referrerPolicy: referrerPolicy, referrerPolicy: referrerPolicy,
fromExternal: isExternal, fromExternal: isExternal,
inBackground: loadInBackground}); inBackground: loadInBackground,
opener: openerWindow });
let browser = win.gBrowser.getBrowserForTab(tab); let browser = win.gBrowser.getBrowserForTab(tab);
if (gPrefService.getBoolPref("browser.tabs.noWindowActivationOnExternal" )) { if (gPrefService.getBoolPref("browser.tabs.noWindowActivationOnExternal" )) {
isExternal = false; // this is a hack, but it works isExternal = false; // this is a hack, but it works
} }
newWindow = browser.contentWindow; newWindow = browser.contentWindow;
if (needToFocusWin || (!loadInBackground && isExternal)) if (needToFocusWin || (!loadInBackground && isExternal))
newWindow.focus(); newWindow.focus();
break; break;
skipping to change at line 5339 skipping to change at line 5345
{ {
let links; let links;
if (Array.isArray(urlOrLinks)) { if (Array.isArray(urlOrLinks)) {
links = urlOrLinks; links = urlOrLinks;
} else { } else {
links = [{ url: urlOrLinks, name, type: "" }]; links = [{ url: urlOrLinks, name, type: "" }];
} }
let lastLocationChange = gBrowser.selectedBrowser.lastLocationChange; let lastLocationChange = gBrowser.selectedBrowser.lastLocationChange;
let userContextId = gBrowser.selectedBrowser
.getAttribute("usercontextid") || 0;
let inBackground = Services.prefs.getBoolPref("browser.tabs.loadInBackground") ; let inBackground = Services.prefs.getBoolPref("browser.tabs.loadInBackground") ;
if (event.shiftKey) if (event.shiftKey)
inBackground = !inBackground; inBackground = !inBackground;
Task.spawn(function*() { Task.spawn(function*() {
let urls = []; let urls = [];
let postDatas = []; let postDatas = [];
for (let link of links) { for (let link of links) {
let data = yield getShortcutOrURIAndPostData(link.url); let data = yield getShortcutOrURIAndPostData(link.url);
urls.push(data.url); urls.push(data.url);
postDatas.push(data.postData); postDatas.push(data.postData);
} }
if (lastLocationChange == gBrowser.selectedBrowser.lastLocationChange) { if (lastLocationChange == gBrowser.selectedBrowser.lastLocationChange) {
gBrowser.loadTabs(urls, { gBrowser.loadTabs(urls, {
inBackground, inBackground,
replace: true, replace: true,
allowThirdPartyFixup: false, allowThirdPartyFixup: false,
postDatas, postDatas,
userContextId,
}); });
} }
}); });
// Keep the event from being handled by the dragDrop listeners // Keep the event from being handled by the dragDrop listeners
// built-in to goanna if they happen to be above us. // built-in to goanna if they happen to be above us.
event.preventDefault(); event.preventDefault();
}; };
function MultiplexHandler(event) function MultiplexHandler(event)
 End of changes. 10 change blocks. 
10 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)