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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 WebInspector.SourceFrame._lineClassPerLevel[WebInspector.ConsoleMessage.MessageL
evel.Warning] = "text-editor-line-with-warning"; | 753 WebInspector.SourceFrame._lineClassPerLevel[WebInspector.ConsoleMessage.MessageL
evel.Warning] = "text-editor-line-with-warning"; |
754 | 754 |
755 /** | 755 /** |
756 * @constructor | 756 * @constructor |
757 * @param {!WebInspector.ConsoleMessage} consoleMessage | 757 * @param {!WebInspector.ConsoleMessage} consoleMessage |
758 */ | 758 */ |
759 WebInspector.SourceFrame.RowMessage = function(consoleMessage) | 759 WebInspector.SourceFrame.RowMessage = function(consoleMessage) |
760 { | 760 { |
761 this._consoleMessage = consoleMessage; | 761 this._consoleMessage = consoleMessage; |
762 this._repeatCount = 1; | 762 this._repeatCount = 1; |
763 this.element = document.createElementWithClass("div", "text-editor-row-messa
ge"); | 763 this.element = createElementWithClass("div", "text-editor-row-message"); |
764 this._icon = this.element.createChild("span", "text-editor-row-message-icon"
); | 764 this._icon = this.element.createChild("span", "text-editor-row-message-icon"
); |
765 this._icon.classList.add(WebInspector.SourceFrame._iconClassPerLevel[console
Message.level]); | 765 this._icon.classList.add(WebInspector.SourceFrame._iconClassPerLevel[console
Message.level]); |
766 this._repeatCountElement = this.element.createChild("span", "bubble-repeat-c
ount hidden error"); | 766 this._repeatCountElement = this.element.createChild("span", "bubble-repeat-c
ount hidden error"); |
767 var linesContainer = this.element.createChild("div", "text-editor-row-messag
e-lines"); | 767 var linesContainer = this.element.createChild("div", "text-editor-row-messag
e-lines"); |
768 var lines = this._consoleMessage.messageText.split("\n"); | 768 var lines = this._consoleMessage.messageText.split("\n"); |
769 for (var i = 0; i < lines.length; ++i) { | 769 for (var i = 0; i < lines.length; ++i) { |
770 var messageLine = linesContainer.createChild("div"); | 770 var messageLine = linesContainer.createChild("div"); |
771 messageLine.textContent = lines[i]; | 771 messageLine.textContent = lines[i]; |
772 } | 772 } |
773 } | 773 } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 * @constructor | 810 * @constructor |
811 * @param {!WebInspector.SourceFrame} sourceFrame | 811 * @param {!WebInspector.SourceFrame} sourceFrame |
812 * @param {!WebInspector.TextEditor} textEditor | 812 * @param {!WebInspector.TextEditor} textEditor |
813 * @param {number} lineNumber | 813 * @param {number} lineNumber |
814 */ | 814 */ |
815 WebInspector.SourceFrame.RowMessageBucket = function(sourceFrame, textEditor, li
neNumber) | 815 WebInspector.SourceFrame.RowMessageBucket = function(sourceFrame, textEditor, li
neNumber) |
816 { | 816 { |
817 this._sourceFrame = sourceFrame; | 817 this._sourceFrame = sourceFrame; |
818 this._textEditor = textEditor; | 818 this._textEditor = textEditor; |
819 this._lineHandle = textEditor.textEditorPositionHandle(lineNumber, 0); | 819 this._lineHandle = textEditor.textEditorPositionHandle(lineNumber, 0); |
820 this._decoration = document.createElementWithClass("div", "text-editor-line-
decoration"); | 820 this._decoration = createElementWithClass("div", "text-editor-line-decoratio
n"); |
821 this._decoration._messageBucket = this; | 821 this._decoration._messageBucket = this; |
822 this._wave = this._decoration.createChild("div", "text-editor-line-decoratio
n-wave"); | 822 this._wave = this._decoration.createChild("div", "text-editor-line-decoratio
n-wave"); |
823 this._icon = this._wave.createChild("div", "text-editor-line-decoration-icon
"); | 823 this._icon = this._wave.createChild("div", "text-editor-line-decoration-icon
"); |
824 | 824 |
825 this._textEditor.addDecoration(lineNumber, this._decoration); | 825 this._textEditor.addDecoration(lineNumber, this._decoration); |
826 | 826 |
827 this._messagesDescriptionElement = document.createElementWithClass("div", "t
ext-editor-messages-description-container"); | 827 this._messagesDescriptionElement = createElementWithClass("div", "text-edito
r-messages-description-container"); |
828 /** @type {!Array.<!WebInspector.SourceFrame.RowMessage>} */ | 828 /** @type {!Array.<!WebInspector.SourceFrame.RowMessage>} */ |
829 this._messages = []; | 829 this._messages = []; |
830 | 830 |
831 this._updateDecorationPosition(); | 831 this._updateDecorationPosition(); |
832 | 832 |
833 this._level = null; | 833 this._level = null; |
834 } | 834 } |
835 | 835 |
836 WebInspector.SourceFrame.RowMessageBucket.prototype = { | 836 WebInspector.SourceFrame.RowMessageBucket.prototype = { |
837 _updateDecorationPosition: function() | 837 _updateDecorationPosition: function() |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 | 1006 |
1007 /** | 1007 /** |
1008 * @param {?WebInspector.TextRange} from | 1008 * @param {?WebInspector.TextRange} from |
1009 * @param {?WebInspector.TextRange} to | 1009 * @param {?WebInspector.TextRange} to |
1010 */ | 1010 */ |
1011 onJumpToPosition: function(from, to) | 1011 onJumpToPosition: function(from, to) |
1012 { | 1012 { |
1013 this._sourceFrame.onJumpToPosition(from, to); | 1013 this._sourceFrame.onJumpToPosition(from, to); |
1014 } | 1014 } |
1015 } | 1015 } |
OLD | NEW |