OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) IBM Corp. 2009 All rights reserved. | 3 * Copyright (C) IBM Corp. 2009 All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 22 matching lines...) Expand all Loading... |
33 * @param {!WebInspector.ContentProvider} resource | 33 * @param {!WebInspector.ContentProvider} resource |
34 */ | 34 */ |
35 WebInspector.ResourceSourceFrame = function(resource) | 35 WebInspector.ResourceSourceFrame = function(resource) |
36 { | 36 { |
37 this._resource = resource; | 37 this._resource = resource; |
38 this._messages = []; | 38 this._messages = []; |
39 WebInspector.SourceFrame.call(this, resource); | 39 WebInspector.SourceFrame.call(this, resource); |
40 } | 40 } |
41 | 41 |
42 WebInspector.ResourceSourceFrame.prototype = { | 42 WebInspector.ResourceSourceFrame.prototype = { |
43 /** | |
44 * @param {!WebInspector.ConsoleMessage} message | |
45 */ | |
46 addPersistentMessage: function(message) | |
47 { | |
48 this._messages.push(message); | |
49 if (this.loaded) | |
50 this.addMessageToSource(WebInspector.SourceFrameMessage.fromConsoleM
essage(message, message.line - 1, message.column)); | |
51 }, | |
52 | |
53 /** | |
54 * @override | |
55 */ | |
56 onTextEditorContentLoaded: function() | |
57 { | |
58 for (var message of this._messages) | |
59 this.addMessageToSource(WebInspector.SourceFrameMessage.fromConsoleM
essage(message, message.line - 1, message.column)); | |
60 }, | |
61 | |
62 get resource() | 43 get resource() |
63 { | 44 { |
64 return this._resource; | 45 return this._resource; |
65 }, | 46 }, |
66 | 47 |
67 populateTextAreaContextMenu: function(contextMenu, lineNumber, columnNumber) | 48 populateTextAreaContextMenu: function(contextMenu, lineNumber, columnNumber) |
68 { | 49 { |
69 contextMenu.appendApplicableItems(this._resource); | 50 contextMenu.appendApplicableItems(this._resource); |
70 }, | 51 }, |
71 | 52 |
(...skipping 25 matching lines...) Expand all Loading... |
97 /** | 78 /** |
98 * @param {?string} content | 79 * @param {?string} content |
99 */ | 80 */ |
100 _contentLoaded: function(content) | 81 _contentLoaded: function(content) |
101 { | 82 { |
102 this._content.textContent = content; | 83 this._content.textContent = content; |
103 }, | 84 }, |
104 | 85 |
105 __proto__: WebInspector.VBox.prototype | 86 __proto__: WebInspector.VBox.prototype |
106 } | 87 } |
OLD | NEW |