Commit 04eec2db authored by Denis Kuznetsov's avatar Denis Kuznetsov Committed by Commit Bot

Remove code that has no actual effect

* "down" property does not have any effect on outer container
* with new material design, all dialogs have same size, no
  need for special handling

Bug: 999058
Change-Id: I670a4e885691deca606afa395bd8f5b961303aab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1792862
Commit-Queue: Denis Kuznetsov <antrim@chromium.org>
Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699393}
parent 5e19d995
<div id="background" class="background-initial"></div>
<include src="api_keys_notice.html">
<div id="scroll-container">
<div id="outer-container" class="down">
<div id="outer-container">
<div id="oobe" class="faded">
<div id="inner-container" class="down">
<include src="[OOBE]_screens.html">
......
......@@ -92,7 +92,6 @@ Polymer({
ready: function() {
this.initializeLoginScreen('WelcomeScreen', {
resetAllowed: true,
commonScreenSize: true,
enableDebuggingAllowed: true,
enterDemoModeAllowed: true,
noAnimatedTransition: true,
......
......@@ -101,15 +101,6 @@ cr.define('cr.ui.login', function() {
*/
var MAX_SCREEN_TRANSITION_DURATION = 250;
/**
* Groups of screens (screen IDs) that should have the same dimensions.
* @type Array<Array<string>>
* @const
*/
var SCREEN_GROUPS = [[
SCREEN_OOBE_NETWORK, SCREEN_OOBE_EULA, SCREEN_OOBE_UPDATE,
SCREEN_OOBE_AUTO_ENROLLMENT_CHECK
]];
/**
* Group of screens (screen IDs) where factory-reset screen invocation is
* available.
......@@ -166,11 +157,6 @@ cr.define('cr.ui.login', function() {
SCREEN_OOBE_RESET,
];
/**
* OOBE screens group index.
*/
var SCREEN_GROUP_OOBE = 0;
/**
* Constructor a display manager that manages initialization of screens,
* transitions, error messages display.
......@@ -265,7 +251,7 @@ cr.define('cr.ui.login', function() {
},
/**
* Returns dimensions of screen exluding header bar.
* Returns dimensions of screen excluding header bar.
* @type {Object}
*/
get clientAreaSize() {
......@@ -631,7 +617,6 @@ cr.define('cr.ui.login', function() {
innerContainer.classList.remove('down');
innerContainer.addEventListener('transitionend', function f(e) {
innerContainer.removeEventListener('transitionend', f);
outerContainer.classList.remove('down');
chrome.send('loginVisible', ['oobe']);
// Refresh defaultControl. It could have changed.
var defaultControl = newStep.defaultControl;
......@@ -756,10 +741,6 @@ cr.define('cr.ui.login', function() {
}
this.appendButtons_(el.buttons, screenId);
if (attributes && attributes.commonScreenSize) {
SCREEN_GROUPS[0].push(screenId);
}
if (el.updateOobeConfiguration && this.oobe_configuration_)
el.updateOobeConfiguration(this.oobe_configuration_);
},
......@@ -785,22 +766,7 @@ cr.define('cr.ui.login', function() {
var width = screen.getPreferredSize().width;
var height = screen.getPreferredSize().height;
for (let i = 0; i < SCREEN_GROUPS.length; ++i) {
let screenGroup = SCREEN_GROUPS[i];
if (screenGroup.indexOf(screen.id) != -1) {
// Set screen dimensions to maximum dimensions within this group.
for (let j = 0; j < screenGroup.length; ++j) {
let screen2 = $(screenGroup[j]);
// Other screens in this screen group might be missing if we're not
// in OOBE.
if (!screen2)
continue;
width = Math.max(width, screen2.getPreferredSize().width);
height = Math.max(height, screen2.getPreferredSize().height);
}
break;
}
}
if (!this.isAdaptiveOobe) {
if (screen.classList.contains('fullscreen')) {
$('inner-container').style.height = '100%';
......@@ -876,18 +842,6 @@ cr.define('cr.ui.login', function() {
}
},
/**
* Initialized first group of OOBE screens.
*/
initializeOOBEScreens: function() {
if (this.isOobeUI() && $('inner-container').classList.contains('down')) {
for (let i = 0; i < SCREEN_GROUPS[SCREEN_GROUP_OOBE].length; ++i) {
let screen = $(SCREEN_GROUPS[SCREEN_GROUP_OOBE][i]);
screen.hidden = false;
}
}
},
/** Initializes demo mode start listener. */
initializeDemoModeMultiTapListener: function() {
if (this.displayType_ == DISPLAY_TYPE.OOBE) {
......@@ -1077,7 +1031,6 @@ cr.define('cr.ui.login', function() {
instance.displayType = DISPLAY_TYPE.LOGIN;
}
instance.initializeOOBEScreens();
instance.initializeDemoModeMultiTapListener();
window.addEventListener('resize', instance.onWindowResize_.bind(instance));
......
......@@ -9,7 +9,6 @@
/**
* @typedef {{
* commonScreenSize: (boolean|undefined),
* enableDebuggingAllowed: (boolean|undefined),
* enterDemoModeAllowed: (boolean|undefined),
* noAnimatedTransition: (boolean|undefined),
......@@ -21,13 +20,6 @@
*/
var DisplayManagerScreenAttributes = {};
/**
* True when screen should have size matched with others.
* (i.e. it's a part of main flow)
* @type {boolean|undefined}
*/
DisplayManagerScreenAttributes.commonScreenSize;
/**
* True if showing "enable debugging" is allowed for the screen.
* @type {boolean|undefined}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment