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

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

Issue 2073703002: MD History: Simplify flex layout in <history-list> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 4 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
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},
23
22 isCardStart: {type: Boolean, reflectToAttribute: true}, 24 isCardStart: {type: Boolean, reflectToAttribute: true},
23 25
24 isCardEnd: {type: Boolean, reflectToAttribute: true}, 26 isCardEnd: {type: Boolean, reflectToAttribute: true},
25 27
26 hasTimeGap: {type: Boolean}, 28 hasTimeGap: {type: Boolean},
27 29
28 numberOfItems: {type: Number} 30 numberOfItems: {type: Number}
29 }, 31 },
30 32
31 /** 33 /**
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 102
101 if (searchedTerm) 103 if (searchedTerm)
102 return currentItem.dateShort != nextItem.dateShort; 104 return currentItem.dateShort != nextItem.dateShort;
103 105
104 return currentItem.time - nextItem.time > BROWSING_GAP_TIME && 106 return currentItem.time - nextItem.time > BROWSING_GAP_TIME &&
105 currentItem.dateRelativeDay == nextItem.dateRelativeDay; 107 currentItem.dateRelativeDay == nextItem.dateRelativeDay;
106 }; 108 };
107 109
108 return { HistoryItem: HistoryItem }; 110 return { HistoryItem: HistoryItem };
109 }); 111 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698