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

Side by Side Diff: chrome/browser/resources/md_history/history_list.js

Issue 2122103002: MD History: Resize iron-list after it is attached to the document (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Closure Created 4 years, 5 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
« no previous file with comments | « chrome/browser/resources/md_history/compiled_resources2.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 Polymer({ 5 Polymer({
6 is: 'history-list', 6 is: 'history-list',
7 7
8 properties: { 8 properties: {
9 // The search term for the current query. Set when the query returns. 9 // The search term for the current query. Set when the query returns.
10 searchedTerm: { 10 searchedTerm: {
(...skipping 14 matching lines...) Expand all
25 }, 25 },
26 }, 26 },
27 27
28 listeners: { 28 listeners: {
29 'infinite-list.scroll': 'closeMenu_', 29 'infinite-list.scroll': 'closeMenu_',
30 'tap': 'closeMenu_', 30 'tap': 'closeMenu_',
31 'toggle-menu': 'toggleMenu_', 31 'toggle-menu': 'toggleMenu_',
32 'remove-bookmark-stars': 'removeBookmarkStars_', 32 'remove-bookmark-stars': 'removeBookmarkStars_',
33 }, 33 },
34 34
35 /** @override */
36 attached: function() {
37 // It is possible (eg, when middle clicking the reload button) for all other
38 // resize events to fire before the list is attached and can be measured.
39 // Adding another resize here ensures it will get sized correctly.
40 /** @type {IronListElement} */(this.$['infinite-list']).notifyResize();
41 },
42
35 /** 43 /**
36 * Closes the overflow menu. 44 * Closes the overflow menu.
37 * @private 45 * @private
38 */ 46 */
39 closeMenu_: function() { 47 closeMenu_: function() {
40 /** @type {CrSharedMenuElement} */(this.$.sharedMenu).closeMenu(); 48 /** @type {CrSharedMenuElement} */(this.$.sharedMenu).closeMenu();
41 }, 49 },
42 50
43 /** 51 /**
44 * Opens the overflow menu unless the menu is already open and the same button 52 * Opens the overflow menu unless the menu is already open and the same button
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 273
266 /** 274 /**
267 * @param {number} index 275 * @param {number} index
268 * @return {boolean} 276 * @return {boolean}
269 * @private 277 * @private
270 */ 278 */
271 isFirstItem_: function(index) { 279 isFirstItem_: function(index) {
272 return index == 0; 280 return index == 0;
273 } 281 }
274 }); 282 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/compiled_resources2.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698