| Index: ui/login/bubble.js
|
| diff --git a/ui/login/bubble.js b/ui/login/bubble.js
|
| index 1340f28213b8cf3706e5e4abb6e81bfa8614c727..b17e3d4d30eadcc228b8e63748cd3c426dc95314 100644
|
| --- a/ui/login/bubble.js
|
| +++ b/ui/login/bubble.js
|
| @@ -183,8 +183,8 @@ cr.define('cr.ui', function() {
|
| * @param {number=} opt_padding Optional padding of the bubble.
|
| */
|
| showContentForElement: function(el, attachment, opt_content,
|
| - opt_offset, opt_padding) {
|
| - /** @const */ var ARROW_OFFSET = 25;
|
| + opt_offset, opt_padding, opt_match_width) {
|
| + /** @const */ var ARROW_OFFSET = 0;
|
| /** @const */ var DEFAULT_PADDING = 18;
|
|
|
| if (opt_padding == undefined)
|
| @@ -237,6 +237,16 @@ cr.define('cr.ui', function() {
|
| break;
|
| }
|
| }
|
| + this.style.width = '';
|
| + this.removeAttribute('match-width');
|
| + if (opt_match_width) {
|
| + this.setAttribute('match-width', '');
|
| + var el_width = window.getComputedStyle(el, null).getPropertyValue('width');
|
| + var padding_left = parseInt(window.getComputedStyle(this, null).getPropertyValue('padding-left'));
|
| + var padding_right = parseInt(window.getComputedStyle(this, null).getPropertyValue('padding-right'));
|
| + if (el_width)
|
| + this.style.width = (parseInt(el_width) - padding_left - padding_right) + 'px';
|
| + }
|
|
|
| this.anchor_ = el;
|
| this.showContentAt_(pos, opt_content);
|
|
|