Skip to content

Commit

Permalink
Merge branch 'branches/default/tip' of hg::https://hg.mozilla.org/rel…
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlex94 committed Jul 9, 2021
2 parents 53f6a28 + 3d1654a commit 75208a2
Show file tree
Hide file tree
Showing 45 changed files with 9,672 additions and 8,030 deletions.
1 change: 1 addition & 0 deletions .hgtags
Expand Up @@ -2498,3 +2498,4 @@ f685975ba5576001483e5521e06d5a0ccf9b5f54 FIREFOX_78_10_1esr_RELEASE
58d0b007bcedce2d87978431d472b1d81308ff36 FIREFOX_78_11_0esr_BUILD1
01d6500ecb254baea73ebad2fb3d29f182046952 FIREFOX_78_11_0esr_BUILD2
01d6500ecb254baea73ebad2fb3d29f182046952 FIREFOX_78_11_0esr_RELEASE
3d3d5640bfac60507d42648dc4d9c20e9e0f84a8 FIREFOX_78_12_0esr_BUILD1
18 changes: 18 additions & 0 deletions accessible/base/SelectionManager.cpp
Expand Up @@ -101,6 +101,24 @@ void SelectionManager::RemoveDocSelectionListener(PresShell* aPresShell) {
// selection.
Selection* spellSel = frameSel->GetSelection(SelectionType::eSpellCheck);
spellSel->RemoveSelectionListener(this);

if (mCurrCtrlNormalSel) {
if (mCurrCtrlNormalSel->GetPresShell() == aPresShell) {
// Remove 'this' registered as selection listener for the normal selection
// if we are removing listeners for its PresShell.
mCurrCtrlNormalSel->RemoveSelectionListener(this);
mCurrCtrlNormalSel = nullptr;
}
}

if (mCurrCtrlSpellSel) {
if (mCurrCtrlSpellSel->GetPresShell() == aPresShell) {
// Remove 'this' registered as selection listener for the spellcheck
// selection if we are removing listeners for its PresShell.
mCurrCtrlSpellSel->RemoveSelectionListener(this);
mCurrCtrlSpellSel = nullptr;
}
}
}

void SelectionManager::ProcessTextSelChangeEvent(AccEvent* aEvent) {
Expand Down
8 changes: 4 additions & 4 deletions accessible/mac/MOXAccessibleBase.mm
Expand Up @@ -240,13 +240,13 @@ - (id)accessibilityAttributeValue:(NSString*)attribute forParameter:(id)paramete

- (id)accessibilityHitTest:(NSPoint)point {
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
return [self moxHitTest:point];
return GetObjectOrRepresentedView([self moxHitTest:point]);
NS_OBJC_END_TRY_ABORT_BLOCK_NIL;
}

- (id)accessibilityFocusedUIElement {
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
return [self moxFocusedUIElement];
return GetObjectOrRepresentedView([self moxFocusedUIElement]);
NS_OBJC_END_TRY_ABORT_BLOCK_NIL;
}

Expand All @@ -261,11 +261,11 @@ - (BOOL)accessibilityNotifiesWhenDestroyed {
#pragma mark - MOXAccessible protocol

- (id)moxHitTest:(NSPoint)point {
return GetObjectOrRepresentedView(self);
return self;
}

- (id)moxFocusedUIElement {
return GetObjectOrRepresentedView(self);
return self;
}

- (void)moxPostNotification:(NSString*)notification {
Expand Down
11 changes: 11 additions & 0 deletions browser/components/enterprisepolicies/Policies.jsm
Expand Up @@ -184,6 +184,17 @@ var Policies = {
},
},

AutoLaunchProtocolsFromOrigins: {
onBeforeAddons(manager, param) {
for (let info of param) {
addAllowDenyPermissions(
`open-protocol-handler^${info.protocol}`,
info.allowed_origins
);
}
},
},

BlockAboutAddons: {
onBeforeUIStartup(manager, param) {
if (param) {
Expand Down
Expand Up @@ -48,6 +48,7 @@ body {

.main-content {
flex: 1;
scroll-padding: 25px;
}

.tab {
Expand Down
Expand Up @@ -108,6 +108,8 @@ let WebsiteFilter = {
let url = contentLocation.spec;
if (contentLocation.scheme == "view-source") {
url = contentLocation.pathQueryRef;
} else if (url.startsWith("about:reader")) {
url = decodeURIComponent(url.substr("about:reader?url=".length));
}
if (
contentType == Ci.nsIContentPolicy.TYPE_DOCUMENT ||
Expand Down
19 changes: 19 additions & 0 deletions browser/components/enterprisepolicies/schemas/policies-schema.json
Expand Up @@ -83,6 +83,25 @@
}
},

"AutoLaunchProtocolsFromOrigins": {
"type": ["JSON", "array"],
"items": {
"type": "object",
"properties": {
"allowed_origins": {
"type": "array",
"items": {
"type": "origin"
}
},
"protocol": {
"type": "string"
},
"required": ["allowed_origins", "protocol"]
}
}
},

"BlockAboutAddons": {
"type": "boolean"
},
Expand Down
Expand Up @@ -23,6 +23,10 @@ add_task(async function test_http() {
"view-source:" + SUPPORT_FILES_PATH + BLOCKED_PAGE,
true
);
await checkBlockedPage(
"about:reader?url=" + SUPPORT_FILES_PATH + BLOCKED_PAGE,
true
);
await checkBlockedPage(SUPPORT_FILES_PATH + EXCEPTION_PAGE, false);
});

Expand Down
Expand Up @@ -2,6 +2,11 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

XPCOMUtils.defineLazyModuleGetters(this, {
UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.jsm",
});

var updateService = Cc["@mozilla.org/updates/update-service;1"].getService(
Ci.nsIApplicationUpdateService
);
Expand Down Expand Up @@ -91,3 +96,20 @@ function waitForAboutDialog() {
openAboutDialog();
});
}

add_task(async function test_no_update_intervention() {
await BrowserTestUtils.withNewTab("about:blank", async () => {
let context = await UrlbarTestUtils.promiseAutocompleteResultPopup({
window,
value: "update firefox",
waitForFocus,
fireInputEvent: true,
});
for (let result of context.results) {
Assert.notEqual(result.type, UrlbarUtils.RESULT_TYPE.TIP);
}
await UrlbarTestUtils.promisePopupClose(window, () =>
window.gURLBar.blur()
);
});
});
Expand Up @@ -314,3 +314,25 @@ add_task(async function test_cookie_allow_session() {
Ci.nsICookiePermission.ACCESS_SESSION
);
});

// This again seems out of places, but AutoLaunchProtocolsFromOrigins
// is all permissions.
add_task(async function test_autolaunchprotocolsfromorigins() {
await setupPolicyEngineWithJson({
policies: {
AutoLaunchProtocolsFromOrigins: [
{
allowed_origins: ["https://allowsession.example.com"],
protocol: "test-protocol",
},
],
},
});
equal(
PermissionTestUtils.testPermission(
URI("https://allowsession.example.com"),
"open-protocol-handler^test-protocol"
),
Ci.nsIPermissionManager.ALLOW_ACTION
);
});
6 changes: 6 additions & 0 deletions browser/components/urlbar/UrlbarProviderInterventions.jsm
Expand Up @@ -576,6 +576,12 @@ class ProviderInterventions extends UrlbarProvider {
// how this special tip is handled.
this.currentTip = TIPS.UPDATE_CHECKING;
break;
case AppUpdater.STATUS.NO_UPDATER:
case AppUpdater.STATUS.UPDATE_DISABLED_BY_POLICY:
// If the updater is disabled at build time or at runtime, either by
// policy or because we're in a package, do not select any update tips.
this.currentTip = TIPS.NONE;
break;
default:
// Give up and ask the user to download the latest version from the
// web. We default to this case when the update is still downloading
Expand Down
2 changes: 1 addition & 1 deletion browser/installer/windows/nsis/shared.nsh
Expand Up @@ -854,7 +854,7 @@ ${EndIf}
; Write the uninstall registry keys
${WriteRegStr2} $1 "$0" "Comments" "${BrandFullNameInternal} ${AppVersion}$3 (${ARCH} ${AB_CD})" 0
${WriteRegStr2} $1 "$0" "DisplayIcon" "$8\${FileMainEXE},0" 0
${WriteRegStr2} $1 "$0" "DisplayName" "${BrandFullNameInternal} ${AppVersion}$3 (${ARCH} ${AB_CD})" 0
${WriteRegStr2} $1 "$0" "DisplayName" "${BrandFullNameInternal}$3 (${ARCH} ${AB_CD})" 0
${WriteRegStr2} $1 "$0" "DisplayVersion" "${AppVersion}" 0
${WriteRegStr2} $1 "$0" "HelpLink" "${HelpLink}" 0
${WriteRegStr2} $1 "$0" "InstallLocation" "$8" 0
Expand Down
Expand Up @@ -19,6 +19,8 @@ policy-AppUpdateURL = Set custom app update URL.
policy-Authentication = Configure integrated authentication for websites that support it.
policy-AutoLaunchProtocolsFromOrigins = Define a list of external protocols that can be used from listed origins without prompting the user.
policy-BlockAboutAddons = Block access to the Add-ons Manager (about:addons).
policy-BlockAboutConfig = Block access to the about:config page.
Expand Down
2 changes: 1 addition & 1 deletion dom/l10n/DOMLocalization.cpp
Expand Up @@ -464,7 +464,7 @@ bool DOMLocalization::ApplyTranslations(

nsTArray<L10nOverlaysError> errors;
for (size_t i = 0; i < aTranslations.Length(); ++i) {
Element* elem = aElements[i];
nsCOMPtr elem = aElements[i];
if (aTranslations[i].IsNull()) {
hasMissingTranslation = true;
continue;
Expand Down
6 changes: 3 additions & 3 deletions gfx/angle/checkout/out/gen/angle/angle_commit.h
@@ -1,4 +1,4 @@
#define ANGLE_COMMIT_HASH "3778168311ca"
#define ANGLE_COMMIT_HASH "31a43497be09"
#define ANGLE_COMMIT_HASH_SIZE 12
#define ANGLE_COMMIT_DATE "2021-02-11 17:43:41 -0800"
#define ANGLE_COMMIT_POSITION 14225
#define ANGLE_COMMIT_DATE "2021-06-11 16:58:24 -0700"
#define ANGLE_COMMIT_POSITION 14226
Expand Up @@ -223,8 +223,8 @@ bool Image11::redefine(gl::TextureType type,
const gl::Extents &size,
bool forceRelease)
{
if (mWidth != size.width || mHeight != size.height || mInternalFormat != internalformat ||
forceRelease)
if (mWidth != size.width || mHeight != size.height || mDepth != size.depth ||
mInternalFormat != internalformat || forceRelease)
{
// End the association with the TextureStorage, since that data will be out of date.
// Also reset mRecoveredFromStorageCount since this Image is getting completely redefined.
Expand Down
15 changes: 15 additions & 0 deletions gfx/angle/cherry_picks.txt
@@ -1,3 +1,18 @@
commit 31a43497be0980c7bb2b7e3c069fc431705c849e
Author: Jamie Madill <jmadill@chromium.org>
Date: Thu May 20 12:22:46 2021 -0400

D3D11: Fix respecifying 3D textures.

The missing check for the "Depth" dimension could lead to a bug
where we would not recreate a texture when the dimension changed.

Bug: chromium:1210414
Change-Id: Id59097ad14ae77ff80d27081f61786dad17a77ea
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2911032
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>

commit 3778168311ca10e8d57b3bce16bfcbc0f5b0dd01
Author: Jeff Gilbert <jdashg@gmail.com>
Date: Thu Feb 11 17:34:00 2021 -0800
Expand Down
6 changes: 5 additions & 1 deletion layout/base/nsCSSFrameConstructor.cpp
Expand Up @@ -3229,7 +3229,11 @@ void nsCSSFrameConstructor::ConstructTextFrame(
// Add the newly constructed frame to the flow
aFrameList.AppendFrame(nullptr, newFrame);

if (!aState.mCreatingExtraFrames) aContent->SetPrimaryFrame(newFrame);
if (!aState.mCreatingExtraFrames ||
(aContent->IsInNativeAnonymousSubtree() &&
!aContent->GetPrimaryFrame())) {
aContent->SetPrimaryFrame(newFrame);
}
}

/* static */
Expand Down
8 changes: 8 additions & 0 deletions layout/style/ImageLoader.cpp
Expand Up @@ -82,6 +82,10 @@ void ImageLoader::Init() {

/* static */
void ImageLoader::Shutdown() {
for (const auto& entry : *sImages) {
entry.GetKey()->CancelAndForgetObserver(NS_BINDING_ABORTED);
}

delete sImages;
sImages = nullptr;
sImageObserver = nullptr;
Expand Down Expand Up @@ -451,6 +455,10 @@ void ImageLoader::UnloadImage(imgRequestProxy* aImage) {
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aImage);

if (MOZ_UNLIKELY(!sImages)) {
return; // Shutdown() takes care of it.
}

auto lookup = sImages->Lookup(aImage);
MOZ_DIAGNOSTIC_ASSERT(lookup, "Unregistered image?");
if (MOZ_UNLIKELY(!lookup)) {
Expand Down
9 changes: 3 additions & 6 deletions layout/style/nsStyleStruct.cpp
Expand Up @@ -203,13 +203,10 @@ class StyleImageRequestCleanupTask final : public mozilla::Runnable {
// This is defined here for parallelism with LoadURI.
void Gecko_LoadData_Drop(StyleLoadData* aData) {
if (aData->resolved_image) {
// We want to dispatch this async to prevent reentrancy issues, as
// imgRequestProxy going away can destroy documents, etc, see bug 1677555.
auto task = MakeRefPtr<StyleImageRequestCleanupTask>(*aData);
if (NS_IsMainThread()) {
task->Run();
} else {
// if Resolve was not called at some point, mDocGroup is not set.
SchedulerGroup::Dispatch(TaskCategory::Other, task.forget());
}
SchedulerGroup::Dispatch(TaskCategory::Other, task.forget());
}

// URIs are safe to refcount from any thread.
Expand Down

0 comments on commit 75208a2

Please sign in to comment.