| Index: chrome/browser/resources/chromeos/login/login_common.js
|
| diff --git a/chrome/browser/resources/chromeos/login/login_common.js b/chrome/browser/resources/chromeos/login/login_common.js
|
| index e1032bb06ed55945f31678410127353ec6c26231..8a5ec108719cc7304c0f7c50e9ebbde5fb1ec5d2 100644
|
| --- a/chrome/browser/resources/chromeos/login/login_common.js
|
| +++ b/chrome/browser/resources/chromeos/login/login_common.js
|
| @@ -327,6 +327,19 @@ cr.define('cr.ui', function() {
|
| Oobe.getInstance().setClientAreaSize(width, height);
|
| };
|
|
|
| + /**
|
| + * Computes max-height for an element so that it doesn't overlap shelf.
|
| + * @param {element} DOM element
|
| + */
|
| + Oobe.getMaxHeightBeforeShelfOverlapping = function(element) {
|
| + var maxAllowedHeight =
|
| + $('outer-container').offsetHeight -
|
| + element.getBoundingClientRect().top -
|
| + parseInt(window.getComputedStyle(element).marginTop) -
|
| + parseInt(window.getComputedStyle(element).marginBottom);
|
| + return maxAllowedHeight;
|
| + };
|
| +
|
| // Export
|
| return {
|
| Oobe: Oobe
|
|
|