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 158bac1f8a2e1d3d81b7d1a005e94f50ee4035ee..698e5f956f6ed8492277927caadb0a512f76198b 100644 |
| --- a/chrome/browser/resources/md_user_manager/user_manager.js |
| +++ b/chrome/browser/resources/md_user_manager/user_manager.js |
| @@ -24,6 +24,23 @@ 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. Therefore, we use dimensions of the #animated-pages. |
| + * @type {{width: string, height: string}} |
| + */ |
| + get clientAreaSize() { |
| + var animatedPages = $('animatedPages'); |
| + var width = 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 = animatedPages.offsetHeight - 57; |
|
Dan Beam
2016/03/25 02:48:23
why the magic 57? can you get this dynamically or
Moe
2016/04/04 14:55:09
Done. Unfortunately, can't get this dynamically, s
|
| + return {width: width, height: height}; |
| + } |
| }; |
| /** |