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

Unified Diff: Source/devtools/front_end/ui/ViewportControl.js

Issue 334313002: DevTools: Fix illegal argument types in ViewportControl (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comment Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/ViewportControl.js
diff --git a/Source/devtools/front_end/ui/ViewportControl.js b/Source/devtools/front_end/ui/ViewportControl.js
index 80fc0820200c41a3a01b411bab206c377cfd44df..580097376d608b847b6704f41f1cfd83b9265362 100644
--- a/Source/devtools/front_end/ui/ViewportControl.js
+++ b/Source/devtools/front_end/ui/ViewportControl.js
@@ -293,7 +293,7 @@ WebInspector.ViewportControl.prototype = {
*/
_restoreSelection: function(selection)
{
- var anchorElement;
+ var anchorElement = null;
var anchorOffset;
if (this._firstVisibleIndex <= this._anchorSelection.item && this._anchorSelection.item <= this._lastVisibleIndex) {
anchorElement = this._anchorSelection.node;
@@ -306,7 +306,7 @@ WebInspector.ViewportControl.prototype = {
anchorOffset = this._selectionIsBackward ? 1 : 0;
}
- var headElement;
+ var headElement = null;
var headOffset;
if (this._firstVisibleIndex <= this._headSelection.item && this._headSelection.item <= this._lastVisibleIndex) {
headElement = this._headSelection.node;
@@ -439,7 +439,7 @@ WebInspector.ViewportControl.prototype = {
return 0;
var chars = 0;
var node = itemElement;
- while ((node = node.traverseNextTextNode(true)) && node !== container)
+ while ((node = node.traverseNextTextNode()) && node !== container)
chars += node.textContent.length;
return chars + offset;
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698