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

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

Issue 2119113002: MD History: Fix item sizing in small windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
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 cr.define('md_history', function() { 5 cr.define('md_history', function() {
6 var HistoryItem = Polymer({ 6 var HistoryItem = Polymer({
7 is: 'history-item', 7 is: 'history-item',
8 8
9 properties: { 9 properties: {
10 // Underlying HistoryEntry data for this item. Contains read-only fields 10 // Underlying HistoryEntry data for this item. Contains read-only fields
11 // from the history backend, as well as fields computed by history-list. 11 // from the history backend, as well as fields computed by history-list.
12 item: {type: Object, observer: 'showIcon_'}, 12 item: {type: Object, observer: 'showIcon_'},
13 13
14 // True if the website is a bookmarked page. 14 // True if the website is a bookmarked page.
15 starred: {type: Boolean, reflectToAttribute: true}, 15 starred: {type: Boolean, reflectToAttribute: true},
16 16
17 // Search term used to obtain this history-item. 17 // Search term used to obtain this history-item.
18 searchTerm: {type: String}, 18 searchTerm: {type: String},
19 19
20 selected: {type: Boolean, notify: true}, 20 selected: {type: Boolean, notify: true},
21 21
22 isFirstItem: {type: Boolean, reflectToAttribute: true}, 22 isFirstItem: {type: Boolean, reflectToAttribute: true},
23 23
24 isCardStart: {type: Boolean, reflectToAttribute: true}, 24 isCardStart: {type: Boolean, reflectToAttribute: true},
25 25
26 isCardEnd: {type: Boolean, reflectToAttribute: true}, 26 isCardEnd: {type: Boolean, reflectToAttribute: true},
27 27
28 // True if the item is being displayed embedded in another element and
29 // should not manage its own borders or size.
30 embedded: {type: Boolean, reflectToAttribute: true},
31
28 hasTimeGap: {type: Boolean}, 32 hasTimeGap: {type: Boolean},
29 33
30 numberOfItems: {type: Number} 34 numberOfItems: {type: Number}
31 }, 35 },
32 36
33 /** 37 /**
34 * When a history-item is selected the toolbar is notified and increases 38 * When a history-item is selected the toolbar is notified and increases
35 * or decreases its count of selected items accordingly. 39 * or decreases its count of selected items accordingly.
36 * @private 40 * @private
37 */ 41 */
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 128
125 if (searchedTerm) 129 if (searchedTerm)
126 return currentItem.dateShort != nextItem.dateShort; 130 return currentItem.dateShort != nextItem.dateShort;
127 131
128 return currentItem.time - nextItem.time > BROWSING_GAP_TIME && 132 return currentItem.time - nextItem.time > BROWSING_GAP_TIME &&
129 currentItem.dateRelativeDay == nextItem.dateRelativeDay; 133 currentItem.dateRelativeDay == nextItem.dateRelativeDay;
130 }; 134 };
131 135
132 return { HistoryItem: HistoryItem }; 136 return { HistoryItem: HistoryItem };
133 }); 137 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/history_item.html ('k') | chrome/browser/resources/md_history/shared_style.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698