mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 584790 - "Remove image preloader code" [r=mark.finkle]
This commit is contained in:
parent
9752a0a923
commit
8d359fcdd9
@ -564,9 +564,6 @@ var Browser = {
|
||||
Services.prefs.clearUserPref("extensions.disabledAddons");
|
||||
}
|
||||
|
||||
// Force commonly used border-images into the image cache
|
||||
ImagePreloader.cache();
|
||||
|
||||
messageManager.addMessageListener("Browser:ViewportMetadata", this);
|
||||
messageManager.addMessageListener("Browser:FormSubmit", this);
|
||||
messageManager.addMessageListener("Browser:KeyPress", this);
|
||||
@ -2699,36 +2696,6 @@ Tab.prototype = {
|
||||
}
|
||||
};
|
||||
|
||||
var ImagePreloader = {
|
||||
cache: function ip_cache() {
|
||||
// Preload images used in border-image CSS
|
||||
let images = ["button-active", "button-default",
|
||||
"buttondark-active", "buttondark-default",
|
||||
"toggleon-active", "toggleon-inactive",
|
||||
"toggleoff-active", "toggleoff-inactive",
|
||||
"toggleleft-active", "toggleleft-inactive",
|
||||
"togglemiddle-active", "togglemiddle-inactive",
|
||||
"toggleright-active", "toggleright-inactive",
|
||||
"toggleboth-active", "toggleboth-inactive",
|
||||
"toggledarkleft-active", "toggledarkleft-inactive",
|
||||
"toggledarkmiddle-active", "toggledarkmiddle-inactive",
|
||||
"toggledarkright-active", "toggledarkright-inactive",
|
||||
"toggledarkboth-active", "toggledarkboth-inactive",
|
||||
"toolbarbutton-active", "toolbarbutton-default",
|
||||
"addons-active", "addons-default",
|
||||
"downloads-active", "downloads-default",
|
||||
"preferences-active", "preferences-default",
|
||||
"settings-active", "settings-open"];
|
||||
|
||||
let size = screen.width > 400 ? "-64" : "-36";
|
||||
for (let i = 0; i < images.length; i++) {
|
||||
let image = new Image();
|
||||
image.src = "chrome://browser/skin/images/" + images[i] + size + ".png";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Helper used to hide IPC / non-IPC differences for rendering to a canvas
|
||||
function rendererFactory(aBrowser, aCanvas) {
|
||||
let wrapper = {};
|
||||
|
Loading…
Reference in New Issue
Block a user