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

Side by Side Diff: chrome/browser/resources/print_preview/print_preview_utils.js

Issue 10450022: Print Preview Print Destination Search Widget (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Set --bary flag Created 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 /** 5 /**
6 * @param {string} toTest The string to be tested. 6 * @param {string} toTest The string to be tested.
7 * @return {boolean} True if |toTest| contains only digits. Leading and trailing 7 * @return {boolean} True if |toTest| contains only digits. Leading and trailing
8 * whitespace is allowed. 8 * whitespace is allowed.
9 */ 9 */
10 function isInteger(toTest) { 10 function isInteger(toTest) {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 185 }
186 return pageRanges; 186 return pageRanges;
187 } 187 }
188 188
189 /** 189 /**
190 * Shows or hides an element. 190 * Shows or hides an element.
191 * @param {Element} element Element to show or hide. 191 * @param {Element} element Element to show or hide.
192 * @param {boolean} isVisible Whether the element should be visible or not. 192 * @param {boolean} isVisible Whether the element should be visible or not.
193 */ 193 */
194 function setIsVisible(element, isVisible) { 194 function setIsVisible(element, isVisible) {
195 element.style.display = isVisible ? '' : 'none'; 195 element.hidden = !isVisible;
196 } 196 }
197 197
198 /** 198 /**
199 * @param {Array.<object>} array Array to check for item. 199 * @param {!Array} array Array to check for item.
200 * @param {object} item Item to look for in array. 200 * @param {*} item Item to look for in array.
201 * @return {boolean} Whether the item is in the array. 201 * @return {boolean} Whether the item is in the array.
202 */ 202 */
203 function arrayContains(array, item) { 203 function arrayContains(array, item) {
204 return array.indexOf(item) != -1; 204 return array.indexOf(item) != -1;
205 } 205 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698