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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/EmptyWidget.js

Issue 2878543004: [DevTools] Fix UI.EmptyWidget scrollbars (Closed)
Patch Set: Fixed failing test Created 3 years, 7 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) 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 20 matching lines...) Expand all
31 /** 31 /**
32 * @unrestricted 32 * @unrestricted
33 */ 33 */
34 UI.EmptyWidget = class extends UI.VBox { 34 UI.EmptyWidget = class extends UI.VBox {
35 /** 35 /**
36 * @param {string} text 36 * @param {string} text
37 */ 37 */
38 constructor(text) { 38 constructor(text) {
39 super(); 39 super();
40 this.registerRequiredCSS('ui/emptyWidget.css'); 40 this.registerRequiredCSS('ui/emptyWidget.css');
41 this.element.classList.add('empty-view'); 41 this.element.classList.add('empty-view-scroller');
42 this.textElement = this.element.createChild('h2'); 42 this._panel = this.element.createChild('div', 'empty-view');
caseq 2017/05/20 00:49:05 nit: panel is a bit overloaded. _contentElement or
eostroukhov 2017/05/22 22:21:16 Done.
43 this.textElement = this._panel.createChild('h2');
caseq 2017/05/20 00:49:05 Can we make it private? I don't think it's used ou
eostroukhov 2017/05/22 22:21:16 Done.
43 this.textElement.textContent = text; 44 this.textElement.textContent = text;
44 } 45 }
45 46
46 /** 47 /**
47 * @return {!Element} 48 * @return {!Element}
48 */ 49 */
49 appendParagraph() { 50 appendParagraph() {
50 return this.element.createChild('p'); 51 return this._panel.createChild('p');
caseq 2017/05/20 00:49:05 Shouldn't this be under textElement?
eostroukhov 2017/05/22 22:21:16 I don't think so. textElement is a main text, that
51 } 52 }
52 53
53 /** 54 /**
54 * @param {string} text 55 * @param {string} text
55 */ 56 */
56 set text(text) { 57 set text(text) {
57 this.textElement.textContent = text; 58 this.textElement.textContent = text;
58 } 59 }
59 }; 60 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698