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
Commits on Source (99)
Showing
with 1031 additions and 111 deletions
......@@ -147,6 +147,9 @@ js/src/Y.js
# Fuzzing code for testing only, targeting the JS shell
js/src/fuzz-tests/
# uses `#include`
mobile/android/app/000-tor-browser-android.js
# Uses `#filter substitution`
mobile/android/app/mobile.js
mobile/android/app/geckoview-prefs.js
......
<!--
* Use this issue template for reporting a new UX bug.
-->
### Summary
**Summarize the bug encountered concisely.**
### Steps to reproduce:
**How one can reproduce the issue - this is very important.**
1. Step 1
2. Step 2
3. ...
### What is the current bug behavior?
**What actually happens.**
### What is the expected behavior?
**What you want to see instead**
## Relevant logs and/or screenshots
**Do you have screenshots? Attach them to this ticket please.**
/label ~tor-ux ~needs-investigation ~bug
/assign @nah
<!--
* Use this issue template for reporting a new bug.
-->
### Summary
**Summarize the bug encountered concisely.**
### Steps to reproduce:
**How one can reproduce the issue - this is very important.**
1. Step 1
2. Step 2
3. ...
### What is the current bug behavior?
**What actually happens.**
### What is the expected behavior?
**What you want to see instead**
### Environment
**Which operating system are you using? For example: Debian GNU/Linux 10.1, Windows 10, Ubuntu Xenial, FreeBSD 12.2, etc.**
**Which installation method did you use? Distribution package (apt, pkg, homebrew), from source tarball, from Git, etc.**
### Relevant logs and/or screenshots
/label ~bug
## Merge Info
<!-- Bookkeeping information for release management -->
### Related Issues
- tor-browser#xxxxx
- mullvad-browser#xxxxx
- tor-browser-build#xxxxx
### Backporting
#### Timeline
- [ ] **Immediate**: patchset needed as soon as possible
- [ ] **Next Minor Stable Release**: patchset that needs to be verified in nightly before backport
- [ ] **Eventually**: patchset that needs to be verified in alpha before backport
- [ ] **No Backport (preferred)**: patchset for the next major stable
#### (Optional) Justification
- [ ] **Emergency security update**: patchset fixes CVEs, 0-days, etc
- [ ] **Censorship event**: patchset enables censorship circumvention
- [ ] **Critical bug-fix**: patchset fixes a bug in core-functionality
- [ ] **Consistency**: patchset which would make development easier if it were in both the alpha and release branches; developer tools, build system changes, etc
- [ ] **Sponsor required**: patchset required for sponsor
- [ ] **Other**: please explain
### Merging
- [ ] Merge to `tor-browser` - `!fixups` to `tor-browser`-specific commits, new features, security backports
- [ ] Merge to `base-browser` - `!fixups` to `base-browser`-specific commits, new features to be shared with `mullvad-browser`, and security backports
- **NOTE**: if your changeset includes patches to both `base-browser` and `tor-browser` please clearly label in the change description which commits should be cherry-picked to `base-browser` after merging
### Issue Tracking
- [ ] Link resolved issues with appropriate [Release Prep issue](https://gitlab.torproject.org/groups/tpo/applications/-/issues/?sort=updated_desc&state=opened&label_name%5B%5D=Release%20Prep&first_page_size=20) for changelog generation
### Review
#### Request Reviewer
- [ ] Request review from an applications developer depending on modified system:
- **NOTE**: if the MR modifies multiple areas, please `/cc` all the relevant reviewers (since gitlab only allows 1 reviewer)
- **accessibility** : henry
- **android** : dan
- **build system** : boklm
- **extensions** : ma1
- **firefox internals (XUL/JS/XPCOM)** : ma1
- **fonts** : pierov
- **frontend (implementation)** : henry
- **frontend (review)** : donuts, richard
- **localization** : henry, pierov
- **nightly builds** : boklm
- **rebases/release-prep** : dan_b, ma1, pierov, richard
- **security** : ma1
- **signing** : boklm, richard
- **updater** : pierov
- **misc/other** : pierov, richard
#### Change Description
<!-- Whatever context the reviewer needs to effectively review the patchset; if the patch includes UX updates be sure to include screenshots/video of how any new behaviour -->
......@@ -1195,12 +1195,28 @@ DocAccessiblePlatformExtParent* DocAccessibleParent::GetPlatformExtension() {
void DocAccessibleParent::SelectionRanges(nsTArray<TextRange>* aRanges) const {
for (const auto& data : mTextSelections) {
aRanges->AppendElement(
TextRange(const_cast<DocAccessibleParent*>(this),
const_cast<RemoteAccessible*>(GetAccessible(data.StartID())),
data.StartOffset(),
const_cast<RemoteAccessible*>(GetAccessible(data.EndID())),
data.EndOffset()));
// Selection ranges should usually be in sync with the tree. However, tree
// and selection updates happen using separate IPDL calls, so it's possible
// for a client selection query to arrive between them. Thus, we validate
// the Accessibles and offsets here.
auto* startAcc =
const_cast<RemoteAccessible*>(GetAccessible(data.StartID()));
auto* endAcc = const_cast<RemoteAccessible*>(GetAccessible(data.EndID()));
if (!startAcc || !endAcc) {
continue;
}
uint32_t startCount = startAcc->CharacterCount();
if (startCount == 0 ||
data.StartOffset() > static_cast<int32_t>(startCount)) {
continue;
}
uint32_t endCount = endAcc->CharacterCount();
if (endCount == 0 || data.EndOffset() > static_cast<int32_t>(endCount)) {
continue;
}
aRanges->AppendElement(TextRange(const_cast<DocAccessibleParent*>(this),
startAcc, data.StartOffset(), endAcc,
data.EndOffset()));
}
}
......
/* -*- 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
......
......@@ -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
This diff is collapsed.
......@@ -50,9 +50,9 @@ pref("extensions.recommendations.themeRecommendationUrl", "https://color.firefox
pref("extensions.update.autoUpdateDefault", true);
// Check AUS for system add-on updates.
pref("extensions.systemAddon.update.url", "https://aus5.mozilla.org/update/3/SystemAddons/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml");
pref("extensions.systemAddon.update.enabled", true);
// No AUS check for system add-on updates for Tor Browser users.
pref("extensions.systemAddon.update.url", "");
pref("extensions.systemAddon.update.enabled", false);
// Disable add-ons that are not installed by the user in all scopes by default.
// See the SCOPE constants in AddonManager.jsm for values to use here.
......@@ -139,7 +139,6 @@ pref("app.update.elevation.promptMaxAttempts", 2);
// an update is being downloaded.
pref("app.update.notifyDuringDownload", false);
// If set to true, the Update Service will automatically download updates if the
// user can apply updates. This pref is no longer used on Windows, except as the
// default value to migrate to the new location that this data is now stored
// (which is in a file in the update directory). Because of this, this pref
......
......@@ -174,7 +174,7 @@ appUpdater.prototype = {
if (aChildID == "downloadAndInstall") {
let updateVersion = gAppUpdater.update.displayVersion;
// Include the build ID if this is an "a#" (nightly or aurora) build
if (/a\d+$/.test(updateVersion)) {
if (!AppConstants.BASE_BROWSER_UPDATE && /a\d+$/.test(updateVersion)) {
let buildID = gAppUpdater.update.buildID;
let year = buildID.slice(0, 4);
let month = buildID.slice(4, 6);
......
......@@ -54,15 +54,15 @@ async function init(aEvent) {
bits: Services.appinfo.is64Bit ? 64 : 32,
};
// Adjust version text to show the Tor Browser version
versionAttributes.version =
AppConstants.BASE_BROWSER_VERSION +
" (based on Mozilla Firefox " +
AppConstants.MOZ_APP_VERSION_DISPLAY +
")";
let version = Services.appinfo.version;
if (/a\d+$/.test(version)) {
versionId = "aboutDialog-version-nightly";
let buildID = Services.appinfo.appBuildID;
let year = buildID.slice(0, 4);
let month = buildID.slice(4, 6);
let day = buildID.slice(6, 8);
versionAttributes.isodate = `${year}-${month}-${day}`;
document.getElementById("experimental").hidden = false;
document.getElementById("communityDesc").hidden = true;
}
......
......@@ -55,7 +55,12 @@
class="subviewbutton"
data-l10n-id="appmenuitem-new-private-window"
key="key_privatebrowsing"
command="Tools:PrivateBrowsing"/>
command="Tools:PrivateBrowsing"
hidden="true"/>
<toolbarseparator/>
<toolbarbutton id="appMenu-new-identity"
class="subviewbutton"
key="new-identity-key"/>
<toolbarseparator/>
<toolbarbutton id="appMenu-bookmarks-button"
class="subviewbutton subviewbutton-nav"
......@@ -175,7 +180,8 @@
<toolbarbutton id="appMenu-restoreSession"
data-l10n-id="appmenu-restore-session"
class="subviewbutton"
command="Browser:RestoreLastSession"/>
command="Browser:RestoreLastSession"
hidden="true"/>
<toolbarseparator/>
<toolbarbutton id="appMenuClearRecentHistory"
data-l10n-id="appmenu-clear-history"
......
......@@ -62,9 +62,14 @@ var PointerlockFsWarning = {
this._element = document.getElementById(elementId);
// Setup event listeners
this._element.addEventListener("transitionend", this);
this._element.addEventListener("transitioncancel", this);
window.addEventListener("mousemove", this, true);
window.addEventListener("activate", this);
window.addEventListener("deactivate", this);
// The timeout to hide the warning box after a while.
this._timeoutHide = new this.Timeout(() => {
window.removeEventListener("activate", this);
window.removeEventListener("deactivate", this);
this._state = "hidden";
}, timeout);
// The timeout to show the warning box when the pointer is at the top
......@@ -116,11 +121,10 @@ var PointerlockFsWarning = {
return;
}
// Explicitly set the last state to hidden to avoid the warning
// box being hidden immediately because of mousemove.
this._state = "onscreen";
this._lastState = "hidden";
this._timeoutHide.start();
if (Services.focus.activeWindow == window) {
this._state = "onscreen";
this._timeoutHide.start();
}
},
/**
......@@ -148,7 +152,10 @@ var PointerlockFsWarning = {
this._element.hidden = true;
// Remove all event listeners
this._element.removeEventListener("transitionend", this);
this._element.removeEventListener("transitioncancel", this);
window.removeEventListener("mousemove", this, true);
window.removeEventListener("activate", this);
window.removeEventListener("deactivate", this);
// Clear fields
this._element = null;
this._timeoutHide = null;
......@@ -186,7 +193,7 @@ var PointerlockFsWarning = {
}
if (newState != "hidden") {
if (currentState != "hidden") {
this._element.setAttribute(newState, true);
this._element.setAttribute(newState, "");
} else {
// When the previous state is hidden, the display was none,
// thus no box was constructed. We need to wait for the new
......@@ -197,7 +204,7 @@ var PointerlockFsWarning = {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
if (this._element) {
this._element.setAttribute(newState, true);
this._element.setAttribute(newState, "");
}
});
});
......@@ -217,7 +224,7 @@ var PointerlockFsWarning = {
} else if (this._timeoutShow.delay >= 0) {
this._timeoutShow.start();
}
} else {
} else if (state != "onscreen") {
let elemRect = this._element.getBoundingClientRect();
if (state == "hiding" && this._lastState != "hidden") {
// If we are on the hiding transition, and the pointer
......@@ -239,12 +246,23 @@ var PointerlockFsWarning = {
}
break;
}
case "transitionend": {
case "transitionend":
case "transitioncancel": {
if (this._state == "hiding") {
this._element.hidden = true;
}
break;
}
case "activate": {
this._state = "onscreen";
this._timeoutHide.start();
break;
}
case "deactivate": {
this._state = "hidden";
this._timeoutHide.cancel();
break;
}
}
},
};
......
......@@ -28,6 +28,10 @@
<menuitem id="menu_newPrivateWindow"
command="Tools:PrivateBrowsing"
key="key_privatebrowsing" data-l10n-id="menu-file-new-private-window"/>
<menuseparator/>
<menuitem id="menu_newIdentity"
key="new-identity-key"/>
<menuseparator/>
<menuitem id="menu_openLocation"
hidden="true"
command="Browser:OpenLocation"
......@@ -48,7 +52,8 @@
<menuitem id="menu_savePage"
key="key_savePage"
command="Browser:SavePage" data-l10n-id="menu-file-save-page"/>
#ifndef XP_MACOSX
# bug 41117 - don't allow sharing as there is a proxy bypass theoretical risk, so restore send link in that case
#if !defined(XP_MACOSX) || defined(MOZ_PROXY_BYPASS_PROTECTION)
<menuitem id="menu_sendLink"
command="Browser:SendLink" data-l10n-id="menu-file-email-link"/>
#endif
......@@ -453,6 +458,7 @@
have their strings defined by appmenu-data-l10n-id. -->
<menuitem id="menu_openHelp"
oncommand="openHelpLink('firefox-help')"
hidden="true"
data-l10n-id="menu-get-help"
appmenu-data-l10n-id="appmenu-get-help"
#ifdef XP_MACOSX
......@@ -462,14 +468,17 @@
#endif
<menuitem id="feedbackPage"
oncommand="openFeedbackPage()"
hidden="true"
data-l10n-id="menu-help-share-ideas"
appmenu-data-l10n-id="appmenu-help-share-ideas"/>
<menuitem id="helpSafeMode"
oncommand="safeModeRestart();"
hidden="true"
data-l10n-id="menu-help-enter-troubleshoot-mode2"
appmenu-data-l10n-id="appmenu-help-enter-troubleshoot-mode2"/>
<menuitem id="troubleShooting"
oncommand="openTroubleshootingPage()"
hidden="true"
data-l10n-id="menu-help-more-troubleshooting-info"
appmenu-data-l10n-id="appmenu-help-more-troubleshooting-info"/>
<menuitem id="help_reportSiteIssue"
......
......@@ -7,6 +7,13 @@
var gSafeBrowsing = {
setReportPhishingMenu() {
// tor-browser#18905: hide these menu entries
if (
!Services.prefs.getBoolPref("browser.safebrowsing.phishing.enabled", true)
) {
return;
}
// In order to detect whether or not we're at the phishing warning
// page, we have to check the documentURI instead of the currentURI.
// This is because when the DocShell loads an error page, the
......
......@@ -388,4 +388,5 @@
modifiers="accel,alt"
internal="true"/>
#endif
<key id="new-identity-key" modifiers="accel shift" key="U" oncommand="NewIdentityButton.onCommand(event)"/>
</keyset>