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-input/iron-input.h tml"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-input/iron-input.h tml"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input -container.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input -container.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spi nner-lite.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spi nner-lite.html"> |
| 6 <link rel="import" href="chrome://resources/cr_elements/cr_search_field/cr_searc h_field_behavior.html"> | 6 <link rel="import" href="chrome://resources/cr_elements/cr_search_field/cr_searc h_field_behavior.html"> |
| 7 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 7 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 8 | 8 |
| 9 <dom-module id="cr-toolbar-search-field"> | 9 <dom-module id="cr-toolbar-search-field"> |
| 10 <template> | 10 <template> |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 /** Wide layout. */ | 83 /** Wide layout. */ |
| 84 :host(:not([narrow])) { | 84 :host(:not([narrow])) { |
| 85 -webkit-padding-end: 0; | 85 -webkit-padding-end: 0; |
| 86 background: rgba(0, 0, 0, 0.22); | 86 background: rgba(0, 0, 0, 0.22); |
| 87 border-radius: 2px; | 87 border-radius: 2px; |
| 88 cursor: text; | 88 cursor: text; |
| 89 width: var(--cr-toolbar-field-width); | 89 width: var(--cr-toolbar-field-width); |
| 90 } | 90 } |
| 91 | 91 |
| 92 :host(:not([narrow]):not([showing-search])) #icon, | 92 :host(:not([narrow]):not([showing-search])) #icon, |
| 93 :host(:not([narrow]):not([showing-search])) #prompt { | 93 :host(:not([narrow])) #prompt { |
| 94 opacity: 0.6; | 94 opacity: 0.6; |
| 95 } | 95 } |
| 96 | 96 |
| 97 :host([narrow]:not([showing-search])) paper-input-container { | 97 :host([narrow]:not([showing-search])) paper-input-container { |
| 98 display: none; | 98 display: none; |
| 99 } | 99 } |
| 100 | 100 |
| 101 /* Search open. */ | 101 /* Search open. */ |
| 102 :host([showing-search][spinner-active]) #icon { | 102 :host([showing-search][spinner-active]) #icon { |
| 103 opacity: 0; | 103 opacity: 0; |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 121 } | 121 } |
| 122 </style> | 122 </style> |
| 123 <paper-spinner-lite | 123 <paper-spinner-lite |
| 124 active="[[isSpinnerShown_(spinnerActive, showingSearch)]]"> | 124 active="[[isSpinnerShown_(spinnerActive, showingSearch)]]"> |
| 125 </paper-spinner-lite> | 125 </paper-spinner-lite> |
| 126 <paper-icon-button id="icon" icon="cr:search" title="[[label]]" | 126 <paper-icon-button id="icon" icon="cr:search" title="[[label]]" |
| 127 tabindex$="[[computeIconTabIndex_(narrow)]]"> | 127 tabindex$="[[computeIconTabIndex_(narrow)]]"> |
| 128 </paper-icon-button> | 128 </paper-icon-button> |
| 129 <paper-input-container id="searchTerm" on-search="onSearchTermSearch" | 129 <paper-input-container id="searchTerm" on-search="onSearchTermSearch" |
| 130 on-keydown="onSearchTermKeydown" no-label-float> | 130 on-keydown="onSearchTermKeydown" no-label-float> |
| 131 <label id="prompt" for="searchInput">[[label]]</label> | 131 <label id="prompt" for="searchInput"> |
|
tsergeant
2016/08/18 03:46:12
Nit: undo this change
calamity
2016/08/18 08:32:30
Done.
| |
| 132 [[label]] | |
| 133 </label> | |
| 132 <input is="iron-input" id="searchInput" type="search" | 134 <input is="iron-input" id="searchInput" type="search" |
| 133 on-blur="onInputBlur_" incremental></input> | 135 on-blur="onInputBlur_" incremental></input> |
| 134 </paper-input-container> | 136 </paper-input-container> |
| 135 <paper-icon-button icon="cr:cancel" id="clearSearch" | 137 <paper-icon-button icon="cr:cancel" id="clearSearch" |
| 136 title="[[clearLabel]]" hidden$="[[!hasSearchText_]]" | 138 title="[[clearLabel]]" hidden$="[[!hasSearchText_]]" |
| 137 on-tap="hideSearch_"> | 139 on-tap="hideSearch_"> |
| 138 </paper-icon-button> | 140 </paper-icon-button> |
| 139 </template> | 141 </template> |
| 140 <script src="cr_toolbar_search_field.js"></script> | 142 <script src="cr_toolbar_search_field.js"></script> |
| 141 </dom-module> | 143 </dom-module> |
| OLD | NEW |