Commit 10ba3468 authored by apavlov@chromium.org's avatar apavlov@chromium.org

DevTools: Fix illegal argument types in ViewportControl

R=lushnikov

Review URL: https://codereview.chromium.org/334313002

git-svn-id: svn://svn.chromium.org/blink/trunk@176302 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent c6b3953d
......@@ -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;
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment