| Index: ui/login/login_ui_tools.js
|
| diff --git a/ui/login/login_ui_tools.js b/ui/login/login_ui_tools.js
|
| index 2759ceb7dd62e6badfe49d0476b9a174db7f46fe..d66d64b8c108eeccbe0fd8a7e37247c1f784f38f 100644
|
| --- a/ui/login/login_ui_tools.js
|
| +++ b/ui/login/login_ui_tools.js
|
| @@ -19,10 +19,25 @@ cr.define('cr.ui.LoginUITools', function() {
|
| element.getBoundingClientRect().top -
|
| parseInt(window.getComputedStyle(element).marginTop) -
|
| parseInt(window.getComputedStyle(element).marginBottom);
|
| - if (wholeWindow)
|
| + if (wholeWindow) {
|
| maxAllowedHeight +=
|
| parseInt(window.getComputedStyle($('outer-container')).bottom);
|
| + }
|
| return maxAllowedHeight;
|
| - }
|
| + },
|
| +
|
| + /**
|
| + * Computes max-width for an element so that it does fit the
|
| + * outer-container.
|
| + * @param {element} DOM element
|
| + */
|
| + getMaxWidthToFit : function(element) {
|
| + var maxAllowedWidth =
|
| + $('outer-container').offsetWidth -
|
| + element.getBoundingClientRect().left -
|
| + parseInt(window.getComputedStyle(element).marginLeft) -
|
| + parseInt(window.getComputedStyle(element).marginRight);
|
| + return maxAllowedWidth;
|
| + },
|
| }
|
| });
|
|
|