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

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 Roger's comments, css cleanup, rtl css tweak 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 2ee2ef6d94357a6e313449e5d078a80d7c0d1295..6a36476966f9840297e06819aae86081e42e5d92 100644
--- a/chrome/browser/resources/md_user_manager/user_manager.js
+++ b/chrome/browser/resources/md_user_manager/user_manager.js
@@ -27,6 +27,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 ||
+ $('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