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

Unified Diff: Source/devtools/front_end/SourceFrame.js

Issue 23474010: DevTools: "Jump between editing locations" experiment (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 12 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: Source/devtools/front_end/SourceFrame.js
diff --git a/Source/devtools/front_end/SourceFrame.js b/Source/devtools/front_end/SourceFrame.js
index 3962ae3446cb8dcebfbb416039ca6c68e421294e..2a9efd6009528f3c25f9d3ab6b882a4345650c86 100644
--- a/Source/devtools/front_end/SourceFrame.js
+++ b/Source/devtools/front_end/SourceFrame.js
@@ -92,7 +92,8 @@ WebInspector.SourceFrame.createSearchRegex = function(query, modifiers)
WebInspector.SourceFrame.Events = {
ScrollChanged: "ScrollChanged",
- SelectionChanged: "SelectionChanged"
+ SelectionChanged: "SelectionChanged",
+ JumpHappened: "JumpHappened"
}
WebInspector.SourceFrame.prototype = {
@@ -733,6 +734,18 @@ WebInspector.SourceFrame.prototype = {
{
},
+ /**
+ * @param {?WebInspector.TextRange} from
+ * @param {?WebInspector.TextRange} to
+ */
+ onJumpToPosition: function(from, to)
+ {
+ this.dispatchEventToListeners(WebInspector.SourceFrame.Events.JumpHappened, {
+ from: from,
+ to: to
+ });
+ },
+
inheritScrollPositions: function(sourceFrame)
{
this._textEditor.inheritScrollPositions(sourceFrame._textEditor);
@@ -869,5 +882,14 @@ WebInspector.TextEditorDelegateForSourceFrame.prototype = {
{
var targetLocation = WebInspector.ParsedURL.completeURL(this._sourceFrame._url, hrefValue);
return WebInspector.linkifyURLAsNode(targetLocation || hrefValue, hrefValue, undefined, isExternal);
+ },
+
+ /**
+ * @param {?WebInspector.TextRange} from
+ * @param {?WebInspector.TextRange} to
+ */
+ onJumpToPosition: function(from, to)
+ {
+ this._sourceFrame.onJumpToPosition(from, to);
}
}

Powered by Google App Engine
This is Rietveld 408576698