зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
5eebf91302
Коммит
11dc4a0e47
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче