cros: Fix eula height regression
Use a fixed height on webview to work around the wrong height
calculated for its inner iframe. Previously, the work around
is to set a fixed height on #eulaDialog but that has a problem
that webview height grows when it gains/loses focus.
Bug: 778978
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I6be9054566f53251afe6bf3bca2972fa1d45ab7b
Reviewed-on: https://chromium-review.googlesource.com/754296
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514238}
diff --git a/chrome/browser/resources/chromeos/login/oobe_eula.css b/chrome/browser/resources/chromeos/login/oobe_eula.css
index 5012da4..b2728a7 100644
--- a/chrome/browser/resources/chromeos/login/oobe_eula.css
+++ b/chrome/browser/resources/chromeos/login/oobe_eula.css
@@ -8,10 +8,11 @@
width: fit-content;
}
-#eulaDialog {
+#crosEulaFrame {
/* Works around the problem that webview height is not calculated
- * correctly with only min-height set. */
- height: 640px;
+ * correctly in flex layout. 207px is derived from en-US locale under
+ * the default 640px height of #eulaDialog. */
+ height: 207px;
}
#crosEulaFrame,
diff --git a/chrome/browser/resources/chromeos/login/oobe_eula.html b/chrome/browser/resources/chromeos/login/oobe_eula.html
index 8496a353..6fe171c 100644
--- a/chrome/browser/resources/chromeos/login/oobe_eula.html
+++ b/chrome/browser/resources/chromeos/login/oobe_eula.html
@@ -61,7 +61,7 @@
</div>
<div class="footer flex layout vertical">
<webview id="crosEulaFrame"
- role="document" class="flex focus-on-show"
+ role="document" class="focus-on-show"
i18n-values="aria-label:oobeEulaIframeLabel"
on-contentload="onFrameLoad_">
</webview>