mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back out f410bdf30132 (bug 722428) for mochitest bustage
This commit is contained in:
parent
8fbdcb4ae7
commit
dc38fe911c
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
function SpecialPowers(window) {
|
||||
this.window = Components.utils.getWeakReference(window);
|
||||
this.window = window;
|
||||
this._encounteredCrashDumpFiles = [];
|
||||
this._unexpectedCrashDumpFiles = { };
|
||||
this._crashDumpDir = null;
|
||||
|
@ -63,7 +63,6 @@ function bindDOMWindowUtils(aWindow) {
|
||||
|
||||
var util = aWindow.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
.getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||
var weakUtil = Components.utils.getWeakReference(util);
|
||||
// This bit of magic brought to you by the letters
|
||||
// B Z, and E, S and the number 5.
|
||||
//
|
||||
@ -78,10 +77,7 @@ function bindDOMWindowUtils(aWindow) {
|
||||
if (prop in desc && typeof(desc[prop]) == "function") {
|
||||
var oldval = desc[prop];
|
||||
try {
|
||||
desc[prop] = function() {
|
||||
utils = weakUtil.get();
|
||||
return oldval.apply(utils, arguments);
|
||||
};
|
||||
desc[prop] = function() { return oldval.apply(util, arguments); };
|
||||
} catch (ex) {
|
||||
dump("WARNING: Special Powers failed to rebind function: " + desc + "::" + prop + "\n");
|
||||
}
|
||||
@ -430,7 +426,7 @@ SpecialPowersAPI.prototype = {
|
||||
},
|
||||
|
||||
getDOMWindowUtils: function(aWindow) {
|
||||
if (aWindow == this.window.get() && this.DOMWindowUtils != null)
|
||||
if (aWindow == this.window && this.DOMWindowUtils != null)
|
||||
return this.DOMWindowUtils;
|
||||
|
||||
return bindDOMWindowUtils(aWindow);
|
||||
@ -818,7 +814,7 @@ SpecialPowersAPI.prototype = {
|
||||
},
|
||||
|
||||
snapshotWindow: function (win, withCaret) {
|
||||
var el = this.window.get().document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
|
||||
var el = this.window.document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
|
||||
el.width = win.innerWidth;
|
||||
el.height = win.innerHeight;
|
||||
var ctx = el.getContext("2d");
|
||||
@ -1033,7 +1029,7 @@ SpecialPowersAPI.prototype = {
|
||||
},
|
||||
|
||||
snapshotWindow: function (win, withCaret) {
|
||||
var el = this.window.get().document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
|
||||
var el = this.window.document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
|
||||
el.width = win.innerWidth;
|
||||
el.height = win.innerHeight;
|
||||
var ctx = el.getContext("2d");
|
||||
|
Loading…
Reference in New Issue
Block a user