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

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: 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..c62a3ec9d5d931342696a50ab1123786d9cf43ff 100644
--- a/Source/devtools/front_end/ui/ViewportControl.js
+++ b/Source/devtools/front_end/ui/ViewportControl.js
@@ -319,7 +319,7 @@ WebInspector.ViewportControl.prototype = {
headOffset = this._selectionIsBackward ? 0 : 1;
}
- selection.setBaseAndExtent(anchorElement, anchorOffset, headElement, headOffset);
+ selection.setBaseAndExtent(anchorElement || null, anchorOffset, headElement || null, headOffset);
lushnikov 2014/06/17 08:15:36 Can't we initialize anchorElement and headElement
apavlov 2014/06/17 08:27:18 Done.
},
refresh: function()
@@ -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