Commit eb5817e2 authored by Roman Aleksandrov's avatar Roman Aleksandrov Committed by Commit Bot

EULA Screen: Adapt screen for smaller resolution.

Scroll view to show auto-selected toggle.
Fix layout issue with zero height divs.

Bug: 1010166
Change-Id: I56399b4a43da16797b3b25a818b8d39f3a4c89e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1848380Reviewed-by: default avatarDenis Kuznetsov <antrim@chromium.org>
Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Commit-Queue: Roman Aleksandrov <raleksandrov@google.com>
Cr-Commit-Position: refs/heads/master@{#705192}
parent d5a878dd
......@@ -75,6 +75,14 @@ Polymer({
this.fullScreenDialog = true;
},
/**
* Scroll to the bottom of footer container.
*/
scrollToBottom: function() {
var el = this.$$('#footer-container');
el.scrollTop = el.scrollHeight;
},
/**
* This is called from oobe_welcome when this dialog is shown.
*/
......
......@@ -19,6 +19,7 @@ a {
#installationSettings,
#logging {
font-size: 13px;
min-height: unset;
}
#crosEulaFrame {
......
......@@ -58,10 +58,10 @@ Polymer({
},
/**
* Flag that ensures that OOBE configuration is applied only once.
* Flag that ensures that eula screen set up once.
* @private {boolean}
*/
configuration_applied_: false,
initialized_: false,
focus: function() {
if (this.eulaLoadingScreenShown) {
......@@ -77,7 +77,19 @@ Polymer({
if (behavior.onBeforeShow)
behavior.onBeforeShow.call(this);
});
window.setTimeout(this.applyOobeConfiguration_.bind(this), 0);
window.setTimeout(this.initializeScreen_.bind(this), 0);
},
/**
* Set up dialog before shown it for the first time.
* @private
*/
initializeScreen_: function() {
if (this.initialized_)
return;
this.$.eulaDialog.scrollToBottom();
this.applyOobeConfiguration_();
this.initialized_ = true;
},
/**
......@@ -85,8 +97,6 @@ Polymer({
* @private
*/
applyOobeConfiguration_: function() {
if (this.configuration_applied_)
return;
var configuration = Oobe.getInstance().getOobeConfiguration();
if (!configuration)
return;
......@@ -96,7 +106,6 @@ Polymer({
if (configuration.eulaAutoAccept) {
this.eulaAccepted_();
}
this.configuration_applied_ = true;
},
/**
......
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