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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 var container = createElementWithClass('div', 'object-popover-container'); | 91 var container = createElementWithClass('div', 'object-popover-container'); |
92 var title = container.createChild('div', 'function-popover-title source-co
de'); | 92 var title = container.createChild('div', 'function-popover-title source-co
de'); |
93 var functionName = title.createChild('span', 'function-name'); | 93 var functionName = title.createChild('span', 'function-name'); |
94 functionName.textContent = UI.beautifyFunctionName(response.functionName); | 94 functionName.textContent = UI.beautifyFunctionName(response.functionName); |
95 | 95 |
96 var rawLocation = response.location; | 96 var rawLocation = response.location; |
97 var linkContainer = title.createChild('div', 'function-title-link-containe
r'); | 97 var linkContainer = title.createChild('div', 'function-title-link-containe
r'); |
98 if (rawLocation && Runtime.experiments.isEnabled('continueToFirstInvocatio
n')) { | 98 if (rawLocation && Runtime.experiments.isEnabled('continueToFirstInvocatio
n')) { |
99 var sectionToolbar = new UI.Toolbar('function-location-step-into', linkC
ontainer); | 99 var sectionToolbar = new UI.Toolbar('function-location-step-into', linkC
ontainer); |
100 var stepInto = new UI.ToolbarButton(Common.UIString('Continue to first i
nvocation'), 'largeicon-step-in'); | 100 var stepInto = new UI.ToolbarButton(Common.UIString('Continue to first i
nvocation'), 'largeicon-step-in'); |
101 stepInto.addEventListener(UI.ToolbarButton.Events.Click, () => rawLocati
on.continueToLocation()); | 101 stepInto.addEventListener('click', () => rawLocation.continueToLocation(
)); |
102 sectionToolbar.appendToolbarItem(stepInto); | 102 sectionToolbar.appendToolbarItem(stepInto); |
103 } | 103 } |
104 var sourceURL = rawLocation && rawLocation.script() ? rawLocation.script()
.sourceURL : null; | 104 var sourceURL = rawLocation && rawLocation.script() ? rawLocation.script()
.sourceURL : null; |
105 if (rawLocation && sourceURL) | 105 if (rawLocation && sourceURL) |
106 linkContainer.appendChild(this._lazyLinkifier().linkifyRawLocation(rawLo
cation, sourceURL)); | 106 linkContainer.appendChild(this._lazyLinkifier().linkifyRawLocation(rawLo
cation, sourceURL)); |
107 container.appendChild(popoverContentElement); | 107 container.appendChild(popoverContentElement); |
108 popover.showForAnchor(container, anchorElement); | 108 popover.showForAnchor(container, anchorElement); |
109 } | 109 } |
110 | 110 |
111 /** | 111 /** |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 * @return {!Components.Linkifier} | 190 * @return {!Components.Linkifier} |
191 */ | 191 */ |
192 _lazyLinkifier() { | 192 _lazyLinkifier() { |
193 if (!this._linkifier) | 193 if (!this._linkifier) |
194 this._linkifier = new Components.Linkifier(); | 194 this._linkifier = new Components.Linkifier(); |
195 return this._linkifier; | 195 return this._linkifier; |
196 } | 196 } |
197 }; | 197 }; |
198 | 198 |
199 Components.ObjectPopoverHelper.MaxPopoverTextLength = 10000; | 199 Components.ObjectPopoverHelper.MaxPopoverTextLength = 10000; |
OLD | NEW |