mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1116231 - Move reader.parse-on-load. pref change observer back to Reader.js. r=bnicholson
--HG-- extra : rebase_source : bfd297fd0af91bbfce62c22db0ca7a958ab4430f
This commit is contained in:
parent
e98ae2130e
commit
bc67e7b4cf
@ -85,6 +85,12 @@ let Reader = {
|
||||
ReaderMode.removeArticleFromCache(uri).catch(e => Cu.reportError("Error removing article from cache: " + e));
|
||||
break;
|
||||
}
|
||||
|
||||
case "nsPref:changed":
|
||||
if (aData.startsWith("reader.parse-on-load.")) {
|
||||
this.isEnabledForParseOnLoad = this._getStateForParseOnLoad();
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -27,17 +27,6 @@ let ReaderMode = {
|
||||
// performance reasons)
|
||||
MAX_ELEMS_TO_PARSE: 3000,
|
||||
|
||||
observe: function(aMessage, aTopic, aData) {
|
||||
switch(aTopic) {
|
||||
case "nsPref:changed": {
|
||||
if (aData.startsWith("reader.parse-on-load.")) {
|
||||
this.isEnabledForParseOnLoad = this._getStateForParseOnLoad();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets an article from a loaded browser's document. This method will parse the document
|
||||
* if it does not find the article in the cache.
|
||||
|
Loading…
Reference in New Issue
Block a user