Chromium Code Reviews| OLD | NEW |
|---|---|
| 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://history/browser_service.html"> | 4 <link rel="import" href="chrome://history/browser_service.html"> |
|
tsergeant
2016/08/09 23:20:00
Nit: I think you can remove this
calamity
2016/08/10 04:25:38
Done.
| |
| 5 <link rel="import" href="chrome://history/constants.html"> | 5 <link rel="import" href="chrome://history/constants.html"> |
| 6 <link rel="import" href="chrome://history/history_item.html"> | 6 <link rel="import" href="chrome://history/history_item.html"> |
| 7 <link rel="import" href="chrome://history/history_list_behavior.html"> | |
| 7 <link rel="import" href="chrome://history/shared_style.html"> | 8 <link rel="import" href="chrome://history/shared_style.html"> |
| 8 | 9 |
| 9 <dom-module id="history-list"> | 10 <dom-module id="history-list"> |
| 10 <template> | 11 <template> |
| 11 <style include="shared-style"> | 12 <style include="shared-style"> |
| 12 :host { | 13 :host { |
| 13 display: block; | 14 display: block; |
| 14 } | 15 } |
| 15 | 16 |
| 16 #infinite-list { | 17 #infinite-list { |
| 17 height: 100%; | 18 height: 100%; |
| 18 } | 19 } |
| 19 | 20 |
| 20 history-item { | 21 history-item { |
| 21 --history-item-padding-side: var(--card-padding-side); | 22 --history-item-padding-side: var(--card-padding-side); |
| 22 } | 23 } |
| 23 </style> | 24 </style> |
| 24 <div id="no-results" class="centered-message" | 25 <div id="no-results" class="centered-message" |
| 25 hidden$="[[hasResults(historyData_.length)]]"> | 26 hidden$="[[hasResults(historyData_.length)]]"> |
| 26 {{noResultsMessage_(searchedTerm, querying)}} | 27 {{noResultsMessage(searchedTerm, querying)}} |
| 27 </div> | 28 </div> |
| 28 <iron-list items="{{historyData_}}" as="item" id="infinite-list" | 29 <iron-list items="{{historyData_}}" as="item" id="infinite-list" |
| 29 hidden$="[[!hasResults(historyData_.length)]]"> | 30 hidden$="[[!hasResults(historyData_.length)]]"> |
| 30 <template> | 31 <template> |
| 31 <history-item item="[[item]]" | 32 <history-item item="[[item]]" |
| 32 starred="[[item.starred]]" | 33 starred="[[item.starred]]" |
| 33 selected="{{item.selected}}" | 34 selected="{{item.selected}}" |
| 34 is-first-item="[[isFirstItem_(index)]]" | 35 is-first-item="[[isFirstItem_(index)]]" |
| 35 is-card-start="[[isCardStart_(item, index, historyData_.length)]]" | 36 is-card-start="[[isCardStart_(item, index, historyData_.length)]]" |
| 36 is-card-end="[[isCardEnd_(item, index, historyData_.length)]]" | 37 is-card-end="[[isCardEnd_(item, index, historyData_.length)]]" |
| 37 has-time-gap="[[needsTimeGap_(item, index, historyData_.length)]]" | 38 has-time-gap="[[needsTimeGap_(item, index, historyData_.length)]]" |
| 38 search-term="[[searchedTerm]]" | 39 search-term="[[searchedTerm]]" |
| 39 number-of-items="[[historyData_.length]]"> | 40 number-of-items="[[historyData_.length]]" |
| 41 path="[[pathForItem_(index)]]"> | |
| 40 </history-item> | 42 </history-item> |
| 41 </template> | 43 </template> |
| 42 </iron-list> | 44 </iron-list> |
| 43 <iron-scroll-threshold id="scroll-threshold" scroll-target="infinite-list" | 45 <iron-scroll-threshold id="scroll-threshold" scroll-target="infinite-list" |
| 44 lower-threshold="500" on-lower-threshold="loadMoreData_"> | 46 lower-threshold="500" on-lower-threshold="loadMoreData_"> |
| 45 </iron-scroll-threshold> | 47 </iron-scroll-threshold> |
| 46 </template> | 48 </template> |
| 47 <script src="chrome://history/history_list.js"></script> | 49 <script src="chrome://history/history_list.js"></script> |
| 48 </dom-module> | 50 </dom-module> |
| OLD | NEW |