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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * | 10 * |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 extensions.forEach(extension => this._decorateTypeThrottled(extension.de
scriptor()["decoratorType"])); | 415 extensions.forEach(extension => this._decorateTypeThrottled(extension.de
scriptor()["decoratorType"])); |
416 }, | 416 }, |
417 | 417 |
418 __proto__: WebInspector.SourceFrame.prototype | 418 __proto__: WebInspector.SourceFrame.prototype |
419 } | 419 } |
420 | 420 |
421 WebInspector.UISourceCodeFrame._iconClassPerLevel = {}; | 421 WebInspector.UISourceCodeFrame._iconClassPerLevel = {}; |
422 WebInspector.UISourceCodeFrame._iconClassPerLevel[WebInspector.UISourceCode.Mess
age.Level.Error] = "error-icon"; | 422 WebInspector.UISourceCodeFrame._iconClassPerLevel[WebInspector.UISourceCode.Mess
age.Level.Error] = "error-icon"; |
423 WebInspector.UISourceCodeFrame._iconClassPerLevel[WebInspector.UISourceCode.Mess
age.Level.Warning] = "warning-icon"; | 423 WebInspector.UISourceCodeFrame._iconClassPerLevel[WebInspector.UISourceCode.Mess
age.Level.Warning] = "warning-icon"; |
424 | 424 |
| 425 WebInspector.UISourceCodeFrame._bubbleTypePerLevel = {}; |
| 426 WebInspector.UISourceCodeFrame._bubbleTypePerLevel[WebInspector.UISourceCode.Mes
sage.Level.Error] = "error"; |
| 427 WebInspector.UISourceCodeFrame._bubbleTypePerLevel[WebInspector.UISourceCode.Mes
sage.Level.Warning] = "warning"; |
| 428 |
425 WebInspector.UISourceCodeFrame._lineClassPerLevel = {}; | 429 WebInspector.UISourceCodeFrame._lineClassPerLevel = {}; |
426 WebInspector.UISourceCodeFrame._lineClassPerLevel[WebInspector.UISourceCode.Mess
age.Level.Error] = "text-editor-line-with-error"; | 430 WebInspector.UISourceCodeFrame._lineClassPerLevel[WebInspector.UISourceCode.Mess
age.Level.Error] = "text-editor-line-with-error"; |
427 WebInspector.UISourceCodeFrame._lineClassPerLevel[WebInspector.UISourceCode.Mess
age.Level.Warning] = "text-editor-line-with-warning"; | 431 WebInspector.UISourceCodeFrame._lineClassPerLevel[WebInspector.UISourceCode.Mess
age.Level.Warning] = "text-editor-line-with-warning"; |
428 | 432 |
429 /** | 433 /** |
430 * @interface | 434 * @interface |
431 */ | 435 */ |
432 WebInspector.UISourceCodeFrame.LineDecorator = function() { } | 436 WebInspector.UISourceCodeFrame.LineDecorator = function() { } |
433 | 437 |
434 WebInspector.UISourceCodeFrame.LineDecorator.prototype = { | 438 WebInspector.UISourceCodeFrame.LineDecorator.prototype = { |
435 /** | 439 /** |
436 * @param {!WebInspector.UISourceCode} uiSourceCode | 440 * @param {!WebInspector.UISourceCode} uiSourceCode |
437 * @param {!WebInspector.CodeMirrorTextEditor} textEditor | 441 * @param {!WebInspector.CodeMirrorTextEditor} textEditor |
438 */ | 442 */ |
439 decorate: function(uiSourceCode, textEditor) { } | 443 decorate: function(uiSourceCode, textEditor) { } |
440 } | 444 } |
441 | 445 |
442 /** | 446 /** |
443 * @constructor | 447 * @constructor |
444 * @param {!WebInspector.UISourceCode.Message} message | 448 * @param {!WebInspector.UISourceCode.Message} message |
445 */ | 449 */ |
446 WebInspector.UISourceCodeFrame.RowMessage = function(message) | 450 WebInspector.UISourceCodeFrame.RowMessage = function(message) |
447 { | 451 { |
448 this._message = message; | 452 this._message = message; |
449 this._repeatCount = 1; | 453 this._repeatCount = 1; |
450 this.element = createElementWithClass("div", "text-editor-row-message"); | 454 this.element = createElementWithClass("div", "text-editor-row-message"); |
451 this._icon = this.element.createChild("label", "", "dt-icon-label"); | 455 this._icon = this.element.createChild("label", "", "dt-icon-label"); |
452 this._icon.type = WebInspector.UISourceCodeFrame._iconClassPerLevel[message.
level()]; | 456 this._icon.type = WebInspector.UISourceCodeFrame._iconClassPerLevel[message.
level()]; |
453 this._repeatCountElement = this.element.createChild("span", "bubble-repeat-c
ount hidden error"); | 457 this._repeatCountElement = this.element.createChild("label", "message-repeat
-count hidden", "dt-small-bubble"); |
| 458 this._repeatCountElement.type = WebInspector.UISourceCodeFrame._bubbleTypePe
rLevel[message.level()]; |
454 var linesContainer = this.element.createChild("div", "text-editor-row-messag
e-lines"); | 459 var linesContainer = this.element.createChild("div", "text-editor-row-messag
e-lines"); |
455 var lines = this._message.text().split("\n"); | 460 var lines = this._message.text().split("\n"); |
456 for (var i = 0; i < lines.length; ++i) { | 461 for (var i = 0; i < lines.length; ++i) { |
457 var messageLine = linesContainer.createChild("div"); | 462 var messageLine = linesContainer.createChild("div"); |
458 messageLine.textContent = lines[i]; | 463 messageLine.textContent = lines[i]; |
459 } | 464 } |
460 } | 465 } |
461 | 466 |
462 WebInspector.UISourceCodeFrame.RowMessage.prototype = { | 467 WebInspector.UISourceCodeFrame.RowMessage.prototype = { |
463 /** | 468 /** |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 | 647 |
643 /** | 648 /** |
644 * @param {!WebInspector.UISourceCode.Message} a | 649 * @param {!WebInspector.UISourceCode.Message} a |
645 * @param {!WebInspector.UISourceCode.Message} b | 650 * @param {!WebInspector.UISourceCode.Message} b |
646 * @return {number} | 651 * @return {number} |
647 */ | 652 */ |
648 WebInspector.UISourceCode.Message.messageLevelComparator = function(a, b) | 653 WebInspector.UISourceCode.Message.messageLevelComparator = function(a, b) |
649 { | 654 { |
650 return WebInspector.UISourceCode.Message._messageLevelPriority[a.level()] -
WebInspector.UISourceCode.Message._messageLevelPriority[b.level()]; | 655 return WebInspector.UISourceCode.Message._messageLevelPriority[a.level()] -
WebInspector.UISourceCode.Message._messageLevelPriority[b.level()]; |
651 } | 656 } |
OLD | NEW |