Commit 953c76d8 authored by aguestuser's avatar aguestuser
Browse files

Merge branch 'bug_40857_2' into 'geckoview-99.0b3-11.5-2'

Bug 40857: Second rebase of Geckoview to v99.0

See merge request !271
parents 8ecb2695 b620f9a9
......@@ -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
......
[submodule "toolkit/torproject/torbutton"]
path = toolkit/torproject/torbutton
url = https://git.torproject.org/torbutton.git
. $topsrcdir/browser/config/mozconfig
# This mozconfig file is not used in official Tor Browser builds.
# It is only intended to be used when doing incremental Linux builds
# during development. The platform-specific mozconfig configuration
# files used in official Tor Browser releases can be found in the
# tor-browser-build repo:
# https://gitweb.torproject.org/builders/tor-browser-build.git/
# under:
# tor-browser-build/projects/firefox/mozconfig-$OS-$ARCH
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
export MOZILLA_OFFICIAL=1
ac_add_options --enable-optimize
ac_add_options --enable-rust-simd
ac_add_options --enable-official-branding
# Let's support GTK3 for ESR60
ac_add_options --enable-default-toolkit=cairo-gtk3
ac_add_options --disable-strip
ac_add_options --disable-install-strip
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-crashreporter
ac_add_options --disable-webrtc
ac_add_options --disable-parental-controls
# Let's make sure no preference is enabling either Adobe's or Google's CDM.
ac_add_options --disable-eme
ac_add_options --enable-proxy-bypass-protection
# Disable telemetry
ac_add_options MOZ_TELEMETRY_REPORTING=
ac_add_options --disable-tor-launcher
ac_add_options --with-tor-browser-version=dev-build
ac_add_options --disable-tor-browser-update
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-arm-linux-androideabi
mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
export MOZILLA_OFFICIAL=1
ac_add_options --enable-optimize
ac_add_options --enable-rust-simd
ac_add_options --enable-official-branding
# Android
ac_add_options --enable-application=mobile/android
ac_add_options --target=arm-linux-androideabi
ac_add_options --with-android-ndk="$NDK_BASE" #Enter the android ndk location(ndk r17b)
ac_add_options --with-android-sdk="$SDK_BASE" #Enter the android sdk location
ac_add_options --with-branding=mobile/android/branding/alpha
# Use Mozilla's Clang blobs
CC="$HOME/.mozbuild/clang/bin/clang"
CXX="$HOME/.mozbuild/clang/bin/clang++"
#enable ccache to set amount of cache assigned for build.
ac_add_options --with-ccache
ac_add_options --enable-strip
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-rust-debug
ac_add_options --disable-updater
ac_add_options --disable-crashreporter
ac_add_options --disable-webrtc
ac_add_options --disable-parental-controls
ac_add_options --enable-proxy-bypass-protection
# Disable telemetry
ac_add_options MOZ_TELEMETRY_REPORTING=
. $topsrcdir/browser/config/mozconfig
export CFLAGS="-fsanitize=address -Dxmalloc=myxmalloc"
export CXXFLAGS="-fsanitize=address -Dxmalloc=myxmalloc"
# We need to add -ldl explicitely due to bug 1213698
export LDFLAGS="-fsanitize=address -ldl"
# Define HOST_CFLAGS, etc. to avoid compiling programs such as mbsdiff
# (which is part of mar-tools and is not distributed to end-users) with
# ASan. See bug 17858.
export HOST_CFLAGS=""
export HOST_CXXFLAGS=""
export HOST_LDFLAGS="-ldl"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
export MOZILLA_OFFICIAL=1
export BINDGEN_CFLAGS='--gcc-toolchain=/var/tmp/dist/gcc'
ac_add_options --enable-address-sanitizer
ac_add_options --disable-jemalloc
ac_add_options --disable-elf-hack
ac_add_options --enable-optimize
ac_add_options --enable-rust-simd
ac_add_options --enable-official-branding
# Let's support GTK3 for ESR60
ac_add_options --enable-default-toolkit=cairo-gtk3
ac_add_options --enable-tor-browser-update
ac_add_options --disable-strip
ac_add_options --disable-install-strip
ac_add_options --enable-tests
ac_add_options --enable-debug
ac_add_options --disable-crashreporter
ac_add_options --disable-webrtc
ac_add_options --disable-parental-controls
ac_add_options --disable-eme
ac_add_options --enable-proxy-bypass-protection
# Disable telemetry
ac_add_options MOZ_TELEMETRY_REPORTING=
# ld needs libLTO.so from llvm
mk_add_options "export LD_LIBRARY_PATH=$topsrcdir/clang/lib"
CROSS_CCTOOLS_PATH=$topsrcdir/cctools
CROSS_SYSROOT=$topsrcdir/MacOSX10.7.sdk
CROSS_PRIVATE_FRAMEWORKS=$CROSS_SYSROOT/System/Library/PrivateFrameworks
HARDENING_FLAGS="-Werror=format -Werror=format-security -fstack-protector-strong -D_FORTIFY_SOURCE=2"
FLAGS="-target x86_64-apple-darwin10 -mlinker-version=136 -B $CROSS_CCTOOLS_PATH/bin -isysroot $CROSS_SYSROOT $HARDENING_FLAGS"
export CC="$topsrcdir/clang/bin/clang $FLAGS"
export CXX="$topsrcdir/clang/bin/clang++ $FLAGS"
export CPP="$topsrcdir/clang/bin/clang $FLAGS -E"
export LLVMCONFIG=$topsrcdir/clang/bin/llvm-config
export LDFLAGS="-Wl,-syslibroot,$CROSS_SYSROOT -Wl,-dead_strip -Wl,-pie"
export TOOLCHAIN_PREFIX=$CROSS_CCTOOLS_PATH/bin/x86_64-apple-darwin10-
#TODO: bug 1184202 - would be nice if these could be detected with TOOLCHAIN_PREFIX automatically
export AR=${TOOLCHAIN_PREFIX}ar
export RANLIB=${TOOLCHAIN_PREFIX}ranlib
export STRIP=${TOOLCHAIN_PREFIX}strip
export OTOOL=${TOOLCHAIN_PREFIX}otool
export DSYMUTIL=$topsrcdir/clang/bin/llvm-dsymutil
export HOST_CC="$topsrcdir/clang/bin/clang"
export HOST_CXX="$topsrcdir/clang/bin/clang++"
export HOST_CPP="$topsrcdir/clang/bin/clang -E"
export HOST_CFLAGS="-g"
export HOST_CXXFLAGS="-g"
export HOST_LDFLAGS="-g"
ac_add_options --target=x86_64-apple-darwin
ac_add_options --with-macos-private-frameworks=$CROSS_PRIVATE_FRAMEWORKS
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-macos
mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
export MOZILLA_OFFICIAL=1
ac_add_options --enable-application=browser
ac_add_options --enable-strip
ac_add_options --enable-official-branding
ac_add_options --enable-optimize
ac_add_options --enable-rust-simd
ac_add_options --disable-debug
ac_add_options --enable-tor-browser-data-outside-app-dir
ac_add_options --enable-tor-browser-update
ac_add_options --disable-crashreporter
ac_add_options --disable-webrtc
ac_add_options --disable-parental-controls
ac_add_options --disable-tests
# Let's make sure no preference is enabling either Adobe's or Google's CDM.
ac_add_options --disable-eme
ac_add_options --enable-proxy-bypass-protection
# Disable telemetry
ac_add_options MOZ_TELEMETRY_REPORTING=
CROSS_COMPILE=1
ac_add_options --enable-application=browser
ac_add_options --target=i686-w64-mingw32
ac_add_options --with-toolchain-prefix=i686-w64-mingw32-
ac_add_options --enable-default-toolkit=cairo-windows
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-mingw
mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
export MOZILLA_OFFICIAL=1
ac_add_options --disable-debug
ac_add_options --enable-optimize
ac_add_options --enable-rust-simd
ac_add_options --enable-strip
ac_add_options --enable-official-branding
ac_add_options --enable-tor-browser-update
ac_add_options --disable-bits-download
# Let's make sure no preference is enabling either Adobe's or Google's CDM.
ac_add_options --disable-eme
ac_add_options --disable-crashreporter
ac_add_options --disable-maintenance-service
ac_add_options --disable-webrtc
ac_add_options --disable-parental-controls
ac_add_options --disable-tests
ac_add_options --enable-proxy-bypass-protection
# Disable telemetry
ac_add_options MOZ_TELEMETRY_REPORTING=
ac_add_options --disable-default-browser-agent
......@@ -178,6 +178,26 @@ class ClickHandlerChild extends JSWindowActorChild {
json.originStoragePrincipal = ownerDoc.effectiveStoragePrincipal;
json.triggeringPrincipal = ownerDoc.nodePrincipal;
// Check if the link needs to be opened with .tor.onion urlbar rewrites
// allowed. Only when the owner doc has onionUrlbarRewritesAllowed = true
// and the same origin we should allow this.
json.onionUrlbarRewritesAllowed = false;
if (this.docShell.onionUrlbarRewritesAllowed) {
const sm = Services.scriptSecurityManager;
try {
let targetURI = Services.io.newURI(href);
let isPrivateWin =
ownerDoc.nodePrincipal.originAttributes.privateBrowsingId > 0;
sm.checkSameOriginURI(
docshell.currentDocumentChannel.URI,
targetURI,
false,
isPrivateWin
);
json.onionUrlbarRewritesAllowed = true;
} catch (e) {}
}
// If a link element is clicked with middle button, user wants to open
// the link somewhere rather than pasting clipboard content. Therefore,
// when it's clicked with middle button, we should prevent multiple
......
......@@ -106,6 +106,7 @@ class ClickHandlerParent extends JSWindowActorParent {
let params = {
charset: browser.characterSet,
referrerInfo: E10SUtils.deserializeReferrerInfo(data.referrerInfo),
onionUrlbarRewritesAllowed: data.onionUrlbarRewritesAllowed,
isContentWindowPrivate: data.isContentWindowPrivate,
originPrincipal: data.originPrincipal,
originStoragePrincipal: data.originStoragePrincipal,
......
......@@ -564,6 +564,9 @@ class ContextMenuChild extends JSWindowActorChild {
doc.defaultView
).getFieldContext(aEvent.composedTarget);
let parentAllowsOnionUrlbarRewrites = this.docShell
.onionUrlbarRewritesAllowed;
let disableSetDesktopBackground = null;
// Media related cache info parent needs for saving
......@@ -674,6 +677,7 @@ class ContextMenuChild extends JSWindowActorChild {
frameID,
frameBrowsingContextID,
disableSetDesktopBackground,
parentAllowsOnionUrlbarRewrites,
};
if (context.inFrame && !context.inSrcdocFrame) {
......
......@@ -102,5 +102,5 @@ 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
printf APPLMOZB > '$(dist_dest)/Contents/PkgInfo'
printf APPLTORB > '$(dist_dest)/Contents/PkgInfo'
endif
......@@ -179,7 +179,7 @@
<key>CFBundleShortVersionString</key>
<string>@APP_VERSION@</string>
<key>CFBundleSignature</key>
<string>MOZB</string>
<string>TORB</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
......
......@@ -17,7 +17,6 @@
#if defined(MOZ_CRASHREPORTER)
/minidump-analyzer
#endif
/pingsender
/pk12util
/ssltunnel
/xpcshell
......
......@@ -8,20 +8,10 @@
# 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
# DuckDuckGo .onion (used for circuit display onboarding).
origin uitour 1 https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/
origin uitour 1 about:tor
# 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.
......@@ -2131,6 +2131,22 @@ pref("browser.sessionstore.restore_tabs_lazily", true);
pref("browser.suppress_first_window_animation", true);
// Preferences for Photon onboarding system extension
pref("browser.onboarding.enabled", true);
// Mark this as an upgraded profile so we don't offer the initial new user onboarding tour.
pref("browser.onboarding.tourset-version", 2);
pref("browser.onboarding.state", "default");
// On the Activity-Stream page, the snippet's position overlaps with our notification.
// So use `browser.onboarding.notification.finished` to let the AS page know
// if our notification is finished and safe to show their snippet.
pref("browser.onboarding.notification.finished", false);
pref("browser.onboarding.notification.mute-duration-on-first-session-ms", 300000); // 5 mins
pref("browser.onboarding.notification.max-life-time-per-tour-ms", 432000000); // 5 days
pref("browser.onboarding.notification.max-life-time-all-tours-ms", 1209600000); // 14 days
pref("browser.onboarding.notification.max-prompt-count-per-tour", 8);
pref("browser.onboarding.newtour", "performance,private,screenshots,addons,customize,default");
pref("browser.onboarding.updatetour", "performance,library,screenshots,singlesearch,customize,sync");
// Preference that allows individual users to disable Screenshots.
pref("extensions.screenshots.disabled", false);
......
......@@ -7,6 +7,17 @@
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/aboutDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://branding/content/aboutDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://torbutton/skin/aboutDialog.css" type="text/css"?>
<!-- We need to include the localization DTDs until we migrate to Fluent -->
<!DOCTYPE window [
<!ENTITY % torbuttonDTD SYSTEM "chrome://torbutton/locale/torbutton.dtd">
%torbuttonDTD;
<!ENTITY % aboutTorDTD SYSTEM "chrome://torbutton/locale/aboutTor.dtd">
%aboutTorDTD;
<!ENTITY % aboutDialogDTD SYSTEM "chrome://torbutton/locale/aboutDialog.dtd">
%aboutDialogDTD;
]>
<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
......@@ -22,7 +33,7 @@
data-l10n-id="aboutDialog-title"
#endif
role="dialog"
aria-describedby="version distribution distributionId communityDesc contributeDesc trademark"
aria-describedby="version distribution distributionId projectDesc helpDesc trademark trademarkTor"
>
#ifdef XP_MACOSX
#include macWindow.inc.xhtml
......@@ -140,24 +151,36 @@
<label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-exp-creditsLink"/>
</description>
</vbox>
<description class="text-blurb" id="communityDesc" data-l10n-id="community-2">
<label is="text-link" href="https://www.mozilla.org/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-name="community-mozillaLink"/>
<label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-creditsLink"/>
<!-- Keep communityDesc and contributeDesc to avoid JS errors trying to hide them -->
<description class="text-blurb" id="communityDesc" data-l10n-id="community-2" hidden="true"></description>
<description class="text-blurb" id="contributeDesc" data-l10n-id="helpus" hidden="true"></description>
<description class="text-blurb" id="projectDesc">
&project.start;
<label is="text-link" href="https://www.torproject.org/">
&project.tpoLink;
</label>&project.end;
</description>
<description class="text-blurb" id="contributeDesc" data-l10n-id="helpus">
<label is="text-link" href="https://donate.mozilla.org/?utm_source=firefox&#38;utm_medium=referral&#38;utm_campaign=firefox_about&#38;utm_content=firefox_about" data-l10n-name="helpus-donateLink"/>
<label is="text-link" href="https://www.mozilla.org/contribute/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-name="helpus-getInvolvedLink"/>
<description class="text-blurb" id="helpDesc">
&help.start;
<label is="text-link" href="https://donate.torproject.org/">
&help.donateLink;
</label>
&help.or;
<label is="text-link" href="https://community.torproject.org/">
&help.getInvolvedLink;
</label>&help.end;
</description>
</vbox>
</vbox>
</hbox>
<vbox id="bottomBox">
<hbox pack="center">
<label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:license" data-l10n-id="bottomLinks-license"/>
<label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:rights" data-l10n-id="bottomLinks-rights"/>
<label is="text-link" class="bottom-link" href="https://www.mozilla.org/privacy/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-id="bottomLinks-privacy"/>
<hbox id="newBottom" pack="center" position="1">
<label is="text-link" class="bottom-link" href="https://support.torproject.org/">&bottomLinks.questions;</label>
<label is="text-link" class="bottom-link" href="https://community.torproject.org/relay/">&bottomLinks.grow;</label>
<label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:license">&bottomLinks.license;</label>
</hbox>
<description id="trademark" data-l10n-id="trademarkInfo"></description>
<description id="trademarkTor">&tor.TrademarkStatement;</description>
</vbox>
</vbox>
......
......@@ -55,7 +55,8 @@
class="subviewbutton"
data-l10n-id="appmenuitem-new-private-window"
key="key_privatebrowsing"
command="Tools:PrivateBrowsing"/>
command="Tools:PrivateBrowsing"
hidden="true"/>
<toolbarseparator/>
<toolbarbutton id="appMenu-bookmarks-button"
class="subviewbutton subviewbutton-nav"
......
......@@ -28,6 +28,18 @@
<menuitem id="menu_newPrivateWindow"
command="Tools:PrivateBrowsing"
key="key_privatebrowsing" data-l10n-id="menu-file-new-private-window"/>
<menuseparator/>
<menuitem id="menu_newIdentity"
accesskey="&torbutton.context_menu.new_identity_key;"
key="torbutton-new-identity-key"
label="&torbutton.context_menu.new_identity;"
oncommand="torbutton_new_identity();"/>
<menuitem id="menu_newCircuit"
accesskey="&torbutton.context_menu.new_circuit_key;"
key="torbutton-new-circuit-key"
label="&torbutton.context_menu.new_circuit;"
oncommand="torbutton_new_circuit();"/>
<menuseparator/>
<menuitem id="menu_openLocation"
hidden="true"
command="Browser:OpenLocation"
......@@ -451,19 +463,37 @@
<menupopup id="menu_HelpPopup" onpopupshowing="buildHelpMenu();">
<!-- Note: Items under here are cloned to the AppMenu Help submenu. The cloned items
have their strings defined by appmenu-data-l10n-id. -->
<menuitem id="menu_openHelp"
#ifdef MOZ_UPDATER
<menuitem id="checkForUpdates"
data-l10n-id="menu-help-check-for-update"
appmenu-data-l10n-id="appmenu-help-check-for-update"
class="menuitem-iconic"
oncommand="openAboutDialog();"/>
#endif
<!-- dummy elements to avoid 'getElementById' errors -->
<box id="feedbackPage"/>
<box id="helpSafeMode"/>
<box id="menu_HelpPopup_reportPhishingtoolmenu"/>
<box id="menu_HelpPopup_reportPhishingErrortoolmenu"/>
<!-- Add Tor Browser manual link -->
<menuitem id="torBrowserUserManual"
oncommand="gBrowser.selectedTab = gBrowser.addTab('https://tb-manual.torproject.org/' + Services.locale.requestedLocale, {triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal()});"
label="&aboutTor.torbrowser_user_manual.label;"
accesskey="&aboutTor.torbrowser_user_manual.accesskey;"/>
<!-- Bug 18905: Hide unused help menu items -->
<!-- <menuitem id="menu_openHelp"
oncommand="openHelpLink('firefox-help')"
data-l10n-id="menu-get-help"
appmenu-data-l10n-id="appmenu-get-help"
#ifdef XP_MACOSX
key="key_openHelpMac"/>
key="key_openHelpMac"/> -->
#else
/>
/> -->
#endif
<menuitem id="feedbackPage"
<!-- <menuitem id="feedbackPage"
oncommand="openFeedbackPage()"
data-l10n-id="menu-help-share-ideas"
appmenu-data-l10n-id="appmenu-help-share-ideas"/>
appmenu-data-l10n-id="appmenu-help-share-ideas"/> -->
<menuitem id="helpSafeMode"
oncommand="safeModeRestart();"
data-l10n-id="menu-help-enter-troubleshoot-mode2"
......@@ -477,18 +507,18 @@
data-l10n-id="menu-help-report-site-issue"
appmenu-data-l10n-id="appmenu-help-report-site-issue"
hidden="true"/>
<menuitem id="menu_HelpPopup_reportPhishingtoolmenu"
<!-- <menuitem id="menu_HelpPopup_reportPhishingtoolmenu"
disabled="true"
oncommand="openUILink(gSafeBrowsing.getReportURL('Phish'), event, {triggeringPrincipal: Services.scriptSecurityManager.createNullPrincipal({})});"
hidden="true"
data-l10n-id="menu-help-report-deceptive-site"
appmenu-data-l10n-id="appmenu-help-report-deceptive-site"/>
<menuitem id="menu_HelpPopup_reportPhishingErrortoolmenu"
appmenu-data-l10n-id="appmenu-help-report-deceptive-site"/> -->
<!-- <menuitem id="menu_HelpPopup_reportPhishingErrortoolmenu"
disabled="true"
oncommand="ReportFalseDeceptiveSite();"
data-l10n-id="menu-help-not-deceptive"
appmenu-data-l10n-id="appmenu-help-not-deceptive"
hidden="true"/>
hidden="true"/> -->
<menuseparator id="aboutSeparator"/>
<menuitem id="aboutName"
oncommand="openAboutDialog();"
......
......@@ -444,7 +444,8 @@ var PlacesCommandHook = {
*/
async bookmarkPage() {
let browser = gBrowser.selectedBrowser;
let url = new URL(browser.currentURI.spec);
const uri = browser.currentOnionAliasURI || browser.currentURI;
let url = new URL(uri.spec);
let info = await PlacesUtils.bookmarks.fetch({ url });
let isNewBookmark = !info;
let showEditUI = !isNewBookmark || StarUI.showForNewBookmarks;
......@@ -555,7 +556,7 @@ var PlacesCommandHook = {
tabs.forEach(tab => {
let browser = tab.linkedBrowser;
let uri = browser.currentURI;
let uri = browser.currentOnionAliasURI || browser.currentURI;
let title = browser.contentTitle || tab.label;
let spec = uri.spec;
if (!(spec in uniquePages)) {
......@@ -1755,14 +1756,17 @@ var BookmarkingUI = {
},
onLocationChange: function BUI_onLocationChange() {
if (this._uri && gBrowser.currentURI.equals(this._uri)) {
const uri =
gBrowser.selectedBrowser.currentOnionAliasURI || gBrowser.currentURI;
if (this._uri && uri.equals(this._uri)) {
return;
}
this.updateStarState();
},
updateStarState: function BUI_updateStarState() {
this._uri = gBrowser.currentURI;
this._uri =
gBrowser.selectedBrowser.currentOnionAliasURI || gBrowser.currentURI;
this._itemGuids.clear();
let guids = new Set();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment