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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/ObjectPopoverHelper.js

Issue 2151653005: DevTools: Do not linkify to pseudo (program) node when there's no URL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments. Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 var rawLocation = response.location; 97 var rawLocation = response.location;
98 var linkContainer = title.createChild("div", "function-title-link-co ntainer"); 98 var linkContainer = title.createChild("div", "function-title-link-co ntainer");
99 if (rawLocation && Runtime.experiments.isEnabled("continueToFirstInv ocation")) { 99 if (rawLocation && Runtime.experiments.isEnabled("continueToFirstInv ocation")) {
100 var sectionToolbar = new WebInspector.Toolbar("function-location -step-into", linkContainer); 100 var sectionToolbar = new WebInspector.Toolbar("function-location -step-into", linkContainer);
101 var stepInto = new WebInspector.ToolbarButton(WebInspector.UIStr ing("Continue to first invocation"), "step-in-toolbar-item"); 101 var stepInto = new WebInspector.ToolbarButton(WebInspector.UIStr ing("Continue to first invocation"), "step-in-toolbar-item");
102 stepInto.addEventListener("click", () => rawLocation.continueToL ocation()); 102 stepInto.addEventListener("click", () => rawLocation.continueToL ocation());
103 sectionToolbar.appendToolbarItem(stepInto); 103 sectionToolbar.appendToolbarItem(stepInto);
104 } 104 }
105 var sourceURL = rawLocation && rawLocation.script() ? rawLocation.sc ript().sourceURL : null; 105 var sourceURL = rawLocation && rawLocation.script() ? rawLocation.sc ript().sourceURL : null;
106 if (rawLocation && sourceURL) { 106 if (rawLocation && sourceURL)
107 var link = this._lazyLinkifier().linkifyRawLocation(rawLocation, sourceURL); 107 linkContainer.appendChild(this._lazyLinkifier().linkifyRawLocati on(rawLocation, sourceURL));
108 linkContainer.appendChild(link);
109 }
110 container.appendChild(popoverContentElement); 108 container.appendChild(popoverContentElement);
111 popover.showForAnchor(container, anchorElement); 109 popover.showForAnchor(container, anchorElement);
112 } 110 }
113 111
114 /** 112 /**
115 * @param {!WebInspector.RemoteObject} result 113 * @param {!WebInspector.RemoteObject} result
116 * @param {boolean} wasThrown 114 * @param {boolean} wasThrown
117 * @param {!Element=} anchorOverride 115 * @param {!Element=} anchorOverride
118 * @this {WebInspector.ObjectPopoverHelper} 116 * @this {WebInspector.ObjectPopoverHelper}
119 */ 117 */
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 */ 193 */
196 _lazyLinkifier: function() 194 _lazyLinkifier: function()
197 { 195 {
198 if (!this._linkifier) 196 if (!this._linkifier)
199 this._linkifier = new WebInspector.Linkifier(); 197 this._linkifier = new WebInspector.Linkifier();
200 return this._linkifier; 198 return this._linkifier;
201 }, 199 },
202 200
203 __proto__: WebInspector.PopoverHelper.prototype 201 __proto__: WebInspector.PopoverHelper.prototype
204 } 202 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698