Bug 481567: Difficult to read text on sites like google reader, r=stuart

This commit is contained in:
Mark Finkle 2009-03-06 00:42:39 -05:00
Родитель e2064f36a1
Коммит 3d5a6ae61f
1 изменённых файлов: 11 добавлений и 9 удалений

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

@ -55,6 +55,8 @@ function getBrowser() {
return Browser.selectedBrowser; return Browser.selectedBrowser;
} }
const kDefaultTextZoom = 1.2;
var ws = null; var ws = null;
var ih = null; var ih = null;
@ -64,8 +66,7 @@ var Browser = {
_selectedTab : null, _selectedTab : null,
_windowUtils: window.QueryInterface(Ci.nsIInterfaceRequestor) _windowUtils: window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils), .getInterface(Ci.nsIDOMWindowUtils),
_isStartup: true, _isStartup : true,
startup: function() { startup: function() {
var self = this; var self = this;
@ -1042,9 +1043,8 @@ ProgressController.prototype = {
else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP)
this._networkStop(); this._networkStop();
} else if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_DOCUMENT) { } else if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_DOCUMENT) {
if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) { if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP)
this._documentStop(); this._documentStop();
}
} }
}, },
@ -1106,11 +1106,15 @@ ProgressController.prototype = {
_networkStart: function() { _networkStart: function() {
this._tab.setLoading(true); this._tab.setLoading(true);
//dump("started loading network\n");
if (Browser.selectedBrowser == this.browser) { if (Browser.selectedBrowser == this.browser) {
Browser.canvasBrowser.startLoading(); Browser.canvasBrowser.startLoading();
BrowserUI.update(TOOLBARSTATE_LOADING); BrowserUI.update(TOOLBARSTATE_LOADING);
// We increase the default text size to make the text more readable when
// the page is zoomed out
if (this.browser.markupDocumentViewer.textZoom != kDefaultTextZoom)
this.browser.markupDocumentViewer.textZoom = kDefaultTextZoom;
} }
}, },
@ -1124,8 +1128,6 @@ ProgressController.prototype = {
}, },
_documentStop: function() { _documentStop: function() {
//dump("stop, hammer time\n");
// translate any phone numbers // translate any phone numbers
Browser.translatePhoneNumbers(); Browser.translatePhoneNumbers();