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

Unified Diff: ui/login/display_manager.js

Issue 2247723002: ChromeOS: Implement EULA screen of material design OOBE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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: ui/login/display_manager.js
diff --git a/ui/login/display_manager.js b/ui/login/display_manager.js
index 626bf7b9181b6e4643c9350491013aedfdb12a58..11b11ad07cbc28304c97274597374edb2205c475 100644
--- a/ui/login/display_manager.js
+++ b/ui/login/display_manager.js
@@ -712,6 +712,20 @@ cr.define('cr.ui.login', function() {
screen.updateLocalizedContent();
}
+ /* Recalculate all MD containers */
michaelpg 2016/08/15 16:16:50 why? and AFAICT there's only 1
Alexander Alekseev 2016/08/15 19:36:43 This code was needed because MD elements had 'posi
+ var nodes = document.getElementsByClassName("md-container");
+ for (var i = 0; i < nodes.length; ++i) {
+ var children = nodes[i].children;
+ var width = 0;
+ var height = 0;
+ for (var j = 0; j < children.length; ++j) {
+ width = Math.max(width, children[j].offsetWidth);
michaelpg 2016/08/15 16:16:50 offsetWidth or clientWidth?
+ height = Math.max(height, children[j].offsetHeight);
+ }
+ nodes[i].style.width = width + 'px';
+ nodes[i].style.height = height + 'px';
+ }
+
var currentScreenId = this.screens_[this.currentStep_];
var currentScreen = $(currentScreenId);
this.updateScreenSize(currentScreen);

Powered by Google App Engine
This is Rietveld 408576698