Commit e50bbece authored by ivankr@chromium.org's avatar ivankr@chromium.org

[cros] OOBE transitions polishing.

*) Animation time shortened to 200ms.
*) Progress bar hidden during initial transition.
*) Update screen size fixed.
*) Screens are not forced to have equal size in old UI.
*) No initial border flicking on login screen.
*) No initial network dropdown flickering in OOBE (no slightest idea why).

BUG=141560

Review URL: https://chromiumcodereview.appspot.com/10826267

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151254 0039d316-1c4b-4281-b951-d872f2087c98
parent 98a15b10
...@@ -235,8 +235,14 @@ cr.define('cr.ui.login', function() { ...@@ -235,8 +235,14 @@ cr.define('cr.ui.login', function() {
} }
} else { } else {
// First screen on OOBE launch. // First screen on OOBE launch.
$('inner-container').classList.remove('down'); var innerContainer = $('inner-container');
newHeader.classList.remove('right'); innerContainer.classList.remove('down');
innerContainer.addEventListener(
'webkitTransitionEnd', function f(e) {
innerContainer.removeEventListener('webkitTransitionEnd', f);
$('progress-dots').classList.remove('down');
});
newHeader.classList.remove('right'); // Old OOBE.
// Report back first OOBE screen being painted. // Report back first OOBE screen being painted.
window.webkitRequestAnimationFrame(function() { window.webkitRequestAnimationFrame(function() {
chrome.send('loginVisible'); chrome.send('loginVisible');
...@@ -320,20 +326,22 @@ cr.define('cr.ui.login', function() { ...@@ -320,20 +326,22 @@ cr.define('cr.ui.login', function() {
updateInnerContainerSize_: function(screen) { updateInnerContainerSize_: function(screen) {
var height = screen.offsetHeight; var height = screen.offsetHeight;
var width = screen.offsetWidth; var width = screen.offsetWidth;
for (var i = 0, screenGroup; screenGroup = SCREEN_GROUPS[i]; i++) { if (this.isNewOobe()) {
if (screenGroup.indexOf(screen.id) != -1) { for (var i = 0, screenGroup; screenGroup = SCREEN_GROUPS[i]; i++) {
// Set screen dimensions to maximum dimensions within this group. if (screenGroup.indexOf(screen.id) != -1) {
for (var j = 0, screen2; screen2 = $(screenGroup[j]); j++) { // Set screen dimensions to maximum dimensions within this group.
height = Math.max(height, screen2.offsetHeight); for (var j = 0, screen2; screen2 = $(screenGroup[j]); j++) {
width = Math.max(width, screen2.offsetWidth); height = Math.max(height, screen2.offsetHeight);
width = Math.max(width, screen2.offsetWidth);
}
break;
} }
break;
} }
} }
$('inner-container').style.height = height + 'px'; $('inner-container').style.height = height + 'px';
if (this.isNewOobe()) { if (this.isNewOobe()) {
$('inner-container').style.width = width + 'px'; $('inner-container').style.width = width + 'px';
// This requires |screen| to have |box-sizing: border-box|. // This requires |screen| to have 'box-sizing: border-box'.
screen.style.width = width + 'px'; screen.style.width = width + 'px';
screen.style.height = height + 'px'; screen.style.height = height + 'px';
} }
......
...@@ -102,25 +102,29 @@ html[oobe=old] #inner-container { ...@@ -102,25 +102,29 @@ html[oobe=old] #inner-container {
} }
html[oobe=new] #inner-container { html[oobe=new] #inner-container {
background: -webkit-linear-gradient(rgba(255,255,255,0.99),
rgba(255,255,255,0.95));
border-radius: 2px; border-radius: 2px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3),
0 4px 23px 5px rgba(0, 0, 0, 0.2),
0 2px 6px rgba(0, 0, 0, 0.15);
overflow: hidden; overflow: hidden;
padding: 0; padding: 0;
} }
/* Account picker has no border and background. */ /* Screens that have a border and background. */
html[oobe=new] .account-picker #inner-container { html[oobe=new] #oobe.connect #inner-container,
background: none; html[oobe=new] #oobe.eula #inner-container,
box-shadow: none; html[oobe=new] #oobe.update #inner-container,
html[oobe=new] #oobe.gaia-signin #inner-container,
html[oobe=new] #oobe.enrollment #inner-container,
html[oobe=new] #oobe.oauth-enrollment #inner-container,
html[oobe=new] #oobe.user-image #inner-container {
background: -webkit-linear-gradient(rgba(255,255,255,0.99),
rgba(255,255,255,0.95));
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3),
0 4px 23px 5px rgba(0, 0, 0, 0.2),
0 2px 6px rgba(0, 0, 0, 0.15);
} }
/* Only play this animation when 'down' class is removed. */ /* Only play this animation when 'down' class is removed. */
html[oobe=new] #inner-container:not(.down) { html[oobe=new] #inner-container:not(.down) {
-webkit-transition: -webkit-transform 400ms ease; -webkit-transition: -webkit-transform 200ms ease-in-out;
} }
html[oobe=new] #inner-container.down { html[oobe=new] #inner-container.down {
...@@ -287,9 +291,9 @@ html[oobe=new] .step { ...@@ -287,9 +291,9 @@ html[oobe=new] .step {
} }
html[oobe=new] .step.animated { html[oobe=new] .step.animated {
-webkit-transition: -webkit-transform 400ms ease, -webkit-transition: -webkit-transform 200ms ease-in-out,
opacity 400ms ease, opacity 200ms ease-in-out,
visibility 400ms ease; visibility 200ms ease-in-out;
} }
html[oobe=old][dir=ltr] .step { html[oobe=old][dir=ltr] .step {
...@@ -369,6 +373,11 @@ html[oobe=new] #progress-dots { ...@@ -369,6 +373,11 @@ html[oobe=new] #progress-dots {
display: -webkit-box; display: -webkit-box;
} }
/* Hidden for the duration of initial transition. */
html[oobe=new] #progress-dots.down {
visibility: hidden;
}
.progdot { .progdot {
-webkit-margin-end: 12px; -webkit-margin-end: 12px;
opacity: 0.4; opacity: 0.4;
...@@ -854,11 +863,11 @@ html[oobe=old] #update #update-screen-curtain { ...@@ -854,11 +863,11 @@ html[oobe=old] #update #update-screen-curtain {
} }
html[oobe=new] #update #update-screen-curtain { html[oobe=new] #update #update-screen-curtain {
margin: 87px 45px; margin: 45px 45px;
} }
html[oobe=new] #update-screen-main { html[oobe=new] #update-screen-main {
margin: 85px 45px; margin: 45px 45px;
min-height: 114px; min-height: 114px;
text-align: center; text-align: center;
} }
...@@ -883,17 +892,10 @@ html[oobe=old] #update #update-cancel-hint { ...@@ -883,17 +892,10 @@ html[oobe=old] #update #update-cancel-hint {
} }
html[oobe=new] #update #update-cancel-hint { html[oobe=new] #update #update-cancel-hint {
-webkit-margin-before: 15px;
-webkit-margin-start: 45px;
color: rgb(170, 0, 0); color: rgb(170, 0, 0);
position: absolute; position: absolute;
top: 80px;
}
html[oobe=new][dir=ltr] #update #update-cancel-hint {
left: 137px;
}
html[oobe=new][dir=rtl] #update #update-cancel-hint {
right: 137px;
} }
#update #update-upper-label { #update #update-upper-label {
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<div id="progress"></div> <div id="progress"></div>
<div id="button-strip" class="button-strip"></div> <div id="button-strip" class="button-strip"></div>
</div> </div>
<div id="progress-dots"></div> <div id="progress-dots" class="down"></div>
</div> </div>
<div id="security-info"> <div id="security-info">
<a id="security-link" href="#" i18n-content="eulaSystemSecuritySetting"> <a id="security-link" href="#" i18n-content="eulaSystemSecuritySetting">
......
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