mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
backout 2c49724bcbfd
This commit is contained in:
parent
3607438e75
commit
7282ef5260
@ -1,39 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
let Cc = Components.classes;
|
||||
let Ci = Components.interfaces;
|
||||
let Cu = Components.utils;
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
var WebAppRT = {
|
||||
init: function() {
|
||||
this.deck = document.getElementById("browsers");
|
||||
this.deck.addEventListener("click", onContentClick, false, true);
|
||||
},
|
||||
|
||||
handleEvent: function(event) {
|
||||
let target = event.target;
|
||||
|
||||
if (!(target instanceof HTMLAnchorElement) ||
|
||||
target.getAttribute("target") != "_blank") {
|
||||
return;
|
||||
}
|
||||
|
||||
let uri = Services.io.newURI(target.href,
|
||||
target.ownerDocument.characterSet,
|
||||
null);
|
||||
|
||||
// Direct the URL to the browser.
|
||||
Cc["@mozilla.org/uriloader/external-protocol-service;1"].
|
||||
getService(Ci.nsIExternalProtocolService).
|
||||
getProtocolHandlerInfo(uri.scheme).
|
||||
launchWithURI(uri);
|
||||
|
||||
// Prevent the runtime from loading the URL. We do this after directing it
|
||||
// to the browser to give the runtime a shot at handling the URL if we fail
|
||||
// to direct it to the browser for some reason.
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
@ -32,7 +32,6 @@ XPCOMUtils.defineLazyGetter(this, "DebuggerServer", function() {
|
||||
["HelperApps", "chrome://browser/content/HelperApps.js"],
|
||||
["SelectHelper", "chrome://browser/content/SelectHelper.js"],
|
||||
["Readability", "chrome://browser/content/Readability.js"],
|
||||
["WebAppRT", "chrome://browser/content/WebAppRT.js"],
|
||||
].forEach(function (aScript) {
|
||||
let [name, script] = aScript;
|
||||
XPCOMUtils.defineLazyGetter(window, name, function() {
|
||||
@ -310,9 +309,6 @@ var BrowserApp = {
|
||||
#endif
|
||||
}
|
||||
|
||||
if (pinned)
|
||||
WebAppRT.init();
|
||||
|
||||
if (this.isAppUpdated())
|
||||
this.onAppUpdated();
|
||||
|
||||
|
@ -36,7 +36,6 @@ chrome.jar:
|
||||
content/SelectHelper.js (content/SelectHelper.js)
|
||||
content/HelperApps.js (content/HelperApps.js)
|
||||
content/dbg-browser-actors.js (content/dbg-browser-actors.js)
|
||||
content/WebAppRT.js (content/WebAppRT.js)
|
||||
|
||||
% content branding %content/branding/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user