Bug 379011 - Text size increasing/decreasing broken in view source window, patch by Jason Barnabe <jason_barnabe@fastmail.fm>, r=gavin

This commit is contained in:
philringnalda@gmail.com 2007-06-13 22:26:39 -07:00
Родитель 5eebf91302
Коммит 11dc4a0e47
2 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -584,10 +584,6 @@ function UpdateBackForwardButtons() {
}
}
function getMarkupDocumentViewer() {
return helpBrowser.markupDocumentViewer;
}
function onselect_loadURI(tree) {
try {
var resource = tree.view.getResourceAtIndex(tree.currentIndex);

Просмотреть файл

@ -23,6 +23,7 @@
# Contributor(s):
# Peter Annema <disttsc@bart.nl> (Original Author)
# Jonas Sicking <sicking@bigfoot.com>
# Jason Barnabe <jason_barnabe@fastmail.fm>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@ -40,8 +41,7 @@
/** Document Zoom Management Code
*
* To use this, you'll need to have a getMarkupDocumentViewer() function which returns a
* nsIMarkupDocumentViewer.
* To use this, you'll need to have a getBrowser() function.
*
**/
@ -69,7 +69,7 @@ ZoomManager.prototype = {
get textZoom() {
var currentZoom;
try {
currentZoom = Math.round(getMarkupDocumentViewer().textZoom * 100);
currentZoom = Math.round(this.markupDocumentViewer.textZoom * 100);
if (this.indexOf(currentZoom) == -1) {
if (currentZoom != this.factorOther) {
this.factorOther = currentZoom;
@ -86,7 +86,7 @@ ZoomManager.prototype = {
if (aZoom < this.MIN || aZoom > this.MAX)
throw Components.results.NS_ERROR_INVALID_ARG;
getMarkupDocumentViewer().textZoom = aZoom / 100;
this.markupDocumentViewer.textZoom = aZoom / 100;
},
enlarge : function() {
@ -183,6 +183,10 @@ ZoomManager.prototype = {
}
return aZoom;
},
get markupDocumentViewer() {
return getBrowser().markupDocumentViewer;
}
}