Skip to content

Commit

Permalink
account-picker: Fix Chrome OS and Desktop versions.
Browse files Browse the repository at this point in the history
Chrome OS by applying right css
Desktop by partially reverting CL:1824878

Bug: 1008762
Change-Id: Icdd50ca8264d1a49c53f700ff0f9f66ae58fc257
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829377
Reviewed-by: Denis Kuznetsov <antrim@chromium.org>
Commit-Queue: Roman Sorokin [CET] <rsorokin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700744}
  • Loading branch information
Roman Sorokin authored and Commit Bot committed Sep 27, 2019
1 parent 374b339 commit 506190d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@ html:not([full-screen-dialog]) #oobe.tpm-error-message #inner-container {
width: 100%;
}

#oobe.account-picker {
max-height: unset;
max-width: unset;
padding-bottom: unset;
padding-inline-end: unset;
padding-inline-start: unset;
padding-top: unset;
}

#outer-container.fullscreen,
#outer-container.fullscreen #oobe,
#inner-container,
Expand Down
27 changes: 25 additions & 2 deletions ui/login/display_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -747,13 +747,36 @@ cr.define('cr.ui.login', function() {
* @param {!HTMLElement} screen Screen that is being shown.
*/
updateScreenSize: function(screen) {
if (!cr.isChromeOS) {
// Have to reset any previously predefined screen size first
// so that screen contents would define it instead.
$('inner-container').style.height = '';
$('inner-container').style.width = '';
screen.style.width = '';
screen.style.height = '';
}

$('outer-container').classList.toggle(
'fullscreen', screen.classList.contains('fullscreen'));

var width = screen.getPreferredSize().width;
var height = screen.getPreferredSize().height;

if (!cr.isChromeOS) {
if (screen.classList.contains('fullscreen')) {
$('inner-container').style.height = '100%';
$('inner-container').style.width = '100%';
} else {
$('inner-container').style.height = height + 'px';
$('inner-container').style.width = width + 'px';
}
// This requires |screen| to have 'box-sizing: border-box'.
screen.style.width = width + 'px';
screen.style.height = height + 'px';
screen.style.margin = 'auto';
}

if (this.showingViewsLogin) {
var width = screen.getPreferredSize().width;
var height = screen.getPreferredSize().height;
chrome.send('updateOobeDialogSize', [width, height]);
$('scroll-container').classList.toggle('disable-scroll', true);
$('inner-container').classList.toggle('disable-scroll', true);
Expand Down

0 comments on commit 506190d

Please sign in to comment.