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

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: rebase, css overview, bug fix Created 4 years, 9 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 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};
+ }
};
/**

Powered by Google App Engine
This is Rietveld 408576698