| Index: chrome/browser/resources/file_manager/js/file_manager.js
|
| diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
|
| index bab9f52f63461b1926f4842ff5da24d03234bd5a..eca548ba91b6bb62dd64f189c2207d8d4ba320dd 100644
|
| --- a/chrome/browser/resources/file_manager/js/file_manager.js
|
| +++ b/chrome/browser/resources/file_manager/js/file_manager.js
|
| @@ -70,50 +70,6 @@ var DialogType = {
|
| };
|
|
|
| /**
|
| - * TextMeasure constructor.
|
| - *
|
| - * TextMeasure is a measure for text that returns the width of text. This
|
| - * class has a dummy span element. When measuring the width of text, it sets
|
| - * the text to the element and obtains the element's size by
|
| - * getBoundingClientRect.
|
| - *
|
| - * @constructor
|
| - * @param {HTMLElement} element Element that has styles of measured text. The
|
| - * width of text is mesures like as it is rendered in this element.
|
| - */
|
| -var TextMeasure = function(element) {
|
| - var doc = element.ownerDocument;
|
| - this.dummySpan_ = doc.createElement('span');
|
| - this.dummySpan_ = doc.getElementsByTagName('body')[0].
|
| - appendChild(this.dummySpan_);
|
| - this.dummySpan_.style.position = 'absolute';
|
| - this.dummySpan_.style.visibility = 'hidden';
|
| - var styles = window.getComputedStyle(element, '');
|
| - var stylesToBeCopied = [
|
| - 'fontSize',
|
| - 'fontStyle',
|
| - 'fontWeight',
|
| - 'fontFamily',
|
| - 'letterSpacing'
|
| - ];
|
| - for (var i = 0; i < stylesToBeCopied.length; i++) {
|
| - this.dummySpan_.style[stylesToBeCopied[i]] = styles[stylesToBeCopied[i]];
|
| - }
|
| -};
|
| -
|
| -/**
|
| - * Measures the widht of text.
|
| - *
|
| - * @param {string} text Text that is measured the width.
|
| - * @return {number} Width of the specified text.
|
| - */
|
| -TextMeasure.prototype.getWidth = function(text) {
|
| - this.dummySpan_.innerText = text;
|
| - var rect = this.dummySpan_.getBoundingClientRect();
|
| - return rect ? rect.width : 0;
|
| -};
|
| -
|
| -/**
|
| * @param {string} type Dialog type.
|
| * @return {boolean} Whether the type is modal.
|
| */
|
|
|