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 588 matching lines...) Loading... |
599 lineNumber = 0; | 599 lineNumber = 0; |
600 | 600 |
601 var rowMessages = this._rowMessages[lineNumber]; | 601 var rowMessages = this._rowMessages[lineNumber]; |
602 if (!rowMessages) { | 602 if (!rowMessages) { |
603 rowMessages = []; | 603 rowMessages = []; |
604 this._rowMessages[lineNumber] = rowMessages; | 604 this._rowMessages[lineNumber] = rowMessages; |
605 } | 605 } |
606 | 606 |
607 for (var i = 0; i < rowMessages.length; ++i) { | 607 for (var i = 0; i < rowMessages.length; ++i) { |
608 if (rowMessages[i].consoleMessage.isEqual(msg)) { | 608 if (rowMessages[i].consoleMessage.isEqual(msg)) { |
609 rowMessages[i].repeatCount = msg.totalRepeatCount; | 609 rowMessages[i].repeatCount = msg.repeatCount; |
610 this._updateMessageRepeatCount(rowMessages[i]); | 610 this._updateMessageRepeatCount(rowMessages[i]); |
611 return; | 611 return; |
612 } | 612 } |
613 } | 613 } |
614 | 614 |
615 var rowMessage = { consoleMessage: msg }; | 615 var rowMessage = { consoleMessage: msg }; |
616 rowMessages.push(rowMessage); | 616 rowMessages.push(rowMessage); |
617 | 617 |
618 this._textEditor.beginUpdates(); | 618 this._textEditor.beginUpdates(); |
619 var messageBubbleElement = this._messageBubbles[lineNumber]; | 619 var messageBubbleElement = this._messageBubbles[lineNumber]; |
(...skipping 18 matching lines...) Loading... |
638 | 638 |
639 var messageLineElement = document.createElement("div"); | 639 var messageLineElement = document.createElement("div"); |
640 messageLineElement.className = "webkit-html-message-line"; | 640 messageLineElement.className = "webkit-html-message-line"; |
641 messageBubbleElement.appendChild(messageLineElement); | 641 messageBubbleElement.appendChild(messageLineElement); |
642 | 642 |
643 // Create the image element in the Inspector's document so we can use re
lative image URLs. | 643 // Create the image element in the Inspector's document so we can use re
lative image URLs. |
644 messageLineElement.appendChild(imageElement); | 644 messageLineElement.appendChild(imageElement); |
645 messageLineElement.appendChild(document.createTextNode(msg.messageText))
; | 645 messageLineElement.appendChild(document.createTextNode(msg.messageText))
; |
646 | 646 |
647 rowMessage.element = messageLineElement; | 647 rowMessage.element = messageLineElement; |
648 rowMessage.repeatCount = msg.totalRepeatCount; | 648 rowMessage.repeatCount = msg.repeatCount; |
649 this._updateMessageRepeatCount(rowMessage); | 649 this._updateMessageRepeatCount(rowMessage); |
650 this._textEditor.endUpdates(); | 650 this._textEditor.endUpdates(); |
651 }, | 651 }, |
652 | 652 |
653 _updateMessageRepeatCount: function(rowMessage) | 653 _updateMessageRepeatCount: function(rowMessage) |
654 { | 654 { |
655 if (rowMessage.repeatCount < 2) | 655 if (rowMessage.repeatCount < 2) |
656 return; | 656 return; |
657 | 657 |
658 if (!rowMessage.repeatCountElement) { | 658 if (!rowMessage.repeatCountElement) { |
(...skipping 179 matching lines...) Loading... |
838 | 838 |
839 /** | 839 /** |
840 * @param {?WebInspector.TextRange} from | 840 * @param {?WebInspector.TextRange} from |
841 * @param {?WebInspector.TextRange} to | 841 * @param {?WebInspector.TextRange} to |
842 */ | 842 */ |
843 onJumpToPosition: function(from, to) | 843 onJumpToPosition: function(from, to) |
844 { | 844 { |
845 this._sourceFrame.onJumpToPosition(from, to); | 845 this._sourceFrame.onJumpToPosition(from, to); |
846 } | 846 } |
847 } | 847 } |
OLD | NEW |