mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 993985 - Fix broken tooltip in Developer Toolbar; r=mratcliffe
This commit is contained in:
parent
53651fd4b0
commit
79281c4be7
@ -60,7 +60,7 @@ function Menu(options) {
|
||||
if (menuCss != null) {
|
||||
util.importCss(menuCss, this.document, 'gcli-menu');
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(this), console.error);
|
||||
|
||||
this.templateOptions = { blankNullUndefined: true, stack: 'menu.html' };
|
||||
if (menuHtmlPromise == null) {
|
||||
@ -68,7 +68,7 @@ function Menu(options) {
|
||||
}
|
||||
menuHtmlPromise.then(function(menuHtml) {
|
||||
this.template = util.toDom(this.document, menuHtml);
|
||||
}.bind(this));
|
||||
}.bind(this), console.error);
|
||||
|
||||
// Contains the items that should be displayed
|
||||
this.items = [];
|
||||
|
@ -65,6 +65,22 @@ exports.exec = function(execSpec) {
|
||||
throw new Error('Not supported');
|
||||
};
|
||||
|
||||
/**
|
||||
* When dealing with module paths on windows we want to use the unix
|
||||
* directory separator rather than the windows one, so we avoid using
|
||||
* OS.Path.dirname, and use unix version on all platforms.
|
||||
*/
|
||||
let resourceDirName = function(path) {
|
||||
let index = path.lastIndexOf("/");
|
||||
if (index == -1) {
|
||||
return ".";
|
||||
}
|
||||
while (index >= 0 && path[index] == "/") {
|
||||
--index;
|
||||
}
|
||||
return path.slice(0, index + 1);
|
||||
};
|
||||
|
||||
/**
|
||||
* Asynchronously load a text resource
|
||||
* @see lib/gcli/util/host.js
|
||||
@ -76,7 +92,7 @@ exports.staticRequire = function(requistingModule, name) {
|
||||
deferred.resolve('');
|
||||
}
|
||||
else {
|
||||
var filename = OS.Path.dirname(requistingModule.id) + '/' + name;
|
||||
var filename = resourceDirName(requistingModule.id) + '/' + name;
|
||||
filename = filename.replace(/\/\.\//g, '/');
|
||||
filename = 'resource://gre/modules/devtools/' + filename;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user