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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/Linkifier.js

Issue 1688283002: [DevTools] Blackboxing in LiveLocations is supported in Linkifier (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-source-map-support-v3
Patch Set: Created 4 years, 10 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: third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js b/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
index f7804d5f9db3f8d8b37512ad054f2f7183ad390f..c1cf54dc64bd76a2763523270828b62e5ce7030b 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
@@ -202,16 +202,7 @@ WebInspector.Linkifier.prototype = {
// FIXME(62725): console stack trace line/column numbers are one-based.
var lineNumber = callFrame.lineNumber ? callFrame.lineNumber - 1 : 0;
var columnNumber = callFrame.columnNumber ? callFrame.columnNumber - 1 : 0;
- var anchor = this.linkifyScriptLocation(target, callFrame.scriptId, callFrame.url, lineNumber, columnNumber, classes);
- var debuggerModel = WebInspector.DebuggerModel.fromTarget(target);
- var location = debuggerModel && debuggerModel.createRawLocationByScriptId(callFrame.scriptId, callFrame.lineNumber, callFrame.columnNumber);
- var blackboxed = location ?
- WebInspector.blackboxManager.isBlackboxedRawLocation(location) :
- WebInspector.blackboxManager.isBlackboxedURL(callFrame.url);
- if (blackboxed)
- anchor.classList.add("webkit-html-blackbox-link");
-
- return anchor;
+ return this.linkifyScriptLocation(target, callFrame.scriptId, callFrame.url, lineNumber, columnNumber, classes);
},
/**
@@ -290,10 +281,13 @@ WebInspector.Linkifier.prototype = {
/**
* @param {!Element} anchor
- * @param {!WebInspector.UILocation} uiLocation
+ * @param {!WebInspector.LiveLocation} liveLocation
*/
- _updateAnchor: function(anchor, uiLocation)
+ _updateAnchor: function(anchor, liveLocation)
{
+ var uiLocation = liveLocation.uiLocation();
+ if (!uiLocation)
+ return;
anchor[WebInspector.Linkifier._uiLocationSymbol] = uiLocation;
this._formatter.formatLiveAnchor(anchor, uiLocation);
}
@@ -336,6 +330,11 @@ WebInspector.Linkifier.DefaultFormatter.prototype = {
if (typeof uiLocation.lineNumber === "number")
titleText += ":" + (uiLocation.lineNumber + 1);
anchor.title = titleText;
+
+ if (uiLocation.isBlackboxed)
+ anchor.classList.add("webkit-html-blackbox-link");
+ else
+ anchor.classList.remove("webkit-html-blackbox-link");
}
}

Powered by Google App Engine
This is Rietveld 408576698