Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(724)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js

Issue 2703143002: [DevTools] Prepare to move Popover to shadow DOM. (Closed)
Patch Set: fix Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 SourceFrame.UISourceCodeFrame.RowMessage = class { 487 SourceFrame.UISourceCodeFrame.RowMessage = class {
488 /** 488 /**
489 * @param {!Workspace.UISourceCode.Message} message 489 * @param {!Workspace.UISourceCode.Message} message
490 */ 490 */
491 constructor(message) { 491 constructor(message) {
492 this._message = message; 492 this._message = message;
493 this._repeatCount = 1; 493 this._repeatCount = 1;
494 this.element = createElementWithClass('div', 'text-editor-row-message'); 494 this.element = createElementWithClass('div', 'text-editor-row-message');
495 this._icon = this.element.createChild('label', '', 'dt-icon-label'); 495 this._icon = this.element.createChild('label', '', 'dt-icon-label');
496 this._icon.type = SourceFrame.UISourceCodeFrame._iconClassPerLevel[message.l evel()]; 496 this._icon.type = SourceFrame.UISourceCodeFrame._iconClassPerLevel[message.l evel()];
497 this._repeatCountElement = this.element.createChild('label', 'message-repeat -count hidden', 'dt-small-bubble'); 497 this._repeatCountElement =
498 this.element.createChild('label', 'text-editor-row-message-repeat-count hidden', 'dt-small-bubble');
498 this._repeatCountElement.type = SourceFrame.UISourceCodeFrame._bubbleTypePer Level[message.level()]; 499 this._repeatCountElement.type = SourceFrame.UISourceCodeFrame._bubbleTypePer Level[message.level()];
499 var linesContainer = this.element.createChild('div', 'text-editor-row-messag e-lines'); 500 var linesContainer = this.element.createChild('div');
500 var lines = this._message.text().split('\n'); 501 var lines = this._message.text().split('\n');
501 for (var i = 0; i < lines.length; ++i) { 502 for (var i = 0; i < lines.length; ++i) {
502 var messageLine = linesContainer.createChild('div'); 503 var messageLine = linesContainer.createChild('div');
503 messageLine.textContent = lines[i]; 504 messageLine.textContent = lines[i];
504 } 505 }
505 } 506 }
506 507
507 /** 508 /**
508 * @return {!Workspace.UISourceCode.Message} 509 * @return {!Workspace.UISourceCode.Message}
509 */ 510 */
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 this.textEditor.removeDecoration(this._decoration, lineNumber); 573 this.textEditor.removeDecoration(this._decoration, lineNumber);
573 this._hasDecoration = true; 574 this._hasDecoration = true;
574 this.textEditor.addDecoration(this._decoration, lineNumber, Math.max(columnN umber - 1, lineIndent)); 575 this.textEditor.addDecoration(this._decoration, lineNumber, Math.max(columnN umber - 1, lineIndent));
575 } 576 }
576 577
577 /** 578 /**
578 * @return {!Element} 579 * @return {!Element}
579 */ 580 */
580 messagesDescription() { 581 messagesDescription() {
581 this._messagesDescriptionElement.removeChildren(); 582 this._messagesDescriptionElement.removeChildren();
583 UI.appendStyle(this._messagesDescriptionElement, 'source_frame/messagesPopov er.css');
582 for (var i = 0; i < this._messages.length; ++i) 584 for (var i = 0; i < this._messages.length; ++i)
583 this._messagesDescriptionElement.appendChild(this._messages[i].element); 585 this._messagesDescriptionElement.appendChild(this._messages[i].element);
584 586
585 return this._messagesDescriptionElement; 587 return this._messagesDescriptionElement;
586 } 588 }
587 589
588 detachFromEditor() { 590 detachFromEditor() {
589 var position = this._lineHandle.resolve(); 591 var position = this._lineHandle.resolve();
590 if (!position) 592 if (!position)
591 return; 593 return;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 678
677 /** 679 /**
678 * @param {!Workspace.UISourceCode.Message} a 680 * @param {!Workspace.UISourceCode.Message} a
679 * @param {!Workspace.UISourceCode.Message} b 681 * @param {!Workspace.UISourceCode.Message} b
680 * @return {number} 682 * @return {number}
681 */ 683 */
682 Workspace.UISourceCode.Message.messageLevelComparator = function(a, b) { 684 Workspace.UISourceCode.Message.messageLevelComparator = function(a, b) {
683 return Workspace.UISourceCode.Message._messageLevelPriority[a.level()] - 685 return Workspace.UISourceCode.Message._messageLevelPriority[a.level()] -
684 Workspace.UISourceCode.Message._messageLevelPriority[b.level()]; 686 Workspace.UISourceCode.Message._messageLevelPriority[b.level()];
685 }; 687 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698