зеркало из https://github.com/mozilla/pjs.git
Bug 423366: remove unused code, and non-obvious dependency on fontbuilder.js from preferences.xml, r=mconnor/masayuki, a=beltzner
This commit is contained in:
Родитель
69893b6fa8
Коммит
4b5eae56af
|
@ -297,7 +297,9 @@
|
|||
var family = this._branch
|
||||
.getComplexValue(this.name, Components.interfaces.nsISupportsString)
|
||||
.data;
|
||||
return FontBuilder.enumerator.getStandardFamilyName(family);
|
||||
var fontEnumerator = Components.classes["@mozilla.org/gfx/fontenumerator;1"]
|
||||
.createInstance(Components.interfaces.nsIFontEnumerator);
|
||||
return fontEnumerator.getStandardFamilyName(family);
|
||||
case "file":
|
||||
var f = this._branch
|
||||
.getComplexValue(this.name, Components.interfaces.nsILocalFile);
|
||||
|
|
|
@ -116,18 +116,5 @@ var FontBuilder = {
|
|||
}
|
||||
}
|
||||
aMenuList.appendChild(popup);
|
||||
},
|
||||
|
||||
getStandardFamilyName: function (aName)
|
||||
{
|
||||
// XXX should return empty string on failure?
|
||||
try {
|
||||
var family = this.enumerator.getStandardFamilyName(aName);
|
||||
if (!family)
|
||||
return aName;
|
||||
return family;
|
||||
} catch (e) {
|
||||
return aName;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче