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

Side by Side Diff: Source/devtools/front_end/console/ConsoleViewMessage.js

Issue 340483003: DevTools: [Console] Separate height caching from willHide event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: cacheHeight -> cacheFastHeight Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/ui/ViewportControl.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 wasShown: function() 77 wasShown: function()
78 { 78 {
79 for (var i = 0; this._dataGrids && i < this._dataGrids.length; ++i) { 79 for (var i = 0; this._dataGrids && i < this._dataGrids.length; ++i) {
80 var dataGrid = this._dataGrids[i]; 80 var dataGrid = this._dataGrids[i];
81 var parentElement = this._dataGridParents.get(dataGrid) || null; 81 var parentElement = this._dataGridParents.get(dataGrid) || null;
82 dataGrid.show(parentElement); 82 dataGrid.show(parentElement);
83 dataGrid.updateWidths(); 83 dataGrid.updateWidths();
84 } 84 }
85 }, 85 },
86 86
87 cacheFastHeight: function()
88 {
89 this._cachedHeight = this.contentElement().clientHeight;
90 },
91
87 willHide: function() 92 willHide: function()
88 { 93 {
89 this._cachedHeight = this.contentElement().clientHeight;
90 for (var i = 0; this._dataGrids && i < this._dataGrids.length; ++i) { 94 for (var i = 0; this._dataGrids && i < this._dataGrids.length; ++i) {
91 var dataGrid = this._dataGrids[i]; 95 var dataGrid = this._dataGrids[i];
92 this._dataGridParents.put(dataGrid, dataGrid.element.parentElement); 96 this._dataGridParents.put(dataGrid, dataGrid.element.parentElement);
93 dataGrid.detach(); 97 dataGrid.detach();
94 } 98 }
95 }, 99 },
96 100
97 /** 101 /**
98 * @return {number} 102 * @return {number}
99 */ 103 */
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 { 1241 {
1238 if (!this._wrapperElement) { 1242 if (!this._wrapperElement) {
1239 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this ); 1243 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this );
1240 this._wrapperElement.classList.toggle("collapsed", this._collapsed); 1244 this._wrapperElement.classList.toggle("collapsed", this._collapsed);
1241 } 1245 }
1242 return this._wrapperElement; 1246 return this._wrapperElement;
1243 }, 1247 },
1244 1248
1245 __proto__: WebInspector.ConsoleViewMessage.prototype 1249 __proto__: WebInspector.ConsoleViewMessage.prototype
1246 } 1250 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/ui/ViewportControl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698