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 7470d873d91555b0eace60268183ef16cfd839ad..99eeaf141949cd731eeccbb38ecd0b60b45702d3 100644 |
| --- a/chrome/browser/resources/md_user_manager/user_manager.js |
| +++ b/chrome/browser/resources/md_user_manager/user_manager.js |
| @@ -26,6 +26,23 @@ cr.define('cr.ui', function() { |
| Oobe.prototype = { |
| __proto__: DisplayManager.prototype, |
| + |
| + /** |
| + * 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}} |
| + */ |
| + get clientAreaSize() { |
| + width = $('outer-container').offsetWidth || |
|
tommycli
2016/02/20 00:36:39
Do you mean to declare globals here?
Moe
2016/02/22 14:46:46
Done. Added var.
|
| + $('animated-pages').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. |
| + height = $('outer-container').offsetHeight || |
| + $('animated-pages').offsetHeight - 57; |
| + return {width: width, height: height}; |
| + } |
| }; |
| /** |