Chromium Code Reviews| Index: chrome/browser/resources/md_user_manager/user_manager.js |
| diff --git a/chrome/browser/resources/md_user_manager/user_manager.js b/chrome/browser/resources/md_user_manager/user_manager.js |
| index 8be6d10cf2ed3c99ab61531b25960167d94c1a0c..bfefe7ff3c7bccfdacc4c290f56f4be3111a2ab9 100644 |
| --- a/chrome/browser/resources/md_user_manager/user_manager.js |
| +++ b/chrome/browser/resources/md_user_manager/user_manager.js |
| @@ -24,6 +24,25 @@ cr.define('cr.ui', function() { |
| UserManager.prototype = { |
| __proto__: DisplayManager.prototype, |
| + |
| + /** |
| + * @override |
| + * Overrides clientAreaSize in DisplayManager. When a new profile is created |
| + * the #outer-container page may not be visible yet, so user-pods cannot be |
| + * placed correctly. In that case we use dimensions of the #animated-pages. |
| + * @type {{width:string, height:string}} |
|
tommycli
2016/03/11 18:59:14
I think it should be {width: string, height: strin
Moe
2016/03/15 21:28:20
Done.
|
| + */ |
| + get clientAreaSize() { |
| + var outerContainer = $('outer-container'); |
| + var animatedPages = $('animatedPages'); |
| + var width = outerContainer.offsetWidth || animatedPages.offsetWidth; |
| + // Deduct the maximum possible height of the #login-header-bar (including |
| + // the padding and the border) from the height of #animated-pages. Result |
| + // is the remaining visible height. |
| + var height = outerContainer.offsetHeight || |
| + animatedPages.offsetHeight - 57; |
|
tommycli
2016/03/11 18:59:14
Can this '57' value be calculated from the element
Moe
2016/03/15 21:28:20
I removed the constant from the css file. Unfortun
|
| + return {width: width, height: height}; |
| + } |
| }; |
| /** |