Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2599)

Unified Diff: chrome/browser/resources/md_user_manager/user_manager.js

Issue 1642323004: User Manager MD User Pods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed pasha's comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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};
+ }
};
/**

Powered by Google App Engine
This is Rietveld 408576698