Skip to content

Commit

Permalink
Revert "restore v11.2.1"
Browse files Browse the repository at this point in the history
This reverts commit 88d5a1a.
  • Loading branch information
Ponchale committed Mar 5, 2024
1 parent 88d5a1a commit 248b6a3
Show file tree
Hide file tree
Showing 658 changed files with 54,651 additions and 40,736 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ jobs:
MOZ_BUILD_DATE= os.environ["GHA_MOZ_BUILD_DATE"]
os.system("sudo apt update")
os.system("sudo apt install xvfb")
os.system("sudo apt install libasound2-dev")
os.system("sudo apt install xvfb libasound2-dev pkg-config")
shutil.copyfile("./.github/workflows/src/linux/shared/mozconfig_linux_base","./mozconfig")
# os.system("cp ./.github/workflows/src/linux/shared/mozconfig_linux_base ./mozconfig")
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pull-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ jobs:
run: |
export DATE_STR=`date +"%Y%m%d%I%M%S"`
echo "DATE_STR=$DATE_STR" >> $GITHUB_ENV
- name: Setup git 🪛
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
- name: Setup git-cinnabar 🪛
run: |
cd ~
Expand All @@ -32,22 +34,26 @@ jobs:
export PATH=~/git-cinnabar:$PATH
cd ~
git cinnabar download
- name: Clone mozilla-unified 🧬
run: |
export PATH=~/git-cinnabar:$PATH
git clone hg::https://hg.mozilla.org/mozilla-unified
cd mozilla-unified
git rev-list --count origin/bookmarks/esr115
git checkout -b upstream-esr115-${DATE_STR} origin/bookmarks/esr115
- name: Fetch Midori 📥
run: |
cd mozilla-unified
git remote add midori-desktop https://${GITHUB_ACTOR}:${{ github.token }}@github.com/${{ github.repository }}
git fetch midori-desktop
- name: Push 🎁
run: |
cd mozilla-unified
git push midori-desktop upstream-esr115-${DATE_STR}
- name: Create Pull Request
run: |
cd mozilla-unified
Expand Down
5 changes: 4 additions & 1 deletion .hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -4391,4 +4391,7 @@ bf2f656d025836975b7bf6aeb16901a037a01923 FIREFOX_115_2_0esr_RELEASE
7e770707fe156fc2e62c5f624235e4b2dadc1e7b FIREFOX_115_4_0esr_RELEASE
8a02a7c43f1eddfd18926f0266d188b4f359c0aa FIREFOX_115_5_0esr_BUILD1
8a02a7c43f1eddfd18926f0266d188b4f359c0aa FIREFOX_115_5_0esr_RELEASE
aa9f02961b2bbb92e17fea5d6b8fd14c097baf72 FIREFOX_115_6_0esr_BUILD1
aa9f02961b2bbb92e17fea5d6b8fd14c097baf72 FIREFOX_115_6_0esr_BUILD1
aa9f02961b2bbb92e17fea5d6b8fd14c097baf72 FIREFOX_115_6_0esr_RELEASE
980ec32f825b2f54c05d16057a6e60d5b62d2ee2 FIREFOX_115_7_0esr_BUILD1
980ec32f825b2f54c05d16057a6e60d5b62d2ee2 FIREFOX_115_7_0esr_RELEASE
2 changes: 1 addition & 1 deletion CLOBBER
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.

Merge day clobber 2023-11-20
Merge day clobber 2024-01-22
16 changes: 16 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Midori Browser is available for Windows, macOS, and Linux. You can install it by

- Windows 10 or later. (Windows 7 and 8 are not supported)

- x86_64 CPU architecture. AArch64 is not supported.
- x86_64 CPU architecture. AArch64 is supported for Linux & Windows.

- Midori provides "exe" installer & "Winget" install.

Expand Down
2 changes: 1 addition & 1 deletion accessible/base/HTMLMarkupMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ MARKUPMAP(
// A <tr> within a row isn't valid.
return nullptr;
}
const nsRoleMapEntry* roleMapEntry = aria::GetRoleMap(aElement);
const nsRoleMapEntry* roleMapEntry = aria::GetRoleMap(aElement);
if (roleMapEntry && roleMapEntry->role != roles::NOTHING &&
roleMapEntry->role != roles::ROW) {
// There is a valid ARIA role which isn't "row". Don't treat this as an
Expand Down
15 changes: 13 additions & 2 deletions accessible/base/NotificationController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,18 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
void NotificationController::Shutdown() {
if (mObservingState != eNotObservingRefresh &&
mPresShell->RemoveRefreshObserver(this, FlushType::Display)) {
// Note, this was our last chance to unregister, since we're about to
// clear mPresShell further down in this function.
mObservingState = eNotObservingRefresh;
}

MOZ_RELEASE_ASSERT(mObservingState == eNotObservingRefresh,
"Must unregister before being destroyed (and we just "
"passed our last change to unregister)");
// Immediately null out mPresShell, to prevent us from being registered as a
// refresh observer again.
mPresShell = nullptr;

// Shutdown handling child documents.
int32_t childDocCount = mHangingChildDocuments.Length();
for (int32_t idx = childDocCount - 1; idx >= 0; idx--) {
Expand Down Expand Up @@ -434,9 +443,11 @@ void NotificationController::ScheduleContentInsertion(
}

void NotificationController::ScheduleProcessing() {
// If notification flush isn't planed yet start notification flush
// If notification flush isn't planned yet, start notification flush
// asynchronously (after style and layout).
if (mObservingState == eNotObservingRefresh) {
// Note: the mPresShell null-check might be unnecessary; it's just to prevent
// a null-deref here, if we somehow get called after we've been shut down.
if (mObservingState == eNotObservingRefresh && mPresShell) {
if (mPresShell->AddRefreshObserver(this, FlushType::Display,
"Accessibility notifications")) {
mObservingState = eRefreshObserving;
Expand Down
3 changes: 3 additions & 0 deletions browser/actors/PromptParent.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ export class PromptParent extends JSWindowActorParent {

switch (message.name) {
case "Prompt:Open":
if (!this.windowContext.isActiveInTab) {
return undefined;
}
if (
(args.modalType === Ci.nsIPrompt.MODAL_TYPE_CONTENT &&
!lazy.contentPromptSubDialog) ||
Expand Down
3 changes: 3 additions & 0 deletions browser/base/content/browser-fullScreenAndPointerLock.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ var PointerlockFsWarning = {
if (this._state == "hiding") {
this._element.hidden = true;
}
if (this._state == "onscreen") {
window.dispatchEvent(new CustomEvent("FullscreenWarningOnScreen"));
}
break;
}
case "activate": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,133 @@ add_task(async function test_permission_prompt_closes_fullscreen() {
BrowserTestUtils.removeTab(tab);
await SpecialPowers.popPrefEnv();
});

function triggerMainCommand(popup) {
let notifications = popup.childNodes;
ok(!!notifications.length, "at least one notification displayed");
let notification = notifications[0];
info("Triggering main command for notification " + notification.id);
EventUtils.synthesizeMouseAtCenter(notification.button, {});
}

add_task(
async function test_permission_prompt_closes_fullscreen_and_extends_security_delay() {
const TEST_SECURITY_DELAY = 500;
await SpecialPowers.pushPrefEnv({
set: [
["dom.webnotifications.requireuserinteraction", false],
["permissions.fullscreen.allowed", false],
["security.notification_enable_delay", TEST_SECURITY_DELAY],
// macOS is not affected by the sec delay bug because it uses the native
// macOS full screen API. Revert back to legacy behavior so we can also
// test on macOS. If this pref is removed in the future we can consider
// skipping the testcase for macOS altogether.
["full-screen-api.macos-native-full-screen", false],
],
});

let tab = await BrowserTestUtils.openNewForegroundTab(
gBrowser,
"https://example.com"
);
let browser = tab.linkedBrowser;
info("Entering DOM full-screen");
await changeFullscreen(browser, true);

let popupShown = BrowserTestUtils.waitForPopupEvent(
window.PopupNotifications.panel,
"shown"
);
let fullScreenExit = waitForFullScreenState(browser, false);

info("Requesting notification permission");
requestNotificationPermission(browser).catch(() => {});
await popupShown;

let notificationHiddenPromise = BrowserTestUtils.waitForPopupEvent(
window.PopupNotifications.panel,
"hidden"
);

info("Waiting for full-screen exit");
await fullScreenExit;

info("Wait for original security delay to expire.");
SimpleTest.requestFlakyTimeout(
"Wait for original security delay to expire."
);
// eslint-disable-next-line mozilla/no-arbitrary-setTimeout
await new Promise(resolve => setTimeout(resolve, TEST_SECURITY_DELAY));

info(
"Trigger main action via button click during the extended security delay"
);
triggerMainCommand(PopupNotifications.panel);

let notification = PopupNotifications.getNotification(
"web-notifications",
gBrowser.selectedBrowser
);

// Linux in CI seems to skip the full screen animation, which means its not
// affected by the bug and we can't test extension of the sec delay here.
if (Services.appinfo.OS == "Linux") {
todo(
notification &&
!notification.dismissed &&
BrowserTestUtils.is_visible(PopupNotifications.panel.firstChild),
"Notification should still be open because we clicked during the security delay."
);
} else {
ok(
notification &&
!notification.dismissed &&
BrowserTestUtils.is_visible(PopupNotifications.panel.firstChild),
"Notification should still be open because we clicked during the security delay."
);
}

// If the notification is no longer shown (test failure) skip the remaining
// checks.
if (!notification) {
// Cleanup
BrowserTestUtils.removeTab(tab);
await SpecialPowers.popPrefEnv();
// Remove the granted notification permission.
Services.perms.removeAll();
return;
}

Assert.greater(
notification.timeShown,
performance.now(),
"Notification timeShown property should be in the future, because the security delay was extended."
);

// Ensure that once the security delay has passed the notification can be
// closed again.
let fakeTimeShown = TEST_SECURITY_DELAY + 500;
info(`Manually set timeShown to ${fakeTimeShown}ms in the past.`);
notification.timeShown = performance.now() - fakeTimeShown;

info("Trigger main action via button click outside security delay");
triggerMainCommand(PopupNotifications.panel);

info("Wait for panel to be hidden.");
await notificationHiddenPromise;

ok(
!PopupNotifications.getNotification(
"web-notifications",
gBrowser.selectedBrowser
),
"Should not longer see the notification."
);

// Cleanup
BrowserTestUtils.removeTab(tab);
await SpecialPowers.popPrefEnv();
// Remove the granted notification permission.
Services.perms.removeAll();
}
);
2 changes: 1 addition & 1 deletion browser/branding/official/branding.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
!define OFFICIAL
!define URLStubDownloadX86 "https://github.com/goastian/midori-desktop/releases/latest/download/midori-win32.installer.exe"
!define URLStubDownloadAMD64 "https://github.com/goastian/midori-desktop/releases/latest/download/midori-win64.installer.exe"
!define URLStubDownloadAArch64 ""
!define URLStubDownloadAArch64 "https://github.com/goastian/midori-desktop/releases/latest/download/midori-win64-aarch64.installer.exe"
!define URLManualDownload ""
!define URLSystemRequirements "https://astian.org/community/midori-browser/midori-system-requirements//"
!define Channel "release"
Expand Down
32 changes: 22 additions & 10 deletions browser/components/enterprisepolicies/Policies.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1695,6 +1695,7 @@ export var Policies = {
onBeforeAddons(manager, param) {
let allowedPrefixes = [
"accessibility.",
"alerts.",
"app.update.",
"browser.",
"datareporting.policy.",
Expand Down Expand Up @@ -1793,7 +1794,9 @@ export var Policies = {
Services.prefs.unlockPref(preference);
}
try {
switch (typeof param[preference].Value) {
let prefType =
param[preference].Type || typeof param[preference].Value;
switch (prefType) {
case "boolean":
prefBranch.setBoolPref(preference, param[preference].Value);
break;
Expand All @@ -1803,14 +1806,9 @@ export var Policies = {
throw new Error(`Non-integer value for ${preference}`);
}

// This is ugly, but necessary. On Windows GPO and macOS
// configs, booleans are converted to 0/1. In the previous
// Preferences implementation, the schema took care of
// automatically converting these values to booleans.
// Since we allow arbitrary prefs now, we have to do
// something different. See bug 1666836.
// Even uglier, because pdfjs prefs are set async, we need
// to get their type from PdfJsDefaultPreferences.
// Because pdfjs prefs are set async, we can't check the
// default pref branch to see if they are int or bool, so we
// have to get their type from PdfJsDefaultPreferences.
if (preference.startsWith("pdfjs.")) {
let preferenceTail = preference.replace("pdfjs.", "");
if (
Expand All @@ -1825,7 +1823,21 @@ export var Policies = {
!!param[preference].Value
);
}
} else if (
break;
}

// This is ugly, but necessary. On Windows GPO and macOS
// configs, booleans are converted to 0/1. In the previous
// Preferences implementation, the schema took care of
// automatically converting these values to booleans.
// Since we allow arbitrary prefs now, we have to do
// something different. See bug 1666836, 1668374, and 1872267.

// We only set something as int if it was explicit in policy,
// the same type as the default pref, or NOT 0/1. Otherwise
// we set it as bool.
if (
param[preference].Type == "number" ||
prefBranch.getPrefType(preference) == prefBranch.PREF_INT ||
![0, 1].includes(param[preference].Value)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,10 @@
"Status": {
"type": "string",
"enum": ["default", "locked", "user", "clear"]
},
"Type": {
"type": "string",
"enum": ["number", "boolean", "string"]
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions browser/components/enterprisepolicies/tests/xpcshell/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ function checkDefaultPref(prefName, prefValue) {
Services.prefs.PREF_INVALID,
`Pref ${prefName} is set on the default branch`
);
strictEqual(
Preferences.get(prefName),
prefValue,
`Pref ${prefName} has the correct value`
);
}

function checkUnsetPref(prefName) {
Expand Down
Loading

0 comments on commit 248b6a3

Please sign in to comment.