Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • gk/tor-browser
  • peterstory/tor-browser
  • sanketh/tor-browser
  • acat/tor-browser
  • sysrqb/tor-browser
  • boklm/tor-browser
  • dan/tor-browser
  • fabrizio/tor-browser
  • victorvw/tor-browser
  • aguestuser/tor-browser
  • WofWca/tor-browser
  • p13dz/tor-browser
  • mwolfe/tor-browser
  • tpo/applications/tor-browser
  • brade/tor-browser
  • pierov/tor-browser
  • ma1/tor-browser
  • JeremyRand/tor-browser
  • henry/tor-browser
  • msimonelli/tor-browser
  • cypherpunks1/tor-browser
  • blackZwork/tor-browser
  • starlingroot/tor-browser
  • cohosh/tor-browser
  • t-m-w/tor-browser
  • trinity-1686a/tor-browser
  • HHN/tor-browser
  • emmapeel/tor-browser
  • Achintya_Sharma/tor-browser
  • guest475646844/tor-browser
  • Mima/tor-browser
  • morgan/tor-browser
  • clairehurst/tor-browser
  • NoisyCoil/tor-browser
  • gus/tor-browser
  • Francewhoa/tor-browser
  • novialriptide/tor-browser
  • jwilde/tor-browser
  • brizental/tor-browser
  • ourhopeforfreedom/tor-browser
  • onyinyang/tor-browser
  • Noino/tor-browser
  • murmelurmel/tor-browser
43 results
Show changes
Showing
with 145 additions and 124 deletions
......@@ -87,6 +87,7 @@ interface IHandlerControl : IUnknown
HRESULT OnTextChange([in] long aHwnd, [in] long aIA2UniqueId,
[in] VARIANT_BOOL aIsInsert,
[in] IA2TextSegment* aText);
HRESULT SuppressA11yForClipboardCopy();
}
typedef struct _IARelationData
......
......@@ -60,6 +60,8 @@ skip-if =
[browser_treeupdate_list_editabledoc.js]
[browser_treeupdate_listener.js]
[browser_treeupdate_move.js]
skip-if =
os == "win" && os_version == "6.1" # Skip on Azure - frequent failure
[browser_treeupdate_optgroup.js]
[browser_treeupdate_removal.js]
[browser_treeupdate_select_dropdown.js]
......
......@@ -22,6 +22,7 @@ skip-if =
[browser_test_focus_urlbar.js]
skip-if =
os == 'win' && os_version == '10.0' # Bug 1492259
os == "win" && os_version == "6.1" # Skip on Azure - frequent failure
[browser_test_A11yUtils_announce.js]
[browser_test_selection_urlbar.js]
skip-if =
......
......@@ -12,6 +12,7 @@ https_first_disabled = true
[browser_nested_iframe.js]
skip-if =
os == 'mac' && bits == 64 && !debug # Bug 1659435
os == "win" && os_version == "6.1" # Skip on Azure - frequent failure
[browser_reframe_root.js]
[browser_reframe_visibility.js]
[browser_src_change.js]
......
......@@ -267,3 +267,20 @@ bool AccessibleWrap::DispatchTextChangeToHandler(Accessible* aAcc,
return SUCCEEDED(hr);
}
/* static */
void AccessibleWrap::SuppressHandlerA11yForClipboardCopy() {
if (!sHandlerControllers || sHandlerControllers->IsEmpty()) {
return;
}
// The original intent was that AccessibleHandler would be used in any
// process that wanted to access Gecko a11y. That didn't work out for various
// reasons. In practice, there is only a single AccessibleHandlerControl which
// is for our own parent process, used for in-process client calls. That also
// means we don't need to worry about async invokation here.
auto& controller = sHandlerControllers->ElementAt(0);
MOZ_ASSERT(controller.mPid == ::GetCurrentProcessId() &&
!controller.mIsProxy);
DebugOnly<HRESULT> hr = controller.mCtrl->SuppressA11yForClipboardCopy();
MOZ_ASSERT(SUCCEEDED(hr));
}
......@@ -67,6 +67,8 @@ class AccessibleWrap : public LocalAccessible {
const nsString& aText, int32_t aStart,
uint32_t aLen);
static void SuppressHandlerA11yForClipboardCopy();
protected:
virtual ~AccessibleWrap() = default;
......
......@@ -243,3 +243,41 @@ void Compatibility::GetHumanReadableConsumersStr(nsAString& aResult) {
}
}
}
// Time when SuppressA11yForClipboardCopy() was called, as returned by
// ::GetTickCount().
static DWORD sA11yClipboardCopySuppressionStartTime = 0;
/* static */
void Compatibility::SuppressA11yForClipboardCopy() {
// Bug 1774285: Windows Suggested Actions (introduced in Windows 11 22H2)
// might walk the a11y tree using UIA whenever anything is copied to the
// clipboard. This causes an unacceptable hang, particularly when the cache
// is disabled.
bool doSuppress = [&] {
switch (
StaticPrefs::accessibility_windows_suppress_after_clipboard_copy()) {
case 0:
return false;
case 1:
return true;
default:
return NeedsWindows11SuggestedActionsWorkaround();
}
}();
if (doSuppress) {
sA11yClipboardCopySuppressionStartTime = ::GetTickCount();
AccessibleWrap::SuppressHandlerA11yForClipboardCopy();
}
}
/* static */
bool Compatibility::IsA11ySuppressedForClipboardCopy() {
constexpr DWORD kSuppressTimeout = 1500; // ms
if (!sA11yClipboardCopySuppressionStartTime) {
return false;
}
return ::GetTickCount() - sA11yClipboardCopySuppressionStartTime <
kSuppressTimeout;
}
......@@ -77,6 +77,9 @@ class Compatibility {
static bool IsModuleVersionLessThan(HMODULE aModuleHandle,
unsigned long long aVersion);
static void SuppressA11yForClipboardCopy();
static bool IsA11ySuppressedForClipboardCopy();
private:
Compatibility();
Compatibility(const Compatibility&);
......
......@@ -214,6 +214,14 @@ bool LazyInstantiator::IsBlockedInjection() {
* @return true if we should instantiate a11y
*/
bool LazyInstantiator::ShouldInstantiate(const DWORD aClientTid) {
if (Compatibility::IsA11ySuppressedForClipboardCopy()) {
// Bug 1774285: Windows Suggested Actions (introduced in Windows 11 22H2)
// walks the entire a11y tree using UIA whenever anything is copied to the
// clipboard. This causes an unacceptable hang, particularly when the cache
// is disabled. Don't allow a11y to be instantiated by this.
return false;
}
if (!aClientTid) {
// aClientTid == 0 implies that this is either an in-process call, or else
// we failed to retrieve information about the remote caller.
......
......@@ -11,6 +11,7 @@
#include "ia2AccessibleTable.h"
#include "ia2AccessibleTableCell.h"
#include "mozilla/a11y/AccessibleWrap.h"
#include "mozilla/a11y/Compatibility.h"
#include "mozilla/a11y/DocAccessibleParent.h"
#include "mozilla/dom/BrowserBridgeChild.h"
#include "mozilla/dom/BrowserBridgeParent.h"
......@@ -664,10 +665,16 @@ static bool VisitDocAccessibleParentDescendantsAtTopLevelInContentProcess(
dom::BrowserParent* aBrowser, Callback aCallback) {
// We can't use BrowserBridgeParent::VisitAllDescendants because it doesn't
// provide a way to stop the search.
const auto& bridges = aBrowser->ManagedPBrowserBridgeParent();
return std::all_of(bridges.cbegin(), bridges.cend(), [&](const auto& key) {
auto* bridge = static_cast<dom::BrowserBridgeParent*>(key);
dom::BrowserParent* childBrowser = bridge->GetBrowserParent();
const auto& rawBridges = aBrowser->ManagedPBrowserBridgeParent();
nsTArray<RefPtr<dom::BrowserBridgeParent>> bridges(rawBridges.Count());
for (const auto bridge : rawBridges) {
bridges.AppendElement(static_cast<dom::BrowserBridgeParent*>(bridge));
}
return std::all_of(bridges.cbegin(), bridges.cend(), [&](const auto& bridge) {
RefPtr<dom::BrowserParent> childBrowser = bridge->GetBrowserParent();
if (!childBrowser) {
return true;
}
DocAccessibleParent* childDocAcc = childBrowser->GetTopLevelDocAccessible();
if (!childDocAcc || childDocAcc->IsShutdown()) {
return true;
......@@ -920,6 +927,15 @@ MsaaAccessible::get_accChildCount(long __RPC_FAR* pcountChildren) {
if (!mAcc) return CO_E_OBJNOTCONNECTED;
if (Compatibility::IsA11ySuppressedForClipboardCopy() && mAcc->IsRoot()) {
// Bug 1798098: Windows Suggested Actions (introduced in Windows 11 22H2)
// might walk the entire a11y tree using UIA whenever anything is copied to
// the clipboard. This causes an unacceptable hang, particularly when the
// cache is disabled. We prevent this tree walk by returning a 0 child count
// for the root window, from which Windows might walk.
return S_OK;
}
if (nsAccUtils::MustPrune(mAcc)) return S_OK;
*pcountChildren = mAcc->ChildCount();
......
......@@ -25,6 +25,13 @@ class DOMFullscreenChild extends JSWindowActorChild {
let remoteFrameBC = aMessage.data.remoteFrameBC;
if (remoteFrameBC) {
let remoteFrame = remoteFrameBC.embedderElement;
if (!remoteFrame) {
// This could happen when the page navigate away and trigger a
// process switching during fullscreen transition, tell the parent
// to just exit.
this.sendAsyncMessage("DOMFullscreen:Exit", {});
break;
}
this._isNotTheRequestSource = true;
windowUtils.remoteFrameFullscreenChanged(remoteFrame);
} else {
......
......@@ -131,6 +131,7 @@ class DOMFullscreenParent extends JSWindowActorParent {
let window = browser.ownerGlobal;
switch (aMessage.name) {
case "DOMFullscreen:Request": {
this.manager.fullscreen = true;
this.waitingForChildExitFullscreen = false;
this.requestOrigin = this;
this.addListeners(window);
......@@ -148,6 +149,7 @@ class DOMFullscreenParent extends JSWindowActorParent {
break;
}
case "DOMFullscreen:Entered": {
this.manager.fullscreen = true;
this.nextMsgRecipient = null;
this.waitingForChildEnterFullscreen = false;
window.FullScreen.enterDomFullscreen(browser, this);
......@@ -155,11 +157,13 @@ class DOMFullscreenParent extends JSWindowActorParent {
break;
}
case "DOMFullscreen:Exit": {
this.manager.fullscreen = false;
this.waitingForChildEnterFullscreen = false;
window.windowUtils.remoteFrameFullscreenReverted();
break;
}
case "DOMFullscreen:Exited": {
this.manager.fullscreen = false;
this.waitingForChildExitFullscreen = false;
this.cleanupDomFullscreen(window);
this.updateFullscreenWindowReference(window);
......@@ -202,6 +206,12 @@ class DOMFullscreenParent extends JSWindowActorParent {
TelemetryStopwatch.start("FULLSCREEN_CHANGE_MS");
window.FullScreen.enterDomFullscreen(browser, this);
this.updateFullscreenWindowReference(window);
if (!this.hasBeenDestroyed() && this.requestOrigin) {
window.PointerlockFsWarning.showFullScreen(
this.requestOrigin.manager.documentPrincipal.originNoSuffix
);
}
break;
}
case "MozDOMFullscreen:Exited": {
......
......@@ -100,7 +100,7 @@ class FormValidationParent extends JSWindowActorParent {
return;
}
this._showPopup(data);
this._showPopup(browser, data);
break;
case "FormValidation:HidePopup":
this._hidePopup();
......@@ -115,8 +115,8 @@ class FormValidationParent extends JSWindowActorParent {
case "scroll":
this._hidePopup();
break;
case "popuphiding":
this._onPopupHiding(aEvent);
case "popuphidden":
this._onPopupHidden(aEvent);
break;
}
}
......@@ -125,8 +125,8 @@ class FormValidationParent extends JSWindowActorParent {
* Internal
*/
_onPopupHiding(aEvent) {
aEvent.originalTarget.removeEventListener("popuphiding", this, true);
_onPopupHidden(aEvent) {
aEvent.originalTarget.removeEventListener("popuphidden", this, true);
Services.obs.removeObserver(this._obs, "popup-shown");
let tabBrowser = aEvent.originalTarget.ownerGlobal.gBrowser;
tabBrowser.selectedBrowser.removeEventListener("scroll", this, true);
......@@ -141,47 +141,46 @@ class FormValidationParent extends JSWindowActorParent {
* Shows the form validation popup at a specified position or updates the
* messaging and position if the popup is already displayed.
*
* @aBrowser - Browser element that requests the popup.
* @aPanelData - Object that contains popup information
* aPanelData stucture detail:
* screenRect - the screen rect of the target element.
* position - popup positional string constants.
* message - the form element validation message text.
*/
_showPopup(aPanelData) {
_showPopup(aBrowser, aPanelData) {
let previouslyShown = !!this._panel;
this._panel = this._getAndMaybeCreatePanel();
this._panel.firstChild.textContent = aPanelData.message;
let browser = this.browsingContext.top.embedderElement;
let window = browser.ownerGlobal;
let tabBrowser = window.gBrowser;
// Display the panel if it isn't already visible.
if (!previouslyShown) {
// Cleanup after the popup is hidden
this._panel.addEventListener("popuphiding", this, true);
// Hide ourselves if other popups shown
this._obs = new PopupShownObserver(this.browsingContext);
Services.obs.addObserver(this._obs, "popup-shown", true);
// Hide if the user scrolls the page
tabBrowser.selectedBrowser.addEventListener("scroll", this, true);
tabBrowser.selectedBrowser.addEventListener("FullZoomChange", this);
tabBrowser.selectedBrowser.addEventListener("TextZoomChange", this);
// Open the popup
let rect = aPanelData.screenRect;
this._panel.openPopupAtScreenRect(
aPanelData.position,
rect.left,
rect.top,
rect.width,
rect.height,
false,
false
);
if (previouslyShown) {
return;
}
// Cleanup after the popup is hidden
this._panel.addEventListener("popuphidden", this, true);
// Hide ourselves if other popups shown
this._obs = new PopupShownObserver(this.browsingContext);
Services.obs.addObserver(this._obs, "popup-shown", true);
// Hide if the user scrolls the page
aBrowser.addEventListener("scroll", this, true);
aBrowser.addEventListener("FullZoomChange", this);
aBrowser.addEventListener("TextZoomChange", this);
aBrowser.constrainPopup(this._panel);
// Open the popup
let rect = aPanelData.screenRect;
this._panel.openPopupAtScreenRect(
aPanelData.position,
rect.left,
rect.top,
rect.width,
rect.height,
false,
false
);
}
/*
......
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* 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/. */
var EXPORTED_SYMBOLS = ["RFPHelperChild"];
const { XPCOMUtils } = ChromeUtils.import(
"resource://gre/modules/XPCOMUtils.jsm"
);
const kPrefLetterboxing = "privacy.resistFingerprinting.letterboxing";
XPCOMUtils.defineLazyPreferenceGetter(
this,
"isLetterboxingEnabled",
kPrefLetterboxing,
false
);
class RFPHelperChild extends JSWindowActorChild {
handleEvent(event) {
if (isLetterboxingEnabled && event.type == "resize") {
this.sendAsyncMessage("Letterboxing:ContentSizeUpdated");
}
}
}
1; /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* 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/. */
var EXPORTED_SYMBOLS = ["RFPHelperParent"];
const { XPCOMUtils } = ChromeUtils.import(
"resource://gre/modules/XPCOMUtils.jsm"
);
const kPrefLetterboxing = "privacy.resistFingerprinting.letterboxing";
XPCOMUtils.defineLazyPreferenceGetter(
this,
"isLetterboxingEnabled",
kPrefLetterboxing,
false
);
class RFPHelperParent extends JSWindowActorParent {
receiveMessage(aMessage) {
if (
isLetterboxingEnabled &&
aMessage.name == "Letterboxing:ContentSizeUpdated"
) {
let browser = this.browsingContext.top.embedderElement;
let window = browser.ownerGlobal;
window.RFPHelper.contentSizeUpdated(window);
}
}
}
......@@ -80,8 +80,6 @@ FINAL_TARGET_FILES.actors += [
"PromptParent.jsm",
"RefreshBlockerChild.jsm",
"RefreshBlockerParent.jsm",
"RFPHelperChild.jsm",
"RFPHelperParent.jsm",
"ScreenshotsComponentChild.jsm",
"SearchSERPTelemetryChild.jsm",
"SearchSERPTelemetryParent.jsm",
......
......@@ -97,10 +97,12 @@ tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME) $(objdir)/macbuild/Contents/MacOS-
rsync -aL $(DIST)/bin/$(MOZ_APP_NAME) '$(dist_dest)/Contents/MacOS'
cp -RL $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/firefox.icns '$(dist_dest)/Contents/Resources/firefox.icns'
cp -RL $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/document.icns '$(dist_dest)/Contents/Resources/document.icns'
ifndef BASE_BROWSER_UPDATE
$(MKDIR) -p '$(dist_dest)/Contents/Library/LaunchServices'
ifdef MOZ_UPDATER
mv -f '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater' '$(dist_dest)/Contents/Library/LaunchServices'
ln -s ../../../../Library/LaunchServices/org.mozilla.updater '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater'
endif
endif
printf APPLMOZB > '$(dist_dest)/Contents/PkgInfo'
endif
......@@ -17,7 +17,6 @@
#if defined(MOZ_CRASHREPORTER)
/minidump-analyzer
#endif
/pingsender
/pk12util
/ssltunnel
/xpcshell
......
......@@ -53,11 +53,6 @@ LOCAL_INCLUDES += [
"/xpcom/build",
]
# The pthred_create() interposer needs to be linked as early as possible so
# that it will appear before libpthread when resolving symbols.
if CONFIG["OS_ARCH"] == "Linux" and CONFIG["MOZ_CRASHREPORTER"]:
USE_LIBS += ["pthread_create_interposer"]
if CONFIG["LIBFUZZER"]:
USE_LIBS += ["fuzzer"]
LOCAL_INCLUDES += [
......
......@@ -6,22 +6,3 @@
# * permission is an integer between 1 and 15
# Permissions defined here will also be set for private browsing.
# See PermissionManager.cpp for more...
# UITour
# Bug 1557153: www.mozilla.org gets a special workaround in UITourChild.jsm
origin uitour 1 https://www.mozilla.org
origin uitour 1 https://monitor.firefox.com
origin uitour 1 https://screenshots.firefox.com
origin uitour 1 https://support.mozilla.org
origin uitour 1 https://truecolors.firefox.com
origin uitour 1 about:home
origin uitour 1 about:newtab
# XPInstall
origin install 1 https://addons.mozilla.org
# Remote troubleshooting
origin remote-troubleshooting 1 https://support.mozilla.org
# addon install
origin install 1 https://fpn.firefox.com