OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
296 * @param {!Element} anchor | 296 * @param {!Element} anchor |
297 * @param {!Bindings.LiveLocation} liveLocation | 297 * @param {!Bindings.LiveLocation} liveLocation |
298 */ | 298 */ |
299 _updateAnchor(anchor, liveLocation) { | 299 _updateAnchor(anchor, liveLocation) { |
300 Components.Linkifier._unbindUILocation(anchor); | 300 Components.Linkifier._unbindUILocation(anchor); |
301 var uiLocation = liveLocation.uiLocation(); | 301 var uiLocation = liveLocation.uiLocation(); |
302 if (!uiLocation) | 302 if (!uiLocation) |
303 return; | 303 return; |
304 | 304 |
305 Components.Linkifier._bindUILocation(anchor, uiLocation); | 305 Components.Linkifier._bindUILocation(anchor, uiLocation); |
306 var text = uiLocation.linkText(); | |
307 var info = Components.Linkifier._linkInfo(anchor); | 306 var info = Components.Linkifier._linkInfo(anchor); |
308 info.originalLinkText = text; | 307 info.originalLinkText = uiLocation.linkText(true /* skipTrim */); |
309 text = text.replace(/([a-f0-9]{7})[a-f0-9]{13}[a-f0-9]*/g, '$1\u2026'); | 308 var text = info.originalLinkText.replace(/([a-f0-9]{7})[a-f0-9]{13}[a-f0-9]* /g, '$1\u2026'); |
allada
2017/03/28 01:13:08
This looks very strange to me. I believe it's sayi
luoe
2017/03/31 21:35:21
Done.
| |
310 if (this._maxLength) | 309 if (this._maxLength) |
311 text = text.trimMiddle(this._maxLength); | 310 text = text.trimMiddle(this._maxLength); |
312 anchor.textContent = text; | 311 anchor.textContent = text; |
313 | 312 |
314 var titleText = uiLocation.uiSourceCode.url(); | 313 var titleText = uiLocation.uiSourceCode.url(); |
315 if (typeof uiLocation.lineNumber === 'number') | 314 if (typeof uiLocation.lineNumber === 'number') |
316 titleText += ':' + (uiLocation.lineNumber + 1); | 315 titleText += ':' + (uiLocation.lineNumber + 1); |
317 anchor.title = titleText; | 316 anchor.title = titleText; |
318 anchor.classList.toggle('webkit-html-blackbox-link', liveLocation.isBlackbox ed()); | 317 anchor.classList.toggle('webkit-html-blackbox-link', liveLocation.isBlackbox ed()); |
319 Components.Linkifier._updateLinkDecorations(anchor); | 318 Components.Linkifier._updateLinkDecorations(anchor); |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
780 contextMenu.appendSeparator(); | 779 contextMenu.appendSeparator(); |
781 contextMenu.appendItem(Common.UIString('Save'), save.bind(null, false)); | 780 contextMenu.appendItem(Common.UIString('Save'), save.bind(null, false)); |
782 | 781 |
783 if (contentProvider instanceof Workspace.UISourceCode) { | 782 if (contentProvider instanceof Workspace.UISourceCode) { |
784 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (contentProvider ); | 783 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (contentProvider ); |
785 if (!uiSourceCode.project().canSetFileContent()) | 784 if (!uiSourceCode.project().canSetFileContent()) |
786 contextMenu.appendItem(Common.UIString.capitalize('Save ^as...'), save.b ind(null, true)); | 785 contextMenu.appendItem(Common.UIString.capitalize('Save ^as...'), save.b ind(null, true)); |
787 } | 786 } |
788 } | 787 } |
789 }; | 788 }; |
OLD | NEW |