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

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

Issue 2301833005: Get rid of AX_LINE_BREAKS attribute to improve performance. (Closed)
Patch Set: Re-worded comment. Created 4 years, 3 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 4d988b800c8c900b622593c4226cc21756f989f1..5f08eee38b33590a08e1ae424614ff611791f3cd 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js
@@ -133,7 +133,7 @@ AutomationEditableText.prototype = {
getLineIndex: function(charIndex) {
if (!this.multiline)
return 0;
- var breaks = this.node_.lineBreaks || [];
+ var breaks = this.node_.lineStartOffsets || [];
var index = 0;
while (index < breaks.length && breaks[index] <= charIndex)
++index;
@@ -166,9 +166,9 @@ AutomationEditableText.prototype = {
* @private
*/
getLineBreaks_: function() {
- // node.lineBreaks is undefined when the multiline field has no line
+ // node.lineStartOffsets is undefined when the multiline field has no line
// breaks.
- return this.node_.lineBreaks || [];
+ return this.node_.lineStartOffsets || [];
},
/** @private */

Powered by Google App Engine
This is Rietveld 408576698