Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1389)

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
index 927cdc6ef06eb132d4229d1cc011b0ab81f70d42..01eab7fe8e6367f4e0b3a0fd8567323a792450ed 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -182,7 +182,7 @@ Background.prototype = {
case 'continuousRead':
global.isReadingContinuously = true;
var continueReading = function(prevRange) {
- if (!global.isReadingContinuously)
+ if (!global.isReadingContinuously || !this.currentRange_)
return;
new Output().withSpeechAndBraille(
@@ -193,7 +193,7 @@ Background.prototype = {
this.currentRange_ =
this.currentRange_.move(cursors.Unit.NODE, Dir.FORWARD);
- if (this.currentRange_.equals(prevRange))
+ if (!this.currentRange_ || this.currentRange_.equals(prevRange))
global.isReadingContinuously = false;
}.bind(this);

Powered by Google App Engine
This is Rietveld 408576698