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

Unified Diff: Source/devtools/front_end/sdk/Linkifier.js

Issue 448743002: DevTools: Linkify console stacks with blackboxing consideration. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/sdk/Linkifier.js
diff --git a/Source/devtools/front_end/sdk/Linkifier.js b/Source/devtools/front_end/sdk/Linkifier.js
index ecdebf434ca64d75ad6cec3b3787c059c351aeee..ed437f8b108a61848cd25dfaaaa28c779f6b9e28 100644
--- a/Source/devtools/front_end/sdk/Linkifier.js
+++ b/Source/devtools/front_end/sdk/Linkifier.js
@@ -158,8 +158,10 @@ WebInspector.Linkifier.prototype = {
return fallbackAnchor;
var anchor = this._createAnchor(classes);
+ if (WebInspector.experimentsSettings.frameworksDebuggingSupport.isEnabled() && WebInspector.BlackboxSupport.isBlackboxedURL(sourceURL))
+ anchor.classList.add("webkit-html-blackbox-link");
vsevik 2014/08/07 09:11:58 Again, I don't think we should dim the link to the
aandrey 2014/08/07 10:24:59 Done.
var liveLocation = WebInspector.debuggerWorkspaceBinding.createLiveLocation(rawLocation, this._updateAnchor.bind(this, anchor));
- this._liveLocationsByTarget.get(rawLocation.target()).push({anchor: anchor, location: liveLocation});
+ this._liveLocationsByTarget.get(rawLocation.target()).push({ anchor: anchor, location: liveLocation });
anchor.__fallbackAnchor = fallbackAnchor;
return anchor;
},
@@ -190,6 +192,30 @@ WebInspector.Linkifier.prototype = {
},
/**
+ * @param {?WebInspector.Target} target
+ * @param {?Array.<!ConsoleAgent.CallFrame>} stackTrace
+ * @param {string=} classes
+ * @param {boolean=} disallowUnknownSource
+ * @return {?Element}
+ */
+ linkifyTopUnblackboxedConsoleCallFrame: function(target, stackTrace, classes, disallowUnknownSource)
+ {
+ if (!stackTrace || !stackTrace.length)
+ return null;
+ var index = 0;
+ if (WebInspector.experimentsSettings.frameworksDebuggingSupport.isEnabled()) {
+ while (index < stackTrace.length && WebInspector.BlackboxSupport.isBlackboxedURL(stackTrace[index].url))
+ ++index;
+ if (index >= stackTrace.length)
+ index = 0;
+ }
+ var callFrame = stackTrace[index];
+ if (disallowUnknownSource && !callFrame.scriptId)
+ return null;
+ return this.linkifyConsoleCallFrame(target, callFrame, classes);
+ },
+
+ /**
* @param {!WebInspector.CSSLocation} rawLocation
* @param {string=} classes
* @return {?Element}
@@ -200,7 +226,7 @@ WebInspector.Linkifier.prototype = {
var liveLocation = WebInspector.cssWorkspaceBinding.createLiveLocation(rawLocation, this._updateAnchor.bind(this, anchor));
if (!liveLocation)
return null;
- this._liveLocationsByTarget.get(rawLocation.target()).push({anchor: anchor, location: liveLocation});
+ this._liveLocationsByTarget.get(rawLocation.target()).push({ anchor: anchor, location: liveLocation });
return anchor;
},

Powered by Google App Engine
This is Rietveld 408576698