OLD | NEW |
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 return; | 74 return; |
75 | 75 |
76 var container = document.createElement("div"); | 76 var container = document.createElement("div"); |
77 container.className = "inline-block"; | 77 container.className = "inline-block"; |
78 | 78 |
79 var title = container.createChild("div", "function-popover-title sou
rce-code"); | 79 var title = container.createChild("div", "function-popover-title sou
rce-code"); |
80 var functionName = title.createChild("span", "function-name"); | 80 var functionName = title.createChild("span", "function-name"); |
81 functionName.textContent = response.functionName || WebInspector.UIS
tring("(anonymous function)"); | 81 functionName.textContent = response.functionName || WebInspector.UIS
tring("(anonymous function)"); |
82 | 82 |
83 var rawLocation = response.location; | 83 var rawLocation = response.location; |
84 var link; | 84 var sourceURL = response.sourceURL; |
85 if (rawLocation) { | 85 if (rawLocation && sourceURL) { |
86 this._linkifier = new WebInspector.Linkifier(); | 86 this._linkifier = new WebInspector.Linkifier(); |
87 link = this._linkifier.linkifyRawLocation(rawLocation, "function
-location-link"); | 87 var link = this._linkifier.linkifyRawLocation(rawLocation, sourc
eURL, "function-location-link"); |
| 88 title.appendChild(link); |
88 } | 89 } |
89 if (link) | |
90 title.appendChild(link); | |
91 | 90 |
92 container.appendChild(popoverContentElement); | 91 container.appendChild(popoverContentElement); |
93 | |
94 popover.show(container, anchorElement); | 92 popover.show(container, anchorElement); |
95 } | 93 } |
96 | 94 |
97 /** | 95 /** |
98 * @param {!WebInspector.RemoteObject} result | 96 * @param {!WebInspector.RemoteObject} result |
99 * @param {boolean} wasThrown | 97 * @param {boolean} wasThrown |
100 * @param {!Element=} anchorOverride | 98 * @param {!Element=} anchorOverride |
101 * @this {WebInspector.ObjectPopoverHelper} | 99 * @this {WebInspector.ObjectPopoverHelper} |
102 */ | 100 */ |
103 function showObjectPopover(result, wasThrown, anchorOverride) | 101 function showObjectPopover(result, wasThrown, anchorOverride) |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 if (properties[i].value.description) | 179 if (properties[i].value.description) |
182 this._titleElement.textContent += "#" + properties[i].value.
description; | 180 this._titleElement.textContent += "#" + properties[i].value.
description; |
183 break; | 181 break; |
184 } | 182 } |
185 } | 183 } |
186 this._sectionUpdateProperties(properties, rootTreeElementConstructor, ro
otPropertyComparer); | 184 this._sectionUpdateProperties(properties, rootTreeElementConstructor, ro
otPropertyComparer); |
187 }, | 185 }, |
188 | 186 |
189 __proto__: WebInspector.PopoverHelper.prototype | 187 __proto__: WebInspector.PopoverHelper.prototype |
190 } | 188 } |
OLD | NEW |