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

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: rebaseline this patch Created 6 years, 11 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 | « Source/devtools/front_end/SimpleHistoryManager.js ('k') | Source/devtools/front_end/SourcesPanel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/SourceFrame.js
diff --git a/Source/devtools/front_end/SourceFrame.js b/Source/devtools/front_end/SourceFrame.js
index ccbd6077c7953367cf0964fbca91907e99d9316f..3938e2b49174e2ccf06f1413d60b8923f9be185e 100644
--- a/Source/devtools/front_end/SourceFrame.js
+++ b/Source/devtools/front_end/SourceFrame.js
@@ -93,7 +93,8 @@ WebInspector.SourceFrame.createSearchRegex = function(query, modifiers)
WebInspector.SourceFrame.Events = {
ScrollChanged: "ScrollChanged",
- SelectionChanged: "SelectionChanged"
+ SelectionChanged: "SelectionChanged",
+ JumpHappened: "JumpHappened"
}
WebInspector.SourceFrame.prototype = {
@@ -734,6 +735,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);
@@ -870,5 +883,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);
}
}
« no previous file with comments | « Source/devtools/front_end/SimpleHistoryManager.js ('k') | Source/devtools/front_end/SourcesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698