Commit 4ed7e937 authored by Esmael El-Moslimany's avatar Esmael El-Moslimany Committed by Commit Bot

WebUI NTP: fix content vertical scrolling

The content area does not show vertical scroll bar when the content does
not fit within browser content area.

Bug: 1067363
Change-Id: If2e5e5fe1d23d2c4709ef84f1c37a896e509e085
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2146087Reviewed-by: default avatarTibor Goldschwendt <tiborg@chromium.org>
Commit-Queue: Esmael Elmoslimany <aee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758583}
parent 45a22b64
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
width: 100%; width: 100%;
} }
#background > * { #background > *,
#oneGoogleBar {
height: 100%; height: 100%;
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -39,13 +40,17 @@ ...@@ -39,13 +40,17 @@
background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3)); background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3));
} }
#contentContainer {
overflow: auto;
}
#content { #content {
align-items: center; align-items: center;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: calc(100% - var(--ntp-one-google-bar-height)); min-height: calc(100% - var(--ntp-one-google-bar-height));
top: var(--ntp-one-google-bar-height); padding-top: var(--ntp-one-google-bar-height);
z-index: 1; position: relative;
} }
#logo { #logo {
...@@ -75,7 +80,7 @@ ...@@ -75,7 +80,7 @@
background-color: var(--ntp-background-override-color); background-color: var(--ntp-background-override-color);
border-radius: calc(0.5 * var(--cr-button-height)); border-radius: calc(0.5 * var(--cr-button-height));
bottom: 16px; bottom: 16px;
position: absolute; position: fixed;
} }
:host-context([dir='ltr']) #customizeButtonContainer { :host-context([dir='ltr']) #customizeButtonContainer {
...@@ -110,7 +115,7 @@ ...@@ -110,7 +115,7 @@
line-height: 20px; line-height: 20px;
max-width: 50vw; max-width: 50vw;
padding: 8px; padding: 8px;
position: absolute; position: fixed;
text-shadow: var(--ntp-theme-text-shadow); text-shadow: var(--ntp-theme-text-shadow);
} }
...@@ -166,7 +171,11 @@ ...@@ -166,7 +171,11 @@
<ntp-untrusted-iframe id="backgroundImage" hidden="[[!showBackgroundImage_]]"> <ntp-untrusted-iframe id="backgroundImage" hidden="[[!showBackgroundImage_]]">
</ntp-untrusted-iframe> </ntp-untrusted-iframe>
<div id="backgroundGradient" hidden="[[!showBackgroundImage_]]"></div> <div id="backgroundGradient" hidden="[[!showBackgroundImage_]]"></div>
<div id="contentContainer">
<div id="content"> <div id="content">
<ntp-untrusted-iframe id="oneGoogleBar" path="one-google-bar"
hidden$="[[!oneGoogleBarLoaded_]]">
</ntp-untrusted-iframe>
<ntp-logo id="logo" doodle-allowed$="[[doodleAllowed_]]" <ntp-logo id="logo" doodle-allowed$="[[doodleAllowed_]]"
single-colored$="[[singleColoredLogo_]]"> single-colored$="[[singleColoredLogo_]]">
</ntp-logo> </ntp-logo>
...@@ -177,7 +186,8 @@ ...@@ -177,7 +186,8 @@
<dom-if if="[[showCustomizeDialog_]]" restamp> <dom-if if="[[showCustomizeDialog_]]" restamp>
<template> <template>
<ntp-customize-dialog on-close="onCustomizeDialogClose_" <ntp-customize-dialog on-close="onCustomizeDialogClose_"
theme="[[theme_]]" background-selection="{{backgroundSelection_}}"> theme="[[theme_]]"
background-selection="{{backgroundSelection_}}">
</ntp-customize-dialog> </ntp-customize-dialog>
</template> </template>
</dom-if> </dom-if>
...@@ -189,8 +199,8 @@ ...@@ -189,8 +199,8 @@
</dom-if> </dom-if>
<ntp-untrusted-iframe id="promo" path="promo" hidden$="[[!promoLoaded_]]"> <ntp-untrusted-iframe id="promo" path="promo" hidden$="[[!promoLoaded_]]">
</ntp-untrusted-iframe> </ntp-untrusted-iframe>
<!-- cr-button is transparent on hover. This leads to incorrect results when <!-- cr-button is transparent on hover. This leads to incorrect results
a custom background is set. Therefore, wrap customize button in when a custom background is set. Therefore, wrap customize button in
container to enfore solid background color. --> container to enfore solid background color. -->
<div id="customizeButtonContainer"> <div id="customizeButtonContainer">
<cr-button id="customizeButton" on-click="onCustomizeClick_"> <cr-button id="customizeButton" on-click="onCustomizeClick_">
...@@ -213,7 +223,5 @@ ...@@ -213,7 +223,5 @@
</div> </div>
</a> </a>
</div> </div>
<ntp-untrusted-iframe id="oneGoogleBar" path="one-google-bar" </div>
hidden$="[[!oneGoogleBarLoaded_]]">
</ntp-untrusted-iframe>
</div> </div>
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