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_); |
}, |
/** |