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

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

Issue 2971913003: Make character text changes work in Docs (Closed)
Patch Set: Rename test and make it slightly more complex. Created 3 years, 5 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/editing.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js
index 1b5ee25d9906ed8f6d957da4b36c8d9fb9b6af26..a1b0f52361e4c612c42e349968f8654d2ae93fe3 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js
@@ -13,6 +13,7 @@ goog.require('AutomationTreeWalker');
goog.require('AutomationUtil');
goog.require('Output');
goog.require('Output.EventType');
+goog.require('TreePathRecoveryStrategy');
goog.require('cursors.Cursor');
goog.require('cursors.Range');
goog.require('cvox.BrailleBackground');
@@ -661,6 +662,8 @@ editing.EditableLine = function(
this.lineEndContainer_;
/** @private {number} */
this.localLineEndContainerOffset_ = 0;
+ /** @type {RecoveryStrategy} */
+ this.lineStartContainerRecovery_;
this.computeLineData_(opt_baseLineOnStart);
};
@@ -766,6 +769,11 @@ editing.EditableLine.prototype = {
}
this.localLineStartContainerOffset_ = textCountBeforeLineStart;
+ if (this.lineStartContainer_) {
+ this.lineStartContainerRecovery_ =
+ new TreePathRecoveryStrategy(this.lineStartContainer_);
+ }
+
finder = this.lineEnd_;
while (finder.nextSibling) {
finder = finder.nextSibling;
@@ -908,7 +916,11 @@ editing.EditableLine.prototype = {
this.localLineStartContainerOffset_) ||
(otherLine.lineEndContainer_ == this.lineEndContainer_ &&
otherLine.localLineEndContainerOffset_ ==
- this.localLineEndContainerOffset_);
+ this.localLineEndContainerOffset_) ||
+ (otherLine.lineStartContainerRecovery_.node ==
+ this.lineStartContainerRecovery_.node &&
+ otherLine.localLineStartContainerOffset_ ==
+ this.localLineStartContainerOffset_);
},
/**

Powered by Google App Engine
This is Rietveld 408576698