From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- .../installer/windows/nsis/content/installing.html | 43 ++++++++++++++++ .../installer/windows/nsis/content/installing.js | 58 ++++++++++++++++++++++ .../windows/nsis/content/profile_cleanup.html | 42 ++++++++++++++++ .../windows/nsis/content/profile_cleanup.js | 30 +++++++++++ .../installer/windows/nsis/content/stub_common.css | 37 ++++++++++++++ .../installer/windows/nsis/content/stub_common.js | 23 +++++++++ 6 files changed, 233 insertions(+) create mode 100644 browser/installer/windows/nsis/content/installing.html create mode 100644 browser/installer/windows/nsis/content/installing.js create mode 100644 browser/installer/windows/nsis/content/profile_cleanup.html create mode 100644 browser/installer/windows/nsis/content/profile_cleanup.js create mode 100644 browser/installer/windows/nsis/content/stub_common.css create mode 100644 browser/installer/windows/nsis/content/stub_common.js (limited to 'browser/installer/windows/nsis/content') diff --git a/browser/installer/windows/nsis/content/installing.html b/browser/installer/windows/nsis/content/installing.html new file mode 100644 index 0000000000..e7b4450065 --- /dev/null +++ b/browser/installer/windows/nsis/content/installing.html @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + +
+
+

+
+
+
+ +
+
+
+
+
+
+ +
+ + + + + diff --git a/browser/installer/windows/nsis/content/installing.js b/browser/installer/windows/nsis/content/installing.js new file mode 100644 index 0000000000..869c76c324 --- /dev/null +++ b/browser/installer/windows/nsis/content/installing.js @@ -0,0 +1,58 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + +// Length of time (milliseconds) that one blurb stays up before we switch to +// displaying the next one. +var BLURB_CYCLE_MS = 20000; + +// How frequently we should update the progress bar state, in milliseconds. +var PROGRESS_BAR_INTERVAL_MS = 250; + +window.attachEvent("onload", function() { + // Set direction on the two components of the layout. + var direction = external.getTextDirection(); + document.getElementById("text_column").style.direction = direction; + document.getElementById("installing").style.direction = direction; + + // Get this page's static strings. + var label = document.getElementById("label"); + label.innerText = external.getUIString("installing_label"); + document.getElementById("header").innerText = external.getUIString( + "installing_header" + ); + document.getElementById("content").innerText = external.getUIString( + "installing_content" + ); + + // Poll and update the progress bar percentage. + setInterval(function() { + var percent = external.getProgressBarPercent(); + var progressBar = document.getElementById("progress_bar"); + progressBar.setAttribute("aria-valuenow", percent); + progressBar.style.width = percent + "%"; + }, PROGRESS_BAR_INTERVAL_MS); + + // Get the blurb strings and initialize the blurb rotation. + var currentBlurb = 0; + // IE8 adds undefined to the array if there is a trailing comma in an + // array literal, so don't allow prettier to add one here. + // prettier-ignore + var blurbStrings = [ + external.getUIString("installing_blurb_0"), + external.getUIString("installing_blurb_1"), + external.getUIString("installing_blurb_2") + ]; + function rotateBlurb() { + document.getElementById("blurb").innerText = blurbStrings[currentBlurb]; + currentBlurb = (currentBlurb + 1) % blurbStrings.length; + } + rotateBlurb(); + setInterval(rotateBlurb, BLURB_CYCLE_MS); + + // Focus the label, in order to get the focus in the web page, to + // assist screen readers. On Win 7's IE8 this causes the focus rectangle + // to be immediately visible, so also hide that here. + label.className += " no-focus-outline"; + label.focus(); +}); diff --git a/browser/installer/windows/nsis/content/profile_cleanup.html b/browser/installer/windows/nsis/content/profile_cleanup.html new file mode 100644 index 0000000000..4f20aaecba --- /dev/null +++ b/browser/installer/windows/nsis/content/profile_cleanup.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + +
+
+

+ +
+ + +
+ +
+ +
+
+
+ + + + + diff --git a/browser/installer/windows/nsis/content/profile_cleanup.js b/browser/installer/windows/nsis/content/profile_cleanup.js new file mode 100644 index 0000000000..016b368b05 --- /dev/null +++ b/browser/installer/windows/nsis/content/profile_cleanup.js @@ -0,0 +1,30 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + +window.attachEvent("onload", function() { + // Set text direction. + var direction = external.getTextDirection(); + var profileRefreshForm = document.getElementById("profileRefreshForm"); + profileRefreshForm.style.direction = direction; + var checkboxLabel = document.getElementById("checkboxLabel"); + checkboxLabel.className += " checkboxLabel-" + direction; + + // Get this page's static strings. + document.getElementById("header").innerText = external.getUIString( + "cleanup_header" + ); + document.getElementById("refreshButton").innerText = external.getUIString( + "cleanup_button" + ); + checkboxLabel.innerText = external.getUIString("cleanup_checkbox"); + + // Set up the confirmation button. + profileRefreshForm.attachEvent("onsubmit", function() { + var doProfileCleanup = document.getElementById("refreshCheckbox").checked; + external.gotoInstallPage(doProfileCleanup); + return false; + }); + + document.getElementById("refreshButton").focus(); +}); diff --git a/browser/installer/windows/nsis/content/stub_common.css b/browser/installer/windows/nsis/content/stub_common.css new file mode 100644 index 0000000000..a8d15512b5 --- /dev/null +++ b/browser/installer/windows/nsis/content/stub_common.css @@ -0,0 +1,37 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +body { + height: 100%; + width: 100%; + margin: 0; + padding: 0; + overflow: hidden; + + font-family: "Segoe UI", sans-serif; +} + +/* This is an rather than using background-image because IE8 + * does not support background-size. */ +#background { + min-height: 100%; + min-width: 100%; + + width: 100%; + height: auto; + + position: fixed; + top: 0; + left: 0; + + z-index: -1; +} + +body.high-contrast #background { + display: none; +} + +.no-focus-outline { + outline: none; +} diff --git a/browser/installer/windows/nsis/content/stub_common.js b/browser/installer/windows/nsis/content/stub_common.js new file mode 100644 index 0000000000..bcdf809b61 --- /dev/null +++ b/browser/installer/windows/nsis/content/stub_common.js @@ -0,0 +1,23 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + +window.attachEvent("onload", function() { + if (parseInt(external.getIsHighContrast())) { + document.body.className += " high-contrast"; + } else { + document.body.className += " normal-contrast"; + } + + document.body.style.fontFamily = external.getFontName() + ", sans-serif"; + + // All pages have the global footer (or don't, depending on the branding). + document.getElementById("footer").innerText = external.getUIString( + "global_footer" + ); + + // Disallow dragging of the "background" image. + document.getElementById("background").attachEvent("ondragstart", function() { + return false; + }); +}); -- cgit v1.2.3