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

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/search_box.js

Issue 443333003: Show location, search button, and change-view button on the toolbar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: ui/file_manager/file_manager/foreground/js/ui/search_box.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/search_box.js b/ui/file_manager/file_manager/foreground/js/ui/search_box.js
index 70da0e5b20f4aef93671a7eee99eaea77c23a40c..5f5e2f515699f2acd775ca317b57440157baa142 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/search_box.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/search_box.js
@@ -35,13 +35,6 @@ function SearchBox(element) {
*/
this.clearButton = element.querySelector('.clear');
- /**
- * Text measure.
- * @type {TextMeasure}
- * @private
- */
- this.textMeasure_ = new TextMeasure(this.inputElement);
-
Object.freeze(this);
// Register events.
@@ -55,8 +48,6 @@ function SearchBox(element) {
this.inputElement.ownerDocument.addEventListener('dragend',
this.onDragEnd_.bind(this),
true);
- element.querySelector('.icon').addEventListener(
- 'click', this.onIconClick_.bind(this));
element.parentNode.appendChild(this.autocompleteList);
}
@@ -178,14 +169,6 @@ SearchBox.prototype.onKeyDown_ = function() {
};
/**
- * Handles a click event of the search icon.
- * @private
- */
-SearchBox.prototype.onIconClick_ = function() {
- this.inputElement.focus();
-};
-
-/**
* Handles a dragenter event and refuses a drag source of files.
* @param {DragEvent} event The dragenter event.
* @private
@@ -213,7 +196,4 @@ SearchBox.prototype.onDragEnd_ = function() {
SearchBox.prototype.updateStyles_ = function() {
this.element.classList.toggle('has-text',
!!this.inputElement.value);
- var width = this.textMeasure_.getWidth(this.inputElement.value) +
- 16 /* Extra space to allow leeway. */;
- this.inputElement.style.width = width + 'px';
};
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/ui/preview_panel.js ('k') | ui/file_manager/file_manager/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698