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

Unified Diff: Source/WebCore/inspector/front-end/ScriptsSearchScope.js

Issue 8382007: Merge 97975 - Web Inspector: Advanced search results should keep working after pretty print toggled. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 9 years, 2 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/WebCore/inspector/front-end/ScriptsSearchScope.js
===================================================================
--- Source/WebCore/inspector/front-end/ScriptsSearchScope.js (revision 98246)
+++ Source/WebCore/inspector/front-end/ScriptsSearchScope.js (working copy)
@@ -125,23 +125,24 @@
WebInspector.ScriptsSearchResultsPane = function(searchConfig)
{
WebInspector.FileBasedSearchResultsPane.call(this, searchConfig)
+
+ this._linkifier = WebInspector.debuggerPresentationModel.createLinkifier(new WebInspector.ScriptsSearchResultsPane.LinkifierFormatter());
}
WebInspector.ScriptsSearchResultsPane.prototype = {
/**
* @param {Object} file
* @param {number} lineNumber
+ * @param {number} columnNumber
*/
- createAnchor: function(file, lineNumber)
+ createAnchor: function(file, lineNumber, columnNumber)
{
+
var uiSourceCode = file;
-
- var anchor = WebInspector.linkifyURLAsNode(uiSourceCode.url, "");
- anchor.setAttribute("preferred_panel", "scripts");
- anchor.uiSourceCode = uiSourceCode;
- anchor.lineNumber = lineNumber;
+ var rawSourceCode = uiSourceCode.rawSourceCode;
+ var rawLocation = rawSourceCode.sourceMapping.uiLocationToRawLocation(uiSourceCode, lineNumber, columnNumber);
+ var anchor = this._linkifier.linkifyRawSourceCode(uiSourceCode.rawSourceCode, rawLocation.lineNumber, rawLocation.columnNumber);
anchor.removeChildren();
-
return anchor;
},
@@ -157,3 +158,24 @@
}
WebInspector.ScriptsSearchResultsPane.prototype.__proto__ = WebInspector.FileBasedSearchResultsPane.prototype;
+
+/**
+ * @constructor
+ * @implements {WebInspector.DebuggerPresentationModel.LinkifierFormatter}
+ */
+WebInspector.ScriptsSearchResultsPane.LinkifierFormatter = function()
+{
+}
+
+WebInspector.ScriptsSearchResultsPane.LinkifierFormatter.prototype = {
+ /**
+ * @param {WebInspector.RawSourceCode} rawSourceCode
+ * @param {Element} anchor
+ */
+ formatRawSourceCodeAnchor: function(rawSourceCode, anchor)
+ {
+ // Empty because we don't want to ever update anchor contents after creation.
+ }
+}
+
+WebInspector.ScriptsSearchResultsPane.LinkifierFormatter.prototype.__proto__ = WebInspector.DebuggerPresentationModel.LinkifierFormatter.prototype;
« no previous file with comments | « Source/WebCore/inspector/front-end/RawSourceCode.js ('k') | Source/WebCore/inspector/front-end/inspector.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698