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

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

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 <link rel="import" href="chrome://resources/html/polymer.html"> 1 <link rel="import" href="chrome://resources/html/polymer.html">
2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm l"> 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm l">
3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-scroll-threshold/i ron-scroll-threshold.html"> 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-scroll-threshold/i ron-scroll-threshold.html">
4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h tml"> 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h tml">
5 <link rel="import" href="chrome://resources/cr_elements/cr_shared_menu/cr_shared _menu.html"> 5 <link rel="import" href="chrome://resources/cr_elements/cr_shared_menu/cr_shared _menu.html">
6 <link rel="import" href="chrome://history/browser_service.html"> 6 <link rel="import" href="chrome://history/browser_service.html">
7 <link rel="import" href="chrome://history/constants.html"> 7 <link rel="import" href="chrome://history/constants.html">
8 <link rel="import" href="chrome://history/history_item.html"> 8 <link rel="import" href="chrome://history/history_item.html">
9 <link rel="import" href="chrome://history/shared_style.html"> 9 <link rel="import" href="chrome://history/shared_style.html">
10 10
11 <dom-module id="history-list"> 11 <dom-module id="history-list">
12 <template> 12 <template>
13 <style include="shared-style"> 13 <style include="shared-style">
14 :host { 14 :host {
15 display: flex; 15 display: block;
16 flex-direction: column;
17 position: relative;
18 } 16 }
19 17
20 #infinite-list { 18 #infinite-list {
21 flex: 1; 19 height: 100%;
22 padding-top: var(--first-card-padding-top);
23 } 20 }
24 21
25 paper-item { 22 paper-item {
26 -webkit-user-select: none; 23 -webkit-user-select: none;
27 cursor: pointer; 24 cursor: pointer;
28 font: inherit; 25 font: inherit;
29 } 26 }
30 27
31 paper-item:hover { 28 paper-item:hover {
32 background: #eaeaea; 29 background: #eaeaea;
33 } 30 }
34 31
35 history-item { 32 history-item {
36 --history-item-padding-side: var(--card-padding-side); 33 --history-item-padding-side: var(--card-padding-side);
37 } 34 }
38 </style> 35 </style>
39 <div id="no-results" class="centered-message" 36 <div id="no-results" class="centered-message"
40 hidden$="[[hasResults(historyData_.length)]]"> 37 hidden$="[[hasResults(historyData_.length)]]">
41 {{noResultsMessage_(searchedTerm, querying)}} 38 {{noResultsMessage_(searchedTerm, querying)}}
42 </div> 39 </div>
43 <iron-list items="{{historyData_}}" as="item" id="infinite-list" 40 <iron-list items="{{historyData_}}" as="item" id="infinite-list"
44 hidden$="[[!hasResults(historyData_.length)]]"> 41 hidden$="[[!hasResults(historyData_.length)]]">
45 <template> 42 <template>
46 <history-item item="[[item]]" 43 <history-item item="[[item]]"
47 starred="[[item.starred]]" 44 starred="[[item.starred]]"
48 selected="{{item.selected}}" 45 selected="{{item.selected}}"
46 is-first-item="[[isFirstItem_(index)]]"
49 is-card-start="[[isCardStart_(item, index, historyData_.length)]]" 47 is-card-start="[[isCardStart_(item, index, historyData_.length)]]"
50 is-card-end="[[isCardEnd_(item, index, historyData_.length)]]" 48 is-card-end="[[isCardEnd_(item, index, historyData_.length)]]"
51 has-time-gap="[[needsTimeGap_(item, index, historyData_.length)]]" 49 has-time-gap="[[needsTimeGap_(item, index, historyData_.length)]]"
52 search-term="[[searchedTerm]]" 50 search-term="[[searchedTerm]]"
53 number-of-items="[[historyData_.length]]"> 51 number-of-items="[[historyData_.length]]">
54 </history-item> 52 </history-item>
55 </template> 53 </template>
56 </iron-list> 54 </iron-list>
57 <iron-scroll-threshold id="scroll-threshold" scroll-target="infinite-list" 55 <iron-scroll-threshold id="scroll-threshold" scroll-target="infinite-list"
58 lower-threshold="500" on-lower-threshold="loadMoreData_"> 56 lower-threshold="500" on-lower-threshold="loadMoreData_">
59 </iron-scroll-threshold> 57 </iron-scroll-threshold>
60 <cr-shared-menu id="sharedMenu"> 58 <cr-shared-menu id="sharedMenu">
61 <paper-item id="menuMoreButton" on-tap="onMoreFromSiteTap_"> 59 <paper-item id="menuMoreButton" on-tap="onMoreFromSiteTap_">
62 $i18n{moreFromSite} 60 $i18n{moreFromSite}
63 </paper-item> 61 </paper-item>
64 <paper-item id="menuRemoveButton" on-tap="onRemoveFromHistoryTap_"> 62 <paper-item id="menuRemoveButton" on-tap="onRemoveFromHistoryTap_">
65 $i18n{removeFromHistory} 63 $i18n{removeFromHistory}
66 </paper-item> 64 </paper-item>
67 </cr-shared-menu> 65 </cr-shared-menu>
68 </template> 66 </template>
69 <script src="chrome://history/history_list.js"></script> 67 <script src="chrome://history/history_list.js"></script>
70 </dom-module> 68 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698