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

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

Issue 2971913003: Make character text changes work in Docs (Closed)
Patch Set: Proper diffbase. 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 f69e70fdc42124976b7b6fe3cfea6baca0ec4138..f0d773e38aa94411b3a2abd1871cfbe994d458a1 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js
@@ -662,6 +662,8 @@ editing.EditableLine = function(
this.lineEndContainer_;
/** @private {number} */
this.localLineEndContainerOffset_ = 0;
+ /** @type {Cursor} */
+ this.lineStartContainerCursor_;
this.computeLineData_(opt_baseLineOnStart);
};
@@ -767,6 +769,11 @@ editing.EditableLine.prototype = {
}
this.localLineStartContainerOffset_ = textCountBeforeLineStart;
+ if (this.lineStartContainer_) {
+ this.lineStartContainerCursor_ = new Cursor(
+ this.lineStartContainer_, this.localLineStartContainerOffset_);
+ }
+
finder = this.lineEnd_;
while (finder.nextSibling) {
finder = finder.nextSibling;
@@ -909,7 +916,11 @@ editing.EditableLine.prototype = {
this.localLineStartContainerOffset_) ||
(otherLine.lineEndContainer_ == this.lineEndContainer_ &&
otherLine.localLineEndContainerOffset_ ==
- this.localLineEndContainerOffset_);
+ this.localLineEndContainerOffset_) ||
+ (otherLine.lineStartContainerCursor_.recoveryNode ==
+ this.lineStartContainerCursor_.recoveryNode &&
+ otherLine.lineStartContainerCursor_.index ==
+ this.lineStartContainerCursor_.index);
},
/**

Powered by Google App Engine
This is Rietveld 408576698