Commit 5ad3b577 authored by Alexander Alekseev's avatar Alexander Alekseev Committed by Commit Bot

Chrome OS: Fix a few minor issues in oobe-dialog attributes.

min-height/min-width => height/width
if(getAttribute) => if(hasAttribute)

Bug: 864686
Change-Id: If179f64af2d3ced1f2902a6c1b205a37558f709c
Reviewed-on: https://chromium-review.googlesource.com/1182502Reviewed-by: default avatarWenzhao (Colin) Zang <wzang@chromium.org>
Commit-Queue: Alexander Alekseev <alemate@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584637}
parent 22fcd03d
......@@ -65,9 +65,9 @@ Polymer({
},
onBeforeShow: function() {
var isOobe = Oobe && Oobe.getInstance() &&
var isOobe = window.hasOwnProperty('Oobe') && Oobe.getInstance() &&
Oobe.getInstance().displayType == DISPLAY_TYPE.OOBE;
if (isOobe || document.documentElement.getAttribute('full-screen-dialog'))
if (isOobe || document.documentElement.hasAttribute('full-screen-dialog'))
this.fullScreenDialog = true;
},
......
......@@ -14,9 +14,9 @@
border-radius: unset;
box-shadow: unset;
flex-direction: column;
min-height: 640px;
min-width: 768px;
height: 640px;
position: relative;
width: 768px;
}
:host(:not([not-a-dialog]):not([full-screen-dialog])) {
......
......@@ -43,7 +43,7 @@ var OobeDialogHostBehavior = {
* Pass down fullScreenDialog attribute.
*/
onBeforeShow: function() {
if (document.documentElement.getAttribute('full-screen-dialog'))
if (document.documentElement.hasAttribute('full-screen-dialog'))
this.fullScreenDialog = true;
this.propagateFullScreenMode();
......
......@@ -83,18 +83,19 @@ Polymer({
},
onBeforeShow: function() {
if (document.documentElement.getAttribute('full-screen-dialog'))
this.fullScreenDialog = true;
if (this.fullScreenDialog) {
this.$.welcomeScreen.fullScreenDialog = true;
}
this.behaviors.forEach((behavior) => {
if (behavior.onBeforeShow)
behavior.onBeforeShow.call(this);
});
if (this.fullScreenDialog)
this.$.welcomeScreen.fullScreenDialog = true;
this.$.welcomeScreen.onBeforeShow();
let dialogs = Polymer.dom(this.root).querySelectorAll('oobe-dialog');
for (let dialog of dialogs)
dialog.onBeforeShow();
let activeScreen = this.getActiveScreen_();
if (activeScreen.show)
activeScreen.show();
......
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