From 3d1199ff5c7691002a37b4535725c732aed5ddcb Mon Sep 17 00:00:00 2001 From: bot Date: Thu, 5 Sep 2024 05:57:59 +0000 Subject: [PATCH] 131.0b2 --- .../browser/actors/ClickHandlerParent.sys.mjs | 1 + .../browser/actors/ContextMenuChild.sys.mjs | 7 - .../browser/actors/ContextMenuParent.sys.mjs | 121 +- .../browser/actors/LinkHandlerParent.sys.mjs | 12 +- .../actors/SearchSERPTelemetryChild.sys.mjs | 38 +- .../browser/actors/WebRTCParent.sys.mjs | 105 +- .../browser/app/profile/firefox.js | 46 +- .../browser/base/content/aboutDialog.js | 25 +- .../browser/base/content/browser-init.js | 15 +- .../browser/base/content/browser-menubar.js | 2 +- .../base/content/browser-pageActions.js | 4 - .../browser/base/content/browser-places.js | 30 +- .../content/browser-sitePermissionPanel.js | 55 +- .../base/content/browser-siteProtections.js | 3 + .../browser/base/content/browser.js | 352 +- .../base/content/main-popupset.inc.xhtml | 52 +- .../browser/base/content/main-popupset.js | 24 +- .../base/content/navigator-toolbox.inc.xhtml | 84 +- .../base/content/nsContextMenu.sys.mjs | 108 - .../browser/base/content/sanitize.xhtml | 14 +- .../browser/base/content/sanitizeDialog.js | 14 + .../browser/base/content/sanitize_v2.xhtml | 6 +- .../browser/base/content/utilityOverlay.js | 1 - .../browser/components/BrowserGlue.sys.mjs | 146 +- .../aboutlogins/AboutLoginsChild.sys.mjs | 8 - .../aboutlogins/AboutLoginsParent.sys.mjs | 31 +- .../aboutlogins/content/aboutLogins.html | 10 +- .../content/components/fxaccounts-button.mjs | 14 +- .../content-src/aboutwelcome.scss | 5 + .../aboutwelcome/content/aboutwelcome.css | 4 + .../modules/AboutWelcomeDefaults.sys.mjs | 78 +- .../modules/ASRouterTargeting.sys.mjs | 38 +- .../components/backup/BackupService.sys.mjs | 443 +- .../backup/actors/BackupUIChild.sys.mjs | 51 +- .../backup/actors/BackupUIParent.sys.mjs | 128 +- .../backup/content/backup-settings.mjs | 67 - .../content/disable-backup-encryption.mjs | 46 +- .../disable-backup-encryption.stories.mjs | 25 +- .../content/enable-backup-encryption.mjs | 82 +- .../enable-backup-encryption.stories.mjs | 40 +- .../content/password-validation-inputs.mjs | 12 +- .../content/turn-off-scheduled-backups.mjs | 18 +- .../content/turn-on-scheduled-backups.mjs | 73 +- .../turn-on-scheduled-backups.stories.mjs | 29 +- .../content/ContentAnalysis.sys.mjs | 20 +- .../customizableui/CustomizableUI.sys.mjs | 62 +- .../customizableui/ToolbarContextMenu.sys.mjs | 337 + .../content/customizeMode.inc.xhtml | 2 +- .../enterprisepolicies/Policies.sys.mjs | 8 +- .../extensions/parent/ext-browser.js | 28 +- .../components/extensions/parent/ext-tabs.js | 27 +- .../firefoxview/HistoryController.sys.mjs | 19 +- .../firefoxview/fxview-search-textbox.mjs | 7 + .../components/firefoxview/fxview-tab-row.css | 4 + .../browser/components/genai/GenAI.sys.mjs | 17 +- .../components/genai/GenAIChild.sys.mjs | 49 +- .../migration/EdgeProfileMigrator.sys.mjs | 2 +- .../migration/MigrationUtils.sys.mjs | 7 +- .../components/migration/MigratorBase.sys.mjs | 10 +- .../content/migration-wizard-constants.mjs | 10 - .../migration/content/migration-wizard.mjs | 16 +- .../newtab/bin/render-activity-stream-html.js | 1 + .../components/newtab/bin/try-runner.js | 10 +- .../content-src/components/Base/Base.jsx | 12 + .../content-src/components/Base/_Base.scss | 84 + .../_CollapsibleSection.scss | 12 + .../CustomizeMenu/_CustomizeMenu.scss | 18 +- .../DSCard/DSCard.jsx | 7 +- .../DSCard/_DSCard.scss | 2 + .../_DSThumbsUpDownButtons.scss | 5 + .../TopSites/_TopSites.scss | 6 + .../TopicSelection/TopicSelection.jsx | 2 +- .../TopicSelection/_TopicSelection.scss | 16 + .../content-src/components/Logo/Logo.jsx | 16 + .../content-src/components/Logo/_Logo.scss | 63 + .../content-src/components/Search/Search.jsx | 8 +- .../components/Search/_Search.scss | 145 +- .../components/TopSites/_TopSites.scss | 40 + .../WallpapersSection/_WallpapersSection.scss | 6 +- .../components/Weather/_Weather.scss | 125 + .../lib/detect-user-session-start.mjs | 6 +- .../newtab/content-src/styles/_variables.scss | 14 +- .../styles/activity-stream-linux.scss | 11 - .../styles/activity-stream-mac.scss | 16 - .../styles/activity-stream-windows.scss | 11 - ...ivity-stream.scss => activity-stream.scss} | 11 +- .../newtab/css/activity-stream-linux.css | 5662 ----------------- .../newtab/css/activity-stream-windows.css | 5662 ----------------- ...ity-stream-mac.css => activity-stream.css} | 505 +- .../data/content/activity-stream.bundle.js | 49 +- .../newtab/lib/ActivityStream.sys.mjs | 47 +- .../newtab/lib/DiscoveryStreamFeed.sys.mjs | 18 +- .../PersonalityProvider.sys.mjs | 26 +- .../newtab/lib/TelemetryFeed.sys.mjs | 2 + .../newtab/lib/WallpaperFeed.sys.mjs | 22 +- .../prerendered/activity-stream-debug.html | 1 + .../activity-stream-noscripts.html | 1 + .../newtab/prerendered/activity-stream.html | 1 + .../pagedata/PageDataSchema.sys.mjs | 4 +- .../components/places/Interactions.sys.mjs | 1 - .../components/places/PlacesUIUtils.sys.mjs | 257 - .../places/content/bookmarkProperties.js | 5 +- .../components/preferences/findInPage.js | 16 - .../browser/components/preferences/main.js | 12 + .../preferences/moreFromMozilla.inc.xhtml | 5 +- .../browser/components/preferences/search.js | 10 +- .../preferences/translations.inc.xhtml | 4 +- .../components/preferences/translations.js | 230 +- .../profiles/SelectableProfile.sys.mjs | 17 +- .../profiles/SelectableProfileService.sys.mjs | 196 +- .../prompts/PromptCollection.sys.mjs | 3 +- .../reportbrokensite/ReportBrokenSite.sys.mjs | 29 +- .../search/SearchSERPTelemetry.sys.mjs | 1 - .../components/search/SearchUIUtils.sys.mjs | 4 +- .../sessionstore/SessionStore.sys.mjs | 27 +- .../components/shell/ShellService.sys.mjs | 10 + .../shopping/ShoppingSidebarChild.sys.mjs | 16 +- .../shopping/content/recommended-ad.css | 6 + .../shopping/content/recommended-ad.mjs | 14 +- .../components/shopping/content/settings.css | 11 +- .../components/shopping/content/settings.mjs | 18 +- .../components/sidebar/browser-sidebar.js | 418 +- .../components/sidebar/sidebar-customize.css | 15 +- .../components/sidebar/sidebar-history.css | 16 + .../components/sidebar/sidebar-history.mjs | 139 +- .../components/sidebar/sidebar-main.css | 21 +- .../components/sidebar/sidebar-main.mjs | 22 + .../components/sidebar/sidebar-page.mjs | 88 + .../sidebar/sidebar-panel-header.css | 3 +- .../sidebar/sidebar-panel-header.mjs | 2 +- .../components/sidebar/sidebar-syncedtabs.css | 24 - .../sidebar/sidebar-syncedtabs.html | 4 - .../components/sidebar/sidebar-syncedtabs.mjs | 30 +- .../browser/components/sidebar/sidebar.css | 39 + .../stories/fxview-search-textbox.stories.mjs | 9 +- .../stories/shopping-container.stories.mjs | 44 +- .../tabbrowser/AsyncTabSwitcher.sys.mjs | 29 - .../components/tabbrowser/content/tab.js | 65 +- .../tabbrowser/content/tabbrowser.js | 140 +- .../components/tabbrowser/content/tabgroup.js | 61 + .../components/tabbrowser/content/tabs.js | 142 +- .../textrecognition/textrecognition.css | 2 +- .../fullPageTranslationsPanel.inc.xhtml | 4 +- .../content/fullPageTranslationsPanel.js | 86 +- .../content/selectTranslationsPanel.js | 17 +- .../browser/components/uitour/UITour-lib.js | 6 +- .../ActionsProviderQuickActions.sys.mjs | 12 +- .../components/urlbar/QuickSuggest.sys.mjs | 17 +- .../urlbar/SearchModeSwitcher.sys.mjs | 198 +- .../urlbar/UrlbarController.sys.mjs | 16 +- .../components/urlbar/UrlbarInput.sys.mjs | 99 +- .../urlbar/UrlbarMuxerUnifiedComplete.sys.mjs | 44 +- .../components/urlbar/UrlbarPrefs.sys.mjs | 21 + .../UrlbarProviderActionsSearchMode.sys.mjs | 109 + .../urlbar/UrlbarProviderQuickSuggest.sys.mjs | 110 +- .../urlbar/UrlbarProviderRemoteTabs.sys.mjs | 4 + ...arProviderRestrictKeywordsAutofill.sys.mjs | 215 + .../urlbar/UrlbarProviderTabToSearch.sys.mjs | 19 +- .../urlbar/UrlbarProviderWeather.sys.mjs | 2 +- .../urlbar/UrlbarProvidersManager.sys.mjs | 40 +- .../components/urlbar/UrlbarResult.sys.mjs | 21 +- .../components/urlbar/UrlbarTokenizer.sys.mjs | 10 +- .../components/urlbar/UrlbarUtils.sys.mjs | 160 +- .../urlbar/UrlbarValueFormatter.sys.mjs | 22 +- .../components/urlbar/UrlbarView.sys.mjs | 32 +- .../urlbar/private/AdmWikipedia.sys.mjs | 42 +- .../urlbar/private/BaseFeature.sys.mjs | 51 +- .../private/FakespotSuggestions.sys.mjs | 1 - .../urlbar/private/SuggestBackendRust.sys.mjs | 211 +- .../components/urlbar/private/Weather.sys.mjs | 1 - .../search-detection/extension/api.js | 83 +- .../search-detection/extension/background.js | 43 +- .../modules/BrowserUsageTelemetry.sys.mjs | 16 +- .../browser/modules/FaviconLoader.sys.mjs | 3 +- .../browser/modules/PermissionUI.sys.mjs | 72 +- .../modules/PopupBlockerObserver.sys.mjs | 51 +- .../browser/modules/SitePermissions.sys.mjs | 14 +- .../browser/modules/URILoadingHelper.sys.mjs | 22 +- .../browser/themes/ThemeVariableMap.sys.mjs | 2 +- .../browser/themes/shared/browser-shared.css | 24 +- .../shared/identity-block/identity-block.css | 8 + .../shared/migration/migration-wizard.css | 2 +- .../themes/shared/preferences/preferences.css | 12 + .../shared/preferences/translations.css | 2 +- .../browser/themes/shared/sidebar.css | 135 +- .../themes/shared/tabbrowser/content-area.css | 16 + .../browser/themes/shared/tabbrowser/tabs.css | 87 +- .../themes/shared/urlbar-searchbar.css | 134 +- .../browser/themes/shared/urlbarView.css | 10 + firefox-src-part/build/pgo/index.html | 1 + firefox-src-part/caps/nsIPrincipal.idl | 8 - .../actions/context-menus/source-tree-item.js | 40 +- .../debugger/src/actions/sources/index.js | 29 - .../debugger/src/actions/sources/select.js | 16 +- .../debugger/src/client/firefox/commands.js | 21 - .../debugger/src/components/Editor/index.js | 60 +- .../PrimaryPanes/SourcesTreeItem.js | 62 +- .../SecondaryPanes/Breakpoints/Breakpoint.js | 6 +- .../SecondaryPanes/Breakpoints/index.js | 15 +- .../src/components/shared/AccessibleImage.css | 7 +- .../client/debugger/src/reducers/sources.js | 22 +- .../client/debugger/src/selectors/sources.js | 8 +- .../src/utils/editor/create-editor.js | 14 +- .../client/debugger/src/utils/editor/index.js | 4 +- .../client/debugger/src/utils/prefs.js | 1 + .../devtools/client/devtools-client.js | 18 +- .../client/framework/actions/index.js | 1 + .../framework/actions/network-overrides.js | 49 + .../client/framework/reducers/index.js | 3 + .../framework/reducers/network-overrides.js | 24 + .../devtools/client/framework/toolbox.js | 6 +- .../client/fronts/targets/target-mixin.js | 20 - .../client/inspector/computed/computed.js | 11 +- .../devtools/client/inspector/index.xhtml | 1 + .../devtools/client/inspector/markup/utils.js | 16 +- .../inspector/markup/views/element-editor.js | 15 +- .../markup/views/markup-container.js | 16 +- .../markup/views/read-only-editor.js | 2 +- .../inspector/rules/models/element-style.js | 32 +- .../client/inspector/rules/models/rule.js | 14 + .../inspector/rules/models/text-property.js | 17 + .../client/inspector/rules/utils/utils.js | 3 + .../inspector/rules/views/rule-editor.js | 5 +- .../rules/views/text-property-editor.js | 57 +- .../inspector/shared/tooltips-overlay.js | 15 +- .../request-details/TimingsPanel.js | 2 +- .../request-list/RequestListContent.js | 10 +- .../client/netmonitor/src/utils/doc-utils.js | 1 + .../devtools/client/shared/inplace-editor.js | 101 +- .../devtools/client/shared/key-shortcuts.js | 6 +- .../devtools/client/shared/output-parser.js | 384 +- .../shared/remote-debugging/adb/adb-addon.js | 29 +- .../client/shared/sourceeditor/editor.js | 114 +- .../widgets/tooltip/VariableTooltipHelper.js | 122 +- .../devtools/client/themes/dark-theme.css | 28 +- .../client/themes/inspector-shared.css | 23 + .../client/themes/inspector-swatches.css | 124 + .../devtools/client/themes/light-theme.css | 26 +- .../devtools/client/themes/markup.css | 128 +- .../devtools/client/themes/rules.css | 121 - .../devtools/client/themes/tooltips.css | 21 +- .../components/Input/EagerEvaluation.js | 1 - .../components/Output/ConsoleOutput.js | 2 +- .../components/Output/LazyMessageList.js | 9 +- .../client/webconsole/utils/messages.js | 5 +- .../client/webconsole/webconsole-ui.js | 6 +- .../server/actors/animation-type-longhand.js | 3 +- .../server/actors/descriptors/webextension.js | 29 +- .../server/actors/highlighters/css-grid.js | 41 +- .../actors/highlighters/css/highlighters.css | 14 + .../server/actors/highlighters/flexbox.js | 17 +- .../server/actors/inspector/node-picker.js | 146 +- .../devtools/server/actors/page-style.js | 40 +- .../devtools/server/actors/root.js | 2 - .../devtools/server/actors/style-rule.js | 1 + .../server/actors/targets/parent-process.js | 7 +- .../devtools/server/actors/tracer.js | 9 +- .../devtools/server/actors/tracer/profiler.js | 116 +- .../actors/webconsole/commands/manager.js | 1 + .../actors/webconsole/eager-ecma-allowlist.js | 6 + .../devtools/server/tracer/tracer.sys.mjs | 40 +- .../devtools/shared/commands/index.js | 4 +- .../commands/resource/resource-command.js | 179 +- .../resource/transformers/console-messages.js | 11 +- .../root-resource/root-resource-command.js | 4 - .../shared/commands/tracer/tracer-command.js | 4 + .../devtools/shared/loader/Loader.sys.mjs | 1 + .../devtools/shared/loader/builtin-modules.js | 3 - .../devtools/shared/specs/root.js | 11 - .../shared/specs/targets/content-process.js | 15 +- .../shared/specs/targets/window-global.js | 15 - .../devtools/shared/specs/targets/worker.js | 15 - .../devtools/shared/specs/tracer.js | 1 + .../devtools/shared/specs/watcher.js | 15 - firefox-src-part/dom/base/nsINode.cpp | 130 +- firefox-src-part/dom/base/nsINode.h | 7 +- .../dom/base/nsImageLoadingContent.cpp | 137 +- .../dom/base/nsImageLoadingContent.h | 87 +- .../geolocation/GeolocationUIUtilsWin.sys.mjs | 26 + .../geolocation/nsIGeolocationUIUtilsWin.idl | 21 + .../dom/interfaces/base/nsIDOMWindowUtils.idl | 4 + .../PrivateAttributionService.sys.mjs | 65 +- .../dom/quota/nsIQuotaManagerService.idl | 25 +- firefox-src-part/layout/generic/nsIFrame.cpp | 55 +- firefox-src-part/layout/generic/nsIFrame.h | 41 +- firefox-src-part/layout/mathml/mathml.css | 15 +- .../layout/painting/nsImageRenderer.cpp | 33 +- .../layout/painting/nsImageRenderer.h | 5 +- .../src/main/res/values-pa-rPK/strings.xml | 92 + .../src/main/res/values-sl/strings.xml | 2 +- .../src/main/res/values-pa-rPK/strings.xml | 12 +- .../toolbar2/src/main/AndroidManifest.xml | 4 - ...owser_toolbar_icons_vertical_separator.xml | 9 - .../res/drawable/mozac_dot_notification.xml | 16 - .../res/drawable/mozac_ic_site_security.xml | 11 - ..._ic_tracking_protection_off_for_a_site.xml | 12 - ...king_protection_on_no_trackers_blocked.xml | 12 - ...racking_protection_on_trackers_blocked.xml | 12 - .../mozac_browser_toolbar_displaytoolbar.xml | 175 - .../mozac_browser_toolbar_edittoolbar.xml | 116 - .../src/main/res/values-an/strings.xml | 16 - .../src/main/res/values-ar/strings.xml | 15 +- .../src/main/res/values-ast/strings.xml | 18 - .../src/main/res/values-az/strings.xml | 16 - .../src/main/res/values-ban/strings.xml | 8 - .../src/main/res/values-bn/strings.xml | 18 - .../src/main/res/values-ceb/strings.xml | 18 - .../src/main/res/values-ckb/strings.xml | 18 - .../src/main/res/values-et/strings.xml | 18 - .../src/main/res/values-fa/strings.xml | 18 - .../src/main/res/values-ff/strings.xml | 16 - .../src/main/res/values-ga-rIE/strings.xml | 16 - .../src/main/res/values-gd/strings.xml | 18 - .../src/main/res/values-gu-rIN/strings.xml | 16 - .../src/main/res/values-hi-rIN/strings.xml | 16 - .../src/main/res/values-hil/strings.xml | 8 - .../src/main/res/values-in/strings.xml | 3 +- .../src/main/res/values-ka/strings.xml | 18 - .../src/main/res/values-kaa/strings.xml | 18 - .../src/main/res/values-kmr/strings.xml | 3 +- .../src/main/res/values-kn/strings.xml | 16 - .../src/main/res/values-ldrtl/dimens.xml | 8 - .../src/main/res/values-lij/strings.xml | 16 - .../src/main/res/values-lo/strings.xml | 8 +- .../src/main/res/values-lt/strings.xml | 18 - .../src/main/res/values-mix/strings.xml | 18 - .../src/main/res/values-ml/strings.xml | 16 - .../src/main/res/values-mr/strings.xml | 16 - .../src/main/res/values-my/strings.xml | 18 - .../src/main/res/values-ne-rNP/strings.xml | 18 - .../src/main/res/values-or/strings.xml | 16 - .../src/main/res/values-pa-rPK/strings.xml | 1 + .../src/main/res/values-sr/strings.xml | 18 - .../src/main/res/values-szl/strings.xml | 18 - .../src/main/res/values-ta/strings.xml | 18 - .../src/main/res/values-tl/strings.xml | 18 - .../src/main/res/values-tok/strings.xml | 14 - .../src/main/res/values-trs/strings.xml | 18 - .../src/main/res/values-tzm/strings.xml | 10 - .../src/main/res/values-ur/strings.xml | 18 - .../src/main/res/values-uz/strings.xml | 18 - .../src/main/res/values-vec/strings.xml | 16 - .../src/main/res/values-yo/strings.xml | 18 - .../main/res/values/attrs_browser_toolbar.xml | 33 - .../toolbar2/src/main/res/values/dimens.xml | 32 - .../toolbar2/src/main/res/values/ids.xml | 8 - .../toolbar2/src/main/res/values/strings.xml | 22 - .../extensions/fxawebchannel/background.js | 8 +- .../addons/src/main/res/values-am/strings.xml | 46 +- .../addons/src/main/res/values-lo/strings.xml | 30 + .../src/main/res/values-pa-rPK/strings.xml | 89 +- .../src/main/res/values-am/strings.xml | 2 + .../src/main/res/values-bg/strings.xml | 2 + .../src/main/res/values-br/strings.xml | 2 + .../src/main/res/values-ca/strings.xml | 2 + .../src/main/res/values-cs/strings.xml | 2 + .../src/main/res/values-cy/strings.xml | 2 + .../src/main/res/values-da/strings.xml | 2 + .../src/main/res/values-de/strings.xml | 2 + .../src/main/res/values-dsb/strings.xml | 2 + .../src/main/res/values-el/strings.xml | 2 + .../src/main/res/values-en-rGB/strings.xml | 2 + .../src/main/res/values-es-rAR/strings.xml | 2 + .../src/main/res/values-es-rCL/strings.xml | 2 + .../src/main/res/values-es-rMX/strings.xml | 2 + .../src/main/res/values-eu/strings.xml | 2 + .../src/main/res/values-fi/strings.xml | 2 + .../src/main/res/values-fr/strings.xml | 2 + .../src/main/res/values-fy-rNL/strings.xml | 2 + .../src/main/res/values-gl/strings.xml | 2 + .../src/main/res/values-hsb/strings.xml | 2 + .../src/main/res/values-hu/strings.xml | 2 + .../src/main/res/values-hy-rAM/strings.xml | 2 + .../src/main/res/values-ia/strings.xml | 2 + .../src/main/res/values-it/strings.xml | 2 + .../src/main/res/values-iw/strings.xml | 2 + .../src/main/res/values-kk/strings.xml | 2 + .../src/main/res/values-ko/strings.xml | 2 + .../src/main/res/values-nb-rNO/strings.xml | 2 + .../src/main/res/values-nl/strings.xml | 2 + .../src/main/res/values-nn-rNO/strings.xml | 2 + .../src/main/res/values-pa-rPK/strings.xml | 2 + .../src/main/res/values-pt-rBR/strings.xml | 2 + .../src/main/res/values-pt-rPT/strings.xml | 2 + .../src/main/res/values-rm/strings.xml | 2 + .../src/main/res/values-ru/strings.xml | 2 + .../src/main/res/values-sk/strings.xml | 2 + .../src/main/res/values-skr/strings.xml | 2 + .../src/main/res/values-sl/strings.xml | 2 + .../src/main/res/values-sq/strings.xml | 2 + .../src/main/res/values-sv-rSE/strings.xml | 2 + .../src/main/res/values-tg/strings.xml | 2 + .../src/main/res/values-tr/strings.xml | 2 + .../src/main/res/values-ug/strings.xml | 2 + .../src/main/res/values-vi/strings.xml | 2 + .../src/main/res/values-zh-rCN/strings.xml | 2 + .../src/main/res/values-zh-rTW/strings.xml | 2 + .../src/main/res/values/strings.xml | 2 + .../src/main/res/values-pa-rPK/strings.xml | 19 + .../src/main/res/values-am/strings.xml | 97 +- .../src/main/res/values-br/strings.xml | 12 +- .../src/main/res/values-ca/strings.xml | 9 +- .../src/main/res/values-co/strings.xml | 7 +- .../src/main/res/values-da/strings.xml | 7 +- .../src/main/res/values-eo/strings.xml | 14 +- .../src/main/res/values-gl/strings.xml | 6 +- .../src/main/res/values-hu/strings.xml | 16 +- .../src/main/res/values-pa-rPK/strings.xml | 95 +- .../src/main/res/values-pl/strings.xml | 7 +- .../src/main/res/values-rm/strings.xml | 9 +- .../src/main/res/values-skr/strings.xml | 3 + .../src/main/res/values-sl/strings.xml | 7 +- .../src/main/res/values-sq/strings.xml | 7 +- .../prompts/src/main/res/values/strings.xml | 4 +- .../pwa/src/main/res/values-hu/strings.xml | 4 +- .../src/main/res/values/strings.xml | 2 +- .../src/main/res/values-pa-rPK/strings.xml | 31 + .../main/res/drawable/mozac_ic_back_24.xml | 1 + .../drawable/mozac_ic_chevron_right_24.xml | 1 + .../main/res/drawable/mozac_ic_forward_24.xml | 1 + .../drawable/mozac_ic_translate_active_24.xml | 20 + .../android/android-components/lint.xml | 18 + .../sync/src/main/res/values/strings.xml | 4 +- .../mobile/android/app/geckoview-prefs.js | 3 - .../mobile/android/fenix/app/lint.xml | 21 +- .../res/drawable/ic_extensions_onboarding.xml | 3 +- .../component_cookie_banner_details_panel.xml | 14 +- .../res/layout/dropdown_preference_etp.xml | 3 +- .../src/main/res/layout/etp_dropdown_item.xml | 3 +- .../main/res/layout/locale_settings_item.xml | 3 +- .../main/res/layout/preference_cat_style.xml | 3 +- .../preference_category_no_icon_style.xml | 3 +- .../layout/preference_widget_radiobutton.xml | 6 +- .../main/res/layout/settings_https_only.xml | 4 +- .../app/src/main/res/values-am/strings.xml | 336 +- .../app/src/main/res/values-azb/strings.xml | 292 + .../app/src/main/res/values-bg/strings.xml | 86 +- .../app/src/main/res/values-br/strings.xml | 283 +- .../app/src/main/res/values-ca/strings.xml | 131 +- .../app/src/main/res/values-co/strings.xml | 60 +- .../app/src/main/res/values-cs/strings.xml | 84 +- .../app/src/main/res/values-cy/strings.xml | 92 +- .../app/src/main/res/values-da/strings.xml | 147 +- .../app/src/main/res/values-de/strings.xml | 88 +- .../app/src/main/res/values-dsb/strings.xml | 73 +- .../app/src/main/res/values-el/strings.xml | 86 +- .../src/main/res/values-en-rGB/strings.xml | 86 +- .../app/src/main/res/values-eo/strings.xml | 183 +- .../src/main/res/values-es-rAR/strings.xml | 86 +- .../src/main/res/values-es-rCL/strings.xml | 86 +- .../src/main/res/values-es-rMX/strings.xml | 58 + .../app/src/main/res/values-eu/strings.xml | 86 +- .../app/src/main/res/values-fi/strings.xml | 98 +- .../app/src/main/res/values-fr/strings.xml | 90 +- .../src/main/res/values-fy-rNL/strings.xml | 113 +- .../app/src/main/res/values-gl/strings.xml | 116 +- .../app/src/main/res/values-gn/strings.xml | 24 +- .../app/src/main/res/values-hsb/strings.xml | 96 +- .../app/src/main/res/values-hu/strings.xml | 218 +- .../src/main/res/values-hy-rAM/strings.xml | 86 +- .../app/src/main/res/values-ia/strings.xml | 86 +- .../app/src/main/res/values-it/strings.xml | 86 +- .../app/src/main/res/values-iw/strings.xml | 86 +- .../app/src/main/res/values-kk/strings.xml | 86 +- .../app/src/main/res/values-ko/strings.xml | 87 +- .../app/src/main/res/values-meh/strings.xml | 15 + .../src/main/res/values-nb-rNO/strings.xml | 73 +- .../app/src/main/res/values-night/colors.xml | 2 +- .../app/src/main/res/values-nl/strings.xml | 112 +- .../src/main/res/values-nn-rNO/strings.xml | 86 +- .../app/src/main/res/values-oc/strings.xml | 84 +- .../src/main/res/values-pa-rPK/strings.xml | 929 ++- .../app/src/main/res/values-pl/strings.xml | 60 +- .../src/main/res/values-pt-rBR/strings.xml | 98 +- .../src/main/res/values-pt-rPT/strings.xml | 86 +- .../app/src/main/res/values-rm/strings.xml | 146 +- .../app/src/main/res/values-ru/strings.xml | 86 +- .../app/src/main/res/values-sat/strings.xml | 17 +- .../app/src/main/res/values-sk/strings.xml | 86 +- .../app/src/main/res/values-skr/strings.xml | 173 +- .../app/src/main/res/values-sl/strings.xml | 99 +- .../app/src/main/res/values-sq/strings.xml | 36 +- .../src/main/res/values-sv-rSE/strings.xml | 86 +- .../app/src/main/res/values-sw600dp/bools.xml | 1 - .../app/src/main/res/values-tg/strings.xml | 87 +- .../app/src/main/res/values-tr/strings.xml | 89 +- .../app/src/main/res/values-ug/strings.xml | 86 +- .../app/src/main/res/values-uk/strings.xml | 98 +- .../app/src/main/res/values-vi/strings.xml | 106 +- .../src/main/res/values-zh-rCN/strings.xml | 82 +- .../src/main/res/values-zh-rTW/strings.xml | 86 +- .../fenix/app/src/main/res/values/bools.xml | 1 - .../src/main/res/values/preference_keys.xml | 13 + .../src/main/res/values/static_strings.xml | 4 +- .../fenix/app/src/main/res/values/strings.xml | 109 +- .../res/xml/secret_settings_preferences.xml | 5 + .../mobile/android/focus-android/app/lint.xml | 16 + .../app/src/main/AndroidManifest.xml | 1 - .../app/src/main/res/values-am/strings.xml | 32 +- .../app/src/main/res/values-eo/strings.xml | 8 +- .../app/src/main/res/values-gl/strings.xml | 32 +- .../app/src/main/res/values-hu/strings.xml | 56 +- .../app/src/main/res/values-lo/strings.xml | 32 +- .../app/src/main/res/values/strings.xml | 26 +- .../actors/ContentDelegateChild.sys.mjs | 95 + .../components/extensions/ext-android.js | 4 +- .../shared/components/extensions/ext-tabs.js | 10 +- .../geckoview/GeckoViewConsole.sys.mjs | 10 +- .../geckoview/GeckoViewNavigation.sys.mjs | 2 +- firefox-src-part/modules/libpref/init/all.js | 73 +- .../netwerk/base/nsIIOService.idl | 8 + firefox-src-part/netwerk/base/nsIOService.cpp | 20 + firefox-src-part/netwerk/base/nsIOService.h | 2 + .../netwerk/base/nsIPermissionManager.idl | 13 +- .../netwerk/base/nsIUDPSocket.idl | 36 +- firefox-src-part/netwerk/base/nsIURI.idl | 14 +- .../base/nsIncrementalStreamLoader.cpp | 3 +- .../netwerk/cookie/nsICookieService.idl | 62 +- firefox-src-part/netwerk/dns/nsIDNService.cpp | 340 +- firefox-src-part/netwerk/dns/nsIDNService.h | 48 +- .../netwerk/dns/nsIIDNService.idl | 5 - .../netwerk/dns/nsITRRSkipReason.idl | 4 +- .../protocol/http/HPKEConfigManager.sys.mjs | 11 + .../protocol/http/NetworkErrorLogging.sys.mjs | 419 ++ .../protocol/http/ObliviousHTTP.sys.mjs | 210 + .../protocol/http/nsIHttpChannelInternal.idl | 9 + .../protocol/http/nsINetworkErrorLogging.idl | 22 + .../protocol/http/nsIObliviousHttp.idl | 2 + .../netwerk/wifi/nsIWifiMonitor.idl | 8 +- .../remote/cdp/CDPConnection.sys.mjs | 2 +- .../cdp/domains/content/Runtime.sys.mjs | 5 +- .../actors/MarionetteCommandsChild.sys.mjs | 2 - .../remote/marionette/cookie.sys.mjs | 4 +- .../remote/marionette/driver.sys.mjs | 16 +- .../remote/marionette/json.sys.mjs | 6 +- .../remote/marionette/message.sys.mjs | 2 +- .../remote/marionette/server.sys.mjs | 2 +- .../remote/marionette/web-reference.sys.mjs | 4 +- .../remote/shared/Browser.sys.mjs | 2 +- firefox-src-part/remote/shared/DOM.sys.mjs | 4 +- firefox-src-part/remote/shared/Log.sys.mjs | 11 + .../remote/shared/Navigate.sys.mjs | 86 +- .../remote/shared/NavigationManager.sys.mjs | 17 +- .../remote/shared/NetworkResponse.sys.mjs | 64 +- .../remote/shared/TabManager.sys.mjs | 1 - .../NavigationListenerChild.sys.mjs | 1 - .../NavigationListenerParent.sys.mjs | 8 +- .../listeners/NetworkEventRecord.sys.mjs | 1 - .../shared/messagehandler/Errors.sys.mjs | 4 +- .../shared/messagehandler/ModuleCache.sys.mjs | 24 +- .../remote/shared/webdriver/Actions.sys.mjs | 18 +- .../shared/webdriver/Capabilities.sys.mjs | 8 +- .../remote/shared/webdriver/Errors.sys.mjs | 4 +- .../remote/shared/webdriver/Session.sys.mjs | 2 +- .../webdriver/UserPromptHandler.sys.mjs | 6 +- .../webdriver-bidi/WebDriverBiDi.sys.mjs | 4 +- .../WebDriverBiDiConnection.sys.mjs | 16 +- .../modules/RootBiDiModule.sys.mjs | 54 + .../modules/root/browser.sys.mjs | 4 +- .../modules/root/browsingContext.sys.mjs | 212 +- .../webdriver-bidi/modules/root/input.sys.mjs | 4 +- .../webdriver-bidi/modules/root/log.sys.mjs | 4 +- .../modules/root/network.sys.mjs | 202 +- .../modules/root/permissions.sys.mjs | 4 +- .../modules/root/script.sys.mjs | 33 +- .../modules/root/session.sys.mjs | 4 +- .../modules/root/storage.sys.mjs | 4 +- .../services/settings/Attachments.sys.mjs | 34 +- .../services/settings/Utils.sys.mjs | 35 + .../services/sync/modules/constants.sys.mjs | 2 +- .../services/sync/modules/service.sys.mjs | 9 - .../actors/AboutHttpsOnlyErrorChild.sys.mjs | 10 - .../KeyPressEventModelCheckerChild.sys.mjs | 10 - .../actors/PictureInPictureChild.sys.mjs | 1 - .../actors/UserCharacteristicsParent.sys.mjs | 24 +- ...UserCharacteristicsScreenInfoChild.sys.mjs | 58 - ...UserCharacteristicsWindowInfoChild.sys.mjs | 163 + .../aboutinference/content/aboutInference.css | 144 + .../content/aboutInference.html | 189 +- .../aboutinference/content/aboutInference.js | 320 +- .../aboutprocesses/content/aboutProcesses.js | 19 +- .../toolkit/components/alerts/alert.xhtml | 1 + .../nsIBounceTrackingProtection.idl | 31 + .../browser/nsIPrintPreviewNavigation.idl | 52 - .../cleardata/ClearDataService.sys.mjs | 88 +- .../contentanalysis/nsIContentAnalysis.idl | 5 + .../CredentialChooserService.sys.mjs | 7 +- .../nsIIdentityCredentialStorageService.idl | 6 +- .../extensions/ExtensionCommon.sys.mjs | 3 +- .../extensions/ExtensionContent.sys.mjs | 29 +- .../extensions/ExtensionDNRStore.sys.mjs | 2 +- .../extensions/ExtensionPermissions.sys.mjs | 100 +- .../extensions/ExtensionSettingsStore.sys.mjs | 1 - .../extensions/ExtensionStorage.sys.mjs | 95 +- .../components/extensions/Schemas.sys.mjs | 8 +- .../extensions/WebNavigationFrames.sys.mjs | 2 +- .../extensions/child/ext-runtime.js | 2 +- .../extensions/parent/ext-storage.js | 6 + .../extensions/parent/ext-tabs-base.js | 24 +- .../extensions/webrequest/WebRequest.sys.mjs | 37 +- .../formautofill/FormAutofillChild.sys.mjs | 2 +- .../formautofill/FormAutofillParent.sys.mjs | 14 +- .../components/formautofill/Helpers.ios.mjs | 17 +- .../shared/AutofillTelemetry.sys.mjs | 4 +- .../shared/FormAutofillHandler.sys.mjs | 6 +- .../shared/FormAutofillSection.sys.mjs | 2 +- .../shared/FormStateManager.sys.mjs | 1 - .../components/kvstore/kvstore.sys.mjs | 69 +- .../components/kvstore/nsIKeyValue.idl | 32 +- .../ml/actors/MLEngineChild.sys.mjs | 150 +- .../ml/actors/MLEngineParent.sys.mjs | 112 +- .../ml/content/EngineProcess.sys.mjs | 14 +- .../ml/content/HttpInference.sys.mjs | 158 + .../components/ml/content/ModelHub.sys.mjs | 157 +- .../components/ml/content/ONNXPipeline.mjs | 46 +- .../narrate/NarrateControls.sys.mjs | 22 - .../passwordmgr/LoginHelper.sys.mjs | 95 +- .../passwordmgr/LoginManager.shared.mjs | 128 + .../passwordmgr/LoginManagerChild.sys.mjs | 4 +- .../passwordmgr/LoginManagerParent.sys.mjs | 2 +- .../passwordmgr/PasswordRulesManager.sys.mjs | 5 +- .../{ => shared}/LoginFormFactory.sys.mjs | 0 .../{ => shared}/NewPasswordModel.sys.mjs | 0 .../{ => shared}/PasswordGenerator.sys.mjs | 0 .../{ => shared}/PasswordRulesParser.sys.mjs | 0 .../components/pdfjs/PdfJsDefaultPrefs.js | 1 - .../pdfjs/content/PdfJsTelemetry.sys.mjs | 6 +- .../pdfjs/content/PdfStreamConverter.sys.mjs | 37 +- .../pdfjs/content/PdfjsParent.sys.mjs | 42 +- .../components/pdfjs/content/build/pdf.mjs | 107 +- .../pdfjs/content/build/pdf.scripting.mjs | 4 +- .../pdfjs/content/build/pdf.worker.mjs | 81 +- .../pdfjs/content/web/viewer-geckoview.mjs | 169 +- .../components/pdfjs/content/web/viewer.css | 308 +- .../components/pdfjs/content/web/viewer.html | 42 +- .../components/pdfjs/content/web/viewer.mjs | 231 +- .../components/printing/content/print.js | 20 - .../components/printing/content/printUtils.js | 10 +- .../prompts/content/commonDialog.js | 11 +- .../prompts/src/CommonDialog.sys.mjs | 66 +- .../components/prompts/src/Prompter.sys.mjs | 2 +- .../components/reader/AboutReader.sys.mjs | 60 +- .../reader/content/aboutReader.html | 6 + .../components/remote/nsIRemoteService.idl | 31 + .../ReportBrokenSiteParent.sys.mjs | 24 +- .../UserCharacteristicsPageService.sys.mjs | 304 +- .../content/usercharacteristics.html | 244 + .../content/usercharacteristics.js | 125 +- .../nsIUserCharacteristicsPageService.idl | 3 +- .../datasources/LoginDataSource.sys.mjs | 47 +- .../megalist/content/MegalistAlpha.mjs | 136 +- .../satchel/megalist/content/megalist.css | 5 - .../search/AddonSearchEngine.sys.mjs | 38 - .../search/AppProvidedSearchEngine.sys.mjs | 36 +- .../components/search/SearchEngine.sys.mjs | 1 - .../search/SearchEngineSelector.sys.mjs | 6 + .../components/search/SearchService.sys.mjs | 175 +- .../components/search/SearchSettings.sys.mjs | 56 +- .../components/search/SearchUtils.sys.mjs | 21 +- .../shopping/content/ShoppingProduct.mjs | 203 +- .../thumbnails/PageThumbUtils.sys.mjs | 2 +- .../actors/AboutTranslationsParent.sys.mjs | 46 +- .../actors/TranslationsEngineParent.sys.mjs | 15 +- .../actors/TranslationsParent.sys.mjs | 460 +- .../content/translations-document.sys.mjs | 50 +- .../content/translations-engine.worker.js | 2 +- .../components/generated/RustSuggest.sys.mjs | 306 +- .../components/generated/RustTabs.sys.mjs | 48 +- .../fixtures/generated/RustArithmetic.sys.mjs | 8 +- .../generated/RustCustomTypes.sys.mjs | 2 +- .../generated/RustExternalTypes.sys.mjs | 4 +- .../fixtures/generated/RustGeometry.sys.mjs | 4 +- .../fixtures/generated/RustRefcounts.sys.mjs | 6 +- .../fixtures/generated/RustRondpoint.sys.mjs | 120 +- .../fixtures/generated/RustSprites.sys.mjs | 12 +- .../fixtures/generated/RustTodolist.sys.mjs | 30 +- .../js/CallbackInterfaceHandler.sys.mjs | 2 +- .../src/templates/js/Enum.sys.mjs | 42 +- .../src/templates/js/Error.sys.mjs | 22 +- .../src/templates/js/Helpers.sys.mjs | 8 +- .../src/templates/js/Object.sys.mjs | 24 +- .../src/templates/js/Record.sys.mjs | 26 +- .../templates/js/TopLevelFunctions.sys.mjs | 2 +- .../src/templates/js/macros.sys.mjs | 6 +- .../windowwatcher/nsPIWindowWatcher.idl | 2 +- .../toolkit/content/aboutNetError.mjs | 32 +- firefox-src-part/toolkit/content/license.html | 4 +- .../toolkit/content/widgets/arrowscrollbox.js | 350 +- .../toolkit/content/widgets/menupopup.js | 4 +- .../content/widgets/moz-button/moz-button.mjs | 6 +- .../widgets/moz-button/moz-button.stories.mjs | 2 +- .../content/widgets/moz-card/moz-card.css | 3 + .../content/widgets/moz-card/moz-card.mjs | 13 +- .../widgets/moz-checkbox/moz-checkbox.css | 4 + .../widgets/moz-checkbox/moz-checkbox.mjs | 25 +- .../moz-checkbox/moz-checkbox.stories.mjs | 17 +- .../moz-radio-group/moz-radio-group.mjs | 40 +- .../moz-radio-group.stories.mjs | 49 +- .../widgets/moz-radio-group/moz-radio.css | 22 +- .../content/widgets/panel-list/panel-item.css | 12 +- .../content/widgets/panel-list/panel-list.css | 8 +- .../toolkit/modules/BrowserUtils.sys.mjs | 87 +- .../modules/ClipboardContextMenu.sys.mjs | 13 +- .../toolkit/modules/Sqlite.sys.mjs | 1 - .../mozapps/extensions/AddonManager.sys.mjs | 13 +- .../mozapps/update/UpdateService.sys.mjs | 1 + .../toolkit/profile/nsIToolkitProfile.idl | 2 +- .../toolkit/themes/shared/arrowscrollbox.css | 60 +- .../design-system/figma-tokens-config.js | 3 - .../shared/design-system/tokens-brand.css | 1 + .../shared/design-system/tokens-platform.css | 1 + .../shared/design-system/tokens-shared.css | 3 + .../shared/design-system/tokens-storybook.mjs | 27 + .../toolkit/themes/shared/global-shared.css | 3 +- .../shared/in-content/common-shared.css | 15 +- .../toolkit/themes/shared/menu-shared.css | 23 +- .../toolkit/themes/shared/popup.css | 6 + firefox-src-part/widget/nsIWidgetListener.cpp | 1 + firefox-src-part/widget/nsIWidgetListener.h | 5 + .../xpcom/glue/standalone/nsXPCOMGlue.cpp | 5 +- firefox-src-part/xpcom/threads/nsIThread.idl | 2 - .../xpfe/appshell/nsIAppShellService.idl | 10 - version.txt | 2 +- 723 files changed, 20209 insertions(+), 21771 deletions(-) create mode 100644 firefox-src-part/browser/components/customizableui/ToolbarContextMenu.sys.mjs create mode 100644 firefox-src-part/browser/components/newtab/content-src/components/Logo/Logo.jsx create mode 100644 firefox-src-part/browser/components/newtab/content-src/components/Logo/_Logo.scss delete mode 100644 firefox-src-part/browser/components/newtab/content-src/styles/activity-stream-linux.scss delete mode 100644 firefox-src-part/browser/components/newtab/content-src/styles/activity-stream-mac.scss delete mode 100644 firefox-src-part/browser/components/newtab/content-src/styles/activity-stream-windows.scss rename firefox-src-part/browser/components/newtab/content-src/styles/{_activity-stream.scss => activity-stream.scss} (94%) delete mode 100644 firefox-src-part/browser/components/newtab/css/activity-stream-linux.css delete mode 100644 firefox-src-part/browser/components/newtab/css/activity-stream-windows.css rename firefox-src-part/browser/components/newtab/css/{activity-stream-mac.css => activity-stream.css} (91%) create mode 100644 firefox-src-part/browser/components/sidebar/sidebar-history.css delete mode 100644 firefox-src-part/browser/components/sidebar/sidebar-syncedtabs.css create mode 100644 firefox-src-part/browser/components/urlbar/UrlbarProviderActionsSearchMode.sys.mjs create mode 100644 firefox-src-part/browser/components/urlbar/UrlbarProviderRestrictKeywordsAutofill.sys.mjs create mode 100644 firefox-src-part/devtools/client/framework/actions/network-overrides.js create mode 100644 firefox-src-part/devtools/client/framework/reducers/network-overrides.js create mode 100644 firefox-src-part/devtools/client/themes/inspector-shared.css create mode 100644 firefox-src-part/devtools/client/themes/inspector-swatches.css create mode 100644 firefox-src-part/dom/geolocation/GeolocationUIUtilsWin.sys.mjs create mode 100644 firefox-src-part/dom/geolocation/nsIGeolocationUIUtilsWin.idl delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/AndroidManifest.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/drawable/mozac_browser_toolbar_icons_vertical_separator.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/drawable/mozac_dot_notification.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/drawable/mozac_ic_site_security.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/drawable/mozac_ic_tracking_protection_off_for_a_site.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/drawable/mozac_ic_tracking_protection_on_no_trackers_blocked.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/drawable/mozac_ic_tracking_protection_on_trackers_blocked.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/layout/mozac_browser_toolbar_displaytoolbar.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/layout/mozac_browser_toolbar_edittoolbar.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-an/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-ast/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-az/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-ban/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-bn/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-ceb/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-ckb/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-et/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-fa/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-ff/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-ga-rIE/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-gd/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-gu-rIN/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-hi-rIN/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-hil/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-ka/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-kaa/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-kn/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-ldrtl/dimens.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-lij/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-lt/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-mix/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-ml/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-mr/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-my/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-ne-rNP/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-or/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-sr/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-szl/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-ta/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-tl/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-tok/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-trs/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-tzm/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-ur/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-uz/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-vec/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values-yo/strings.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values/attrs_browser_toolbar.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values/dimens.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values/ids.xml delete mode 100644 firefox-src-part/mobile/android/android-components/components/browser/toolbar2/src/main/res/values/strings.xml create mode 100644 firefox-src-part/mobile/android/android-components/components/ui/icons/src/main/res/drawable/mozac_ic_translate_active_24.xml create mode 100644 firefox-src-part/mobile/android/android-components/lint.xml create mode 100644 firefox-src-part/netwerk/protocol/http/NetworkErrorLogging.sys.mjs create mode 100644 firefox-src-part/netwerk/protocol/http/ObliviousHTTP.sys.mjs create mode 100644 firefox-src-part/netwerk/protocol/http/nsINetworkErrorLogging.idl create mode 100644 firefox-src-part/remote/webdriver-bidi/modules/RootBiDiModule.sys.mjs delete mode 100644 firefox-src-part/toolkit/actors/UserCharacteristicsScreenInfoChild.sys.mjs create mode 100644 firefox-src-part/toolkit/actors/UserCharacteristicsWindowInfoChild.sys.mjs delete mode 100644 firefox-src-part/toolkit/components/browser/nsIPrintPreviewNavigation.idl create mode 100644 firefox-src-part/toolkit/components/ml/content/HttpInference.sys.mjs rename firefox-src-part/toolkit/components/passwordmgr/{ => shared}/LoginFormFactory.sys.mjs (100%) rename firefox-src-part/toolkit/components/passwordmgr/{ => shared}/NewPasswordModel.sys.mjs (100%) rename firefox-src-part/toolkit/components/passwordmgr/{ => shared}/PasswordGenerator.sys.mjs (100%) rename firefox-src-part/toolkit/components/passwordmgr/{ => shared}/PasswordRulesParser.sys.mjs (100%) create mode 100644 firefox-src-part/toolkit/components/remote/nsIRemoteService.idl diff --git a/firefox-src-part/browser/actors/ClickHandlerParent.sys.mjs b/firefox-src-part/browser/actors/ClickHandlerParent.sys.mjs index bdb722d95..bd3112f1a 100644 --- a/firefox-src-part/browser/actors/ClickHandlerParent.sys.mjs +++ b/firefox-src-part/browser/actors/ClickHandlerParent.sys.mjs @@ -119,6 +119,7 @@ export class ClickHandlerParent extends JSWindowActorParent { openerBrowser: browser, // The child ensures that untrusted events have a valid user activation. hasValidUserGestureActivation: true, + textDirectiveUserActivation: true, triggeringRemoteType: this.manager.domProcess?.remoteType, }; diff --git a/firefox-src-part/browser/actors/ContextMenuChild.sys.mjs b/firefox-src-part/browser/actors/ContextMenuChild.sys.mjs index 2b98bea65..8c1824f2b 100644 --- a/firefox-src-part/browser/actors/ContextMenuChild.sys.mjs +++ b/firefox-src-part/browser/actors/ContextMenuChild.sys.mjs @@ -113,13 +113,6 @@ export class ContextMenuChild extends JSWindowActorChild { } break; case "pictureinpicture": - if (!media.isCloningElementVisually) { - Services.telemetry.keyedScalarAdd( - "pictureinpicture.opened_method", - "contextmenu", - 1 - ); - } let event = new this.contentWindow.CustomEvent( "MozTogglePictureInPicture", { diff --git a/firefox-src-part/browser/actors/ContextMenuParent.sys.mjs b/firefox-src-part/browser/actors/ContextMenuParent.sys.mjs index 4c67bc75e..a14da27f6 100644 --- a/firefox-src-part/browser/actors/ContextMenuParent.sys.mjs +++ b/firefox-src-part/browser/actors/ContextMenuParent.sys.mjs @@ -3,10 +3,18 @@ * 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/. */ +import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; + const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { + E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs", FirefoxRelay: "resource://gre/modules/FirefoxRelay.sys.mjs", + WebNavigationFrames: "resource://gre/modules/WebNavigationFrames.sys.mjs", +}); + +XPCOMUtils.defineLazyServiceGetters(lazy, { + BrowserHandler: ["@mozilla.org/browser/clh;1", "nsIBrowserHandler"], }); export class ContextMenuParent extends JSWindowActorParent { @@ -18,14 +26,14 @@ export class ContextMenuParent extends JSWindowActorParent { // loads nsContextMenu.js. In that case, try to find the chromeEventHandler, // since that'll likely be the "top" , and then use its window's // nsContextMenu instance instead. - if (!win.openContextMenu) { + if (!win.nsContextMenu) { let topBrowser = browser.ownerGlobal.docShell.chromeEventHandler; win = topBrowser.ownerGlobal; } message.data.context.showRelay &&= lazy.FirefoxRelay.isEnabled; - win.openContextMenu(message, browser, this); + this.#openContextMenu(message.data, win, browser); } hiding() { @@ -114,4 +122,113 @@ export class ContextMenuParent extends JSWindowActorParent { targetIdentifier, }); } + + /** + * Handles opening of the context menu for the appropraite browser. + * + * @param {object} data + * The data for the context menu, received from the child. + * @param {DOMWindow} win + * The window in which the context menu is to be opened. + * @param {Browser} browser + * The browser the context menu is being opened for. + */ + #openContextMenu(data, win, browser) { + if (lazy.BrowserHandler.kiosk) { + // Don't display context menus in kiosk mode + return; + } + let wgp = this.manager; + + if (!wgp.isCurrentGlobal) { + // Don't display context menus for unloaded documents + return; + } + + // NOTE: We don't use `wgp.documentURI` here as we want to use the failed + // channel URI in the case we have loaded an error page. + let documentURIObject = wgp.browsingContext.currentURI; + + let frameReferrerInfo = data.frameReferrerInfo; + if (frameReferrerInfo) { + frameReferrerInfo = + lazy.E10SUtils.deserializeReferrerInfo(frameReferrerInfo); + } + + let linkReferrerInfo = data.linkReferrerInfo; + if (linkReferrerInfo) { + linkReferrerInfo = + lazy.E10SUtils.deserializeReferrerInfo(linkReferrerInfo); + } + + let frameID = lazy.WebNavigationFrames.getFrameId(wgp.browsingContext); + + win.nsContextMenu.contentData = { + context: data.context, + browser, + actor: this, + editFlags: data.editFlags, + spellInfo: data.spellInfo, + principal: wgp.documentPrincipal, + storagePrincipal: wgp.documentStoragePrincipal, + documentURIObject, + docLocation: documentURIObject.spec, + charSet: data.charSet, + referrerInfo: lazy.E10SUtils.deserializeReferrerInfo(data.referrerInfo), + frameReferrerInfo, + linkReferrerInfo, + contentType: data.contentType, + contentDisposition: data.contentDisposition, + frameID, + frameOuterWindowID: frameID, + frameBrowsingContext: wgp.browsingContext, + selectionInfo: data.selectionInfo, + disableSetDesktopBackground: data.disableSetDesktopBackground, + showRelay: data.showRelay, + loginFillInfo: data.loginFillInfo, + userContextId: wgp.browsingContext.originAttributes.userContextId, + webExtContextData: data.webExtContextData, + cookieJarSettings: wgp.cookieJarSettings, + }; + + let popup = win.document.getElementById("contentAreaContextMenu"); + let context = win.nsContextMenu.contentData.context; + + // Fill in some values in the context from the WindowGlobalParent actor. + context.principal = wgp.documentPrincipal; + context.storagePrincipal = wgp.documentStoragePrincipal; + context.frameID = frameID; + context.frameOuterWindowID = wgp.outerWindowId; + context.frameBrowsingContextID = wgp.browsingContext.id; + + // We don't have access to the original event here, as that happened in + // another process. Therefore we synthesize a new MouseEvent to propagate the + // inputSource to the subsequently triggered popupshowing event. + let newEvent = new PointerEvent("contextmenu", { + bubbles: true, + cancelable: true, + screenX: context.screenXDevPx / win.devicePixelRatio, + screenY: context.screenYDevPx / win.devicePixelRatio, + button: 2, + pointerType: (() => { + switch (context.inputSource) { + case MouseEvent.MOZ_SOURCE_MOUSE: + return "mouse"; + case MouseEvent.MOZ_SOURCE_PEN: + return "pen"; + case MouseEvent.MOZ_SOURCE_ERASER: + return "eraser"; + case MouseEvent.MOZ_SOURCE_CURSOR: + return "cursor"; + case MouseEvent.MOZ_SOURCE_TOUCH: + return "touch"; + case MouseEvent.MOZ_SOURCE_KEYBOARD: + return "keyboard"; + default: + return ""; + } + })(), + }); + popup.openPopupAtScreen(newEvent.screenX, newEvent.screenY, true, newEvent); + } } diff --git a/firefox-src-part/browser/actors/LinkHandlerParent.sys.mjs b/firefox-src-part/browser/actors/LinkHandlerParent.sys.mjs index 5610c7122..910276e6a 100644 --- a/firefox-src-part/browser/actors/LinkHandlerParent.sys.mjs +++ b/firefox-src-part/browser/actors/LinkHandlerParent.sys.mjs @@ -5,7 +5,7 @@ const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { - PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs", + PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs", }); let gTestListeners = new Set(); @@ -131,7 +131,7 @@ export class LinkHandlerParent extends JSWindowActorParent { console.error(ex); return; } - if (iconURI.scheme != "data") { + if (!iconURI.schemeIs("data")) { try { Services.scriptSecurityManager.checkLoadURIWithPrincipal( browser.contentPrincipal, @@ -144,13 +144,11 @@ export class LinkHandlerParent extends JSWindowActorParent { } if (canStoreIcon) { try { - lazy.PlacesUIUtils.loadFavicon( - browser, - Services.scriptSecurityManager.getSystemPrincipal(), + lazy.PlacesUtils.favicons.setFaviconForPage( Services.io.newURI(pageURL), Services.io.newURI(originalURL), - expiration, - iconURI + iconURI, + expiration && lazy.PlacesUtils.toPRTime(expiration) ); } catch (ex) { console.error(ex); diff --git a/firefox-src-part/browser/actors/SearchSERPTelemetryChild.sys.mjs b/firefox-src-part/browser/actors/SearchSERPTelemetryChild.sys.mjs index f94d29b72..1a1588857 100644 --- a/firefox-src-part/browser/actors/SearchSERPTelemetryChild.sys.mjs +++ b/firefox-src-part/browser/actors/SearchSERPTelemetryChild.sys.mjs @@ -8,6 +8,7 @@ const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { clearTimeout: "resource://gre/modules/Timer.sys.mjs", + SearchUtils: "resource://gre/modules/SearchUtils.sys.mjs", setTimeout: "resource://gre/modules/Timer.sys.mjs", }); @@ -18,6 +19,13 @@ XPCOMUtils.defineLazyPreferenceGetter( false ); +ChromeUtils.defineLazyGetter(lazy, "logConsole", () => { + return console.createInstance({ + prefix: "SearchTelemetry", + maxLogLevel: lazy.SearchUtils.loggingEnabled ? "Debug" : "Warn", + }); +}); + export const CATEGORIZATION_SETTINGS = { MAX_DOMAINS_TO_CATEGORIZE: 10, }; @@ -546,7 +554,16 @@ class SearchAdImpression { #categorizeAnchors(anchors, origin) { for (let anchor of anchors) { if (this.#shouldInspectAnchor(anchor, origin)) { - let result = this.#findDataForAnchor(anchor); + let result; + try { + // We use a schema to ensure the values for each search provider + // aligns to what is expected, but tests don't enforce the schema + // and thus, can technically input faulty values. + result = this.#findDataForAnchor(anchor); + } catch (ex) { + lazy.logConsole.error("Could not find data for anchor:", ex); + continue; + } if (result) { this.#recordElementData(result.element, { type: result.type, @@ -555,7 +572,7 @@ class SearchAdImpression { childElements: result.childElements, }); } - if (result.relatedElements?.length) { + if (result?.relatedElements?.length) { // Bug 1880413: Deprecate related elements. // Bottom-up approach with related elements are only used for // non-link elements related to ads, like carousel arrows. @@ -735,10 +752,13 @@ class SearchAdImpression { * * @param {HTMLAnchorElement} anchor * The anchor to be inspected. - * @returns {object} + * @returns {object | null} * An object containing the element representing the root DOM element for * the component, the type of component, how many ads were counted, * and whether or not the count was of all the children. + * @throws {Error} + * Will throw an error if certain properties of a component are missing. + * Required properties are listed in search-telemetry-v2-schema.json. */ #findDataForAnchor(anchor) { for (let component of this.#providerInfo.components) { @@ -781,6 +801,12 @@ class SearchAdImpression { continue; } + // If a parent was found, we may want to ignore reporting the element + // to telemetry. + if (component.included.parent.skipCount) { + return null; + } + // If we've already inspected the parent, add the child element to the // list of anchors. Don't increment the ads loaded count, as we only care // about grouping the anchor with the correct parent. @@ -805,6 +831,9 @@ class SearchAdImpression { // If counting by child, get all of them at once. if (child.countChildren) { let proxyChildElements = parent.querySelectorAll(child.selector); + if (child.skipCount) { + return null; + } if (proxyChildElements.length) { return { element: parent, @@ -816,6 +845,9 @@ class SearchAdImpression { }; } } else if (parent.querySelector(child.selector)) { + if (child.skipCount) { + return null; + } return { element: parent, type: child.type ?? component.type, diff --git a/firefox-src-part/browser/actors/WebRTCParent.sys.mjs b/firefox-src-part/browser/actors/WebRTCParent.sys.mjs index ae9f4d0a8..be66de4a1 100644 --- a/firefox-src-part/browser/actors/WebRTCParent.sys.mjs +++ b/firefox-src-part/browser/actors/WebRTCParent.sys.mjs @@ -671,6 +671,15 @@ function prompt(aActor, aBrowser, aRequest) { ? lazy.SitePermissions.SCOPE_PERSISTENT : lazy.SitePermissions.SCOPE_TEMPORARY; if (reqAudioInput) { + if (!isPersistent) { + // After a temporary block, having permissions.query() calls + // persistently report "granted" would be misleading + maybeClearAlwaysAsk( + principal, + "microphone", + notification.browser + ); + } lazy.SitePermissions.setForPrincipal( principal, "microphone", @@ -680,6 +689,11 @@ function prompt(aActor, aBrowser, aRequest) { ); } if (reqVideoInput) { + if (!isPersistent && !sharingScreen) { + // After a temporary block, having permissions.query() calls + // persistently report "granted" would be misleading + maybeClearAlwaysAsk(principal, "camera", notification.browser); + } lazy.SitePermissions.setForPrincipal( principal, sharingScreen ? "screen" : "camera", @@ -1134,12 +1148,8 @@ function prompt(aActor, aBrowser, aRequest) { ({ deviceIndex }) => deviceIndex == videoDeviceIndex ); aActor.activateDevicePerm(aRequest.windowID, mediaSource, rawId); - if (remember) { - lazy.SitePermissions.setForPrincipal( - principal, - "camera", - lazy.SitePermissions.ALLOW - ); + if (!sharingScreen) { + persistGrantOrPromptPermission(principal, "camera", remember); } } } @@ -1155,13 +1165,7 @@ function prompt(aActor, aBrowser, aRequest) { ({ deviceIndex }) => deviceIndex == audioDeviceIndex ); aActor.activateDevicePerm(aRequest.windowID, mediaSource, rawId); - if (remember) { - lazy.SitePermissions.setForPrincipal( - principal, - "microphone", - lazy.SitePermissions.ALLOW - ); - } + persistGrantOrPromptPermission(principal, "microphone", remember); } } else if (reqAudioInput === "AudioCapture") { // Only one device possible for audio capture. @@ -1319,31 +1323,6 @@ function prompt(aActor, aBrowser, aRequest) { options ); notification.callID = aRequest.callID; - - let schemeHistogram = Services.telemetry.getKeyedHistogramById( - "PERMISSION_REQUEST_ORIGIN_SCHEME" - ); - let userInputHistogram = Services.telemetry.getKeyedHistogramById( - "PERMISSION_REQUEST_HANDLING_USER_INPUT" - ); - - let docURI = aRequest.documentURI; - let scheme = 0; - if (docURI.startsWith("https")) { - scheme = 2; - } else if (docURI.startsWith("http")) { - scheme = 1; - } - - for (let requestType of requestTypes) { - if (requestType == "AudioCapture") { - requestType = "Microphone"; - } - requestType = requestType.toLowerCase(); - - schemeHistogram.add(requestType, scheme); - userInputHistogram.add(requestType, aRequest.isHandlingUserInput); - } } /** @@ -1497,3 +1476,53 @@ function clearTemporaryGrants(browser, clearCamera, clearMicrophone) { lazy.SitePermissions.removeFromPrincipal(null, perm.id, browser) ); } + +/** + * Persist an ALLOW state if the remember option is true. + * Otherwise, persist PROMPT so that we can later tell the site + * that permission was granted once before. + * This makes Firefox seem much more like Chrome to sites that + * expect a one-off, persistent permission grant for cam/mic. + * + * @param principal - Principal to add permission to. + * @param {string} permissionName - name of permission. + * @param remember - whether the grant should be persisted. + */ +function persistGrantOrPromptPermission(principal, permissionName, remember) { + // There are cases like unsafe delegation where a prompt appears + // even in ALLOW state, so make sure to not overwrite it (there's + // no remember checkbox in those cases) + if ( + lazy.SitePermissions.getForPrincipal(principal, permissionName).state == + lazy.SitePermissions.ALLOW + ) { + return; + } + + lazy.SitePermissions.setForPrincipal( + principal, + permissionName, + remember ? lazy.SitePermissions.ALLOW : lazy.SitePermissions.PROMPT + ); +} + +/** + * Clears any persisted PROMPT (aka Always Ask) permission. + * @param principal - Principal to remove permission from. + * @param {string} permissionName - name of permission. + * @param browser - Browser element to clear permission for. + */ +function maybeClearAlwaysAsk(principal, permissionName, browser) { + // For the "Always Ask" user choice, only persisted PROMPT is used, + // so no need to scan through temporary permissions. + if ( + lazy.SitePermissions.getForPrincipal(principal, permissionName).state == + lazy.SitePermissions.PROMPT + ) { + lazy.SitePermissions.removeFromPrincipal( + principal, + permissionName, + browser + ); + } +} diff --git a/firefox-src-part/browser/app/profile/firefox.js b/firefox-src-part/browser/app/profile/firefox.js index a39a4f287..525d31c9c 100644 --- a/firefox-src-part/browser/app/profile/firefox.js +++ b/firefox-src-part/browser/app/profile/firefox.js @@ -522,6 +522,13 @@ pref("browser.urlbar.quicksuggest.impressionCaps.nonSponsoredEnabled", false); // caps. pref("browser.urlbar.quicksuggest.impressionCaps.sponsoredEnabled", false); +// When non-zero, this is the character-count threshold (inclusive) for showing +// AMP suggestions as top picks. If an AMP suggestion is triggered by a keyword +// at least this many characters long, it will be shown as a top pick. Full +// keywords will also show AMP suggestions as top picks even if they have fewer +// characters than this threshold. +pref("browser.urlbar.quicksuggest.ampTopPickCharThreshold", 0); + // Whether unit conversion is enabled. #ifdef NIGHTLY_BUILD pref("browser.urlbar.unitConversion.enabled", true); @@ -765,6 +772,10 @@ pref("browser.search.serpMetricsRecordedCounter", 0); // days pref("browser.search.widget.removeAfterDaysUnused", 120); +// The number of times the search function in the URL bar has been used, +// capped at 100. +pref("browser.search.totalSearches", 0); + // Enable new experimental shopping features. This is solely intended as a // rollout/"emergency stop" button - it will go away once the feature has // rolled out. There will be separate controls for user opt-in/opt-out. @@ -866,6 +877,20 @@ pref("permissions.desktop-notification.notNow.enabled", false); pref("permissions.fullscreen.allowed", false); +#ifdef MOZ_WEBRTC + // When users grant camera or microphone through a permission prompt + // and leave "☐ Remember this decision" unchecked, Gecko persists + // their choice to "Always ask" for this permission going forward. + // This is exposed to websites through the permissions.query() API + // as "granted", to ward off well-meaning attempts to further escalate + // permission to always grant, to help sites respect this user choice. + // + // By default, these permissions are only visible in Tools / Page Info. + // But turning this pref on also makes them show up as "Always Ask ✖" + // in the more prominent site permissions dropdown. + pref("permissions.media.show_always_ask.enabled", false); +#endif + // Force external link opens into the default user context ID instead of guessing // the most appropriate one based on the URL (https://bugzilla.mozilla.org/show_bug.cgi?id=1874599#c8) pref("browser.link.force_default_user_context_id_for_external_opens", false); @@ -958,11 +983,7 @@ pref("browser.tabs.tooltipsShowPidAndActiveness", true); pref("browser.tabs.tooltipsShowPidAndActiveness", false); #endif -#ifdef NIGHTLY_BUILD pref("browser.tabs.hoverPreview.enabled", true); -#else -pref("browser.tabs.hoverPreview.enabled", false); -#endif pref("browser.tabs.hoverPreview.showThumbnails", true); pref("browser.tabs.firefox-view.logLevel", "Warn"); @@ -1454,7 +1475,7 @@ pref("browser.bookmarks.editDialog.maxRecentFolders", 7); // See - security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp // SetSecurityLevelForContentProcess() for what the different settings mean. #if defined(NIGHTLY_BUILD) - pref("security.sandbox.content.level", 7); + pref("security.sandbox.content.level", 8); #else pref("security.sandbox.content.level", 7); #endif @@ -1624,7 +1645,7 @@ pref("services.sync.prefs.sync.extensions.activeThemeID", true); pref("services.sync.prefs.sync.general.autoScroll", true); // general.autoScroll has a different default on Linux vs elsewhere. pref("services.sync.prefs.sync-seen.general.autoScroll", false); -pref("services.sync.prefs.sync.general.smoothScroll", true); +// general.smoothScroll is not synced, bug 1851024 pref("services.sync.prefs.sync.intl.accept_languages", true); pref("services.sync.prefs.sync.intl.regional_prefs.use_os_locales", true); pref("services.sync.prefs.sync.layout.spellcheckDefault", true); @@ -1750,6 +1771,10 @@ pref("browser.newtabpage.activity-stream.newtabWallpapers.highlightCtaText", "") pref("browser.newtabpage.activity-stream.newNewtabExperience.colors", "#0090ED,#FF4F5F,#2AC3A2,#FF7139,#A172FF,#FFA437,#FF2A8A"); +// Default layout experimentation +pref("browser.newtabpage.activity-stream.newtabLayouts.variant-a", false); +pref("browser.newtabpage.activity-stream.newtabLayouts.variant-b", false); + // Activity Stream prefs that control to which page to redirect #ifndef RELEASE_OR_BETA pref("browser.newtabpage.activity-stream.debug", false); @@ -1840,16 +1865,17 @@ pref("browser.newtabpage.activity-stream.discoverystream.region-bff-config", "US // List of regions that get topics selection by default. pref("browser.newtabpage.activity-stream.discoverystream.topicSelection.region-topics-config", "US, CA"); pref("browser.newtabpage.activity-stream.discoverystream.topicSelection.onboarding.enabled", true); + pref("browser.newtabpage.activity-stream.discoverystream.topicLabels.region-topic-label-config", "US, CA"); #else pref("browser.newtabpage.activity-stream.discoverystream.merino-provider.enabled", false); pref("browser.newtabpage.activity-stream.discoverystream.topicSelection.region-topics-config", ""); pref("browser.newtabpage.activity-stream.discoverystream.topicSelection.onboarding.enabled", false); + pref("browser.newtabpage.activity-stream.discoverystream.topicLabels.region-topic-label-config", ""); #endif // List of locales that get topics selection by default. pref("browser.newtabpage.activity-stream.discoverystream.topicSelection.locale-topics-config", "en-US, en-GB, en-CA"); -// System pref to enable topic labels on Pocket cards -pref("browser.newtabpage.activity-stream.discoverystream.topicLabels.enabled", true); +pref("browser.newtabpage.activity-stream.discoverystream.topicLabels.locale-topic-label-config", "en-US, en-GB, en-CA"); pref("browser.newtabpage.activity-stream.discoverystream.merino-provider.endpoint", "merino.services.mozilla.com"); // List of regions that get spocs by default. @@ -2051,7 +2077,7 @@ pref("identity.fxaccounts.commands.remoteTabManagement.enabled", true); // Controls whether or not the client association ping has values set on it // when the sync-ui-state:update notification fires. -pref("identity.fxaccounts.telemetry.clientAssociationPing.enabled", false); +pref("identity.fxaccounts.telemetry.clientAssociationPing.enabled", true); // Note: when media.gmp-*.visible is true, provided we're running on a // supported platform/OS version, the corresponding CDM appears in the @@ -3166,7 +3192,7 @@ pref("browser.backup.preferences.ui.enabled", false); pref("browser.backup.sqlite.pages_per_step", 50); // The delay between SQLite database backup steps in milliseconds. pref("browser.backup.sqlite.step_delay_ms", 50); -pref("browser.backup.scheduled.idle-threshold-seconds", 300); +pref("browser.backup.scheduled.idle-threshold-seconds", 15); pref("browser.backup.scheduled.minimum-time-between-backups-seconds", 3600); pref("browser.backup.template.fallback-download.release", "https://www.mozilla.org/firefox/download/thanks/?s=direct&utm_medium=firefox-desktop&utm_source=backup&utm_campaign=firefox-backup-2024&utm_content=control"); pref("browser.backup.template.fallback-download.beta", "https://www.mozilla.org/firefox/channel/desktop/?utm_medium=firefox-desktop&utm_source=backup&utm_campaign=firefox-backup-2024&utm_content=control#beta"); diff --git a/firefox-src-part/browser/base/content/aboutDialog.js b/firefox-src-part/browser/base/content/aboutDialog.js index fc0252ad1..8c5c7768e 100644 --- a/firefox-src-part/browser/base/content/aboutDialog.js +++ b/firefox-src-part/browser/base/content/aboutDialog.js @@ -43,15 +43,28 @@ function init() { } // Include the build ID and display warning if this is an "a#" (nightly or aurora) build - let versionId = "aboutDialog-version"; + let versionIdMap = new Map([ + ["base", "aboutDialog-version"], + ["base-nightly", "aboutDialog-version-nightly"], + ["base-arch", "aboutdialog-version-arch"], + ["base-arch-nightly", "aboutdialog-version-arch-nightly"], + ]); + let versionIdKey = "base"; let versionAttributes = { version: AppConstants.MOZ_APP_VERSION_DISPLAY, - bits: Services.appinfo.is64Bit ? 64 : 32, }; + let arch = Services.sysinfo.get("arch"); + if (["x86", "x86-64"].includes(arch)) { + versionAttributes.bits = Services.appinfo.is64Bit ? 64 : 32; + } else { + versionIdKey += "-arch"; + versionAttributes.arch = arch; + } + let version = Services.appinfo.version; if (/a\d+$/.test(version)) { - versionId = "aboutDialog-version-nightly"; + versionIdKey += "-nightly"; let buildID = Services.appinfo.appBuildID; let year = buildID.slice(0, 4); let month = buildID.slice(4, 6); @@ -65,7 +78,11 @@ function init() { // Use Fluent arguments for append version and the architecture of the build let versionField = document.getElementById("version"); - document.l10n.setAttributes(versionField, versionId, versionAttributes); + document.l10n.setAttributes( + versionField, + versionIdMap.get(versionIdKey), + versionAttributes + ); // Show a release notes link if we have a URL. let relNotesLink = document.getElementById("releasenotes"); diff --git a/firefox-src-part/browser/base/content/browser-init.js b/firefox-src-part/browser/base/content/browser-init.js index bee5309c0..9e80738b5 100644 --- a/firefox-src-part/browser/base/content/browser-init.js +++ b/firefox-src-part/browser/base/content/browser-init.js @@ -371,22 +371,23 @@ var gBrowserInit = { BrowserOffline.init(); CanvasPermissionPromptHelper.init(); WebAuthnPromptHelper.init(); - ContentAnalysis.initialize(document); + + BrowserUtils.callModulesFromCategory( + "browser-window-delayed-startup", + window + ); // Initialize the full zoom setting. // We do this before the session restore service gets initialized so we can // apply full zoom settings to tabs restored by the session restore service. FullZoom.init(); PanelUI.init(shouldSuppressPopupNotifications); - ReportBrokenSite.init(gBrowser); UpdateUrlbarSearchSplitterState(); BookmarkingUI.init(); BrowserSearch.delayedStartupInit(); - SearchUIUtils.init(); gProtectionsHandler.init(); - HomePage.delayedStartup().catch(console.error); let safeMode = document.getElementById("helpSafeMode"); if (Services.appinfo.inSafeMode) { @@ -608,6 +609,8 @@ var gBrowserInit = { ShoppingSidebarManager.ensureInitialized(); + SelectableProfileService?.init(); + SessionStore.promiseAllWindowsRestored.then(() => { this._schedulePerWindowIdleTasks(); document.documentElement.setAttribute("sessionrestored", "true"); @@ -1019,8 +1022,6 @@ var gBrowserInit = { TabletModeUpdater.uninit(); - gTabletModePageCounter.finish(); - CaptivePortalWatcher.uninit(); SidebarController.uninit(); @@ -1037,6 +1038,8 @@ var gBrowserInit = { FirefoxViewHandler.uninit(); + SelectableProfileService?.uninit(); + // Now either cancel delayedStartup, or clean up the services initialized from // it. if (this._boundDelayedStartup) { diff --git a/firefox-src-part/browser/base/content/browser-menubar.js b/firefox-src-part/browser/base/content/browser-menubar.js index eabcac067..d4043eb8c 100644 --- a/firefox-src-part/browser/base/content/browser-menubar.js +++ b/firefox-src-part/browser/base/content/browser-menubar.js @@ -140,7 +140,7 @@ document.addEventListener( updateEditUIVisibility(); break; case "view-menu-popup": - onViewToolbarsPopupShowing(event); + ToolbarContextMenu.onViewToolbarsPopupShowing(event); break; case "pageStyleMenuPopup": gPageStyleMenu.fillPopup(event.target); diff --git a/firefox-src-part/browser/base/content/browser-pageActions.js b/firefox-src-part/browser/base/content/browser-pageActions.js index 0e8139901..1662f74f4 100644 --- a/firefox-src-part/browser/base/content/browser-pageActions.js +++ b/firefox-src-part/browser/base/content/browser-pageActions.js @@ -2,10 +2,6 @@ * 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/. */ -ChromeUtils.defineESModuleGetters(this, { - SearchUIUtils: "resource:///modules/SearchUIUtils.sys.mjs", -}); - var BrowserPageActions = { _panelNode: null, /** diff --git a/firefox-src-part/browser/base/content/browser-places.js b/firefox-src-part/browser/base/content/browser-places.js index 8ac64ef35..998debfc0 100644 --- a/firefox-src-part/browser/base/content/browser-places.js +++ b/firefox-src-part/browser/base/content/browser-places.js @@ -25,6 +25,15 @@ XPCOMUtils.defineLazyPreferenceGetter( }, console.error); } ); + +// Set by sync after syncing bookmarks successfully once. +XPCOMUtils.defineLazyPreferenceGetter( + this, + "SHOW_MOBILE_BOOKMARKS", + "browser.bookmarks.showMobileBookmarks", + false +); + ChromeUtils.defineESModuleGetters(this, { PanelMultiView: "resource:///modules/PanelMultiView.sys.mjs", RecentlyClosedTabsAndWindowsMenuUtils: @@ -1343,7 +1352,7 @@ var BookmarkingUI = { onPopupShowing: function BUI_onPopupShowing(event) { // Don't handle events for submenus. - if (event.target != event.currentTarget) { + if (event.target.id != "BMB_bookmarksPopup") { return; } @@ -1374,7 +1383,8 @@ var BookmarkingUI = { return; } - this._initMobileBookmarks(document.getElementById("BMB_mobileBookmarks")); + document.getElementById("BMB_mobileBookmarks").hidden = + !SHOW_MOBILE_BOOKMARKS; this.updateLabel( "BMB_viewBookmarksSidebar", @@ -1582,17 +1592,6 @@ var BookmarkingUI = { } }, - // Set by sync after syncing bookmarks successfully once. - MOBILE_BOOKMARKS_PREF: "browser.bookmarks.showMobileBookmarks", - - _shouldShowMobileBookmarks() { - return Services.prefs.getBoolPref(this.MOBILE_BOOKMARKS_PREF, false); - }, - - _initMobileBookmarks(mobileMenuItem) { - mobileMenuItem.hidden = !this._shouldShowMobileBookmarks(); - }, - _uninitView: function BUI__uninitView() { // When an element with a placesView attached is removed and re-inserted, // XBL reapplies the binding causing any kind of issues and possible leaks, @@ -1938,11 +1937,12 @@ var BookmarkingUI = { onMainMenuPopupShowing: function BUI_onMainMenuPopupShowing(event) { // Don't handle events for submenus. - if (event.target != event.currentTarget) { + if (event.target.id != "bookmarksMenuPopup") { return; } - this._initMobileBookmarks(document.getElementById("menu_mobileBookmarks")); + document.getElementById("menu_mobileBookmarks").hidden = + !SHOW_MOBILE_BOOKMARKS; }, showSubView(anchor) { diff --git a/firefox-src-part/browser/base/content/browser-sitePermissionPanel.js b/firefox-src-part/browser/base/content/browser-sitePermissionPanel.js index de7b2cc39..cf85d3f9c 100644 --- a/firefox-src-part/browser/base/content/browser-sitePermissionPanel.js +++ b/firefox-src-part/browser/base/content/browser-sitePermissionPanel.js @@ -164,17 +164,23 @@ var gPermissionPanel = { gBrowser.selectedBrowser ); for (let permission of permissions) { - if (permission.state != SitePermissions.UNKNOWN) { - hasPermissions = true; + // Don't show persisted PROMPT permissions (unless a pref says to). + // These would appear as "Always Ask ✖" which have utility, but might confuse + if ( + permission.state == SitePermissions.UNKNOWN || + (permission.state == SitePermissions.PROMPT && !this._gumShowAlwaysAsk) + ) { + continue; + } + hasPermissions = true; - if ( - permission.state == SitePermissions.BLOCK || - permission.state == SitePermissions.AUTOPLAY_BLOCKED_ALL - ) { - let icon = permissionAnchors[permission.id]; - if (icon) { - icon.setAttribute("showing", "true"); - } + if ( + permission.state == SitePermissions.BLOCK || + permission.state == SitePermissions.AUTOPLAY_BLOCKED_ALL + ) { + let icon = permissionAnchors[permission.id]; + if (icon) { + icon.setAttribute("showing", "true"); } } } @@ -468,8 +474,8 @@ var gPermissionPanel = { if (this._sharingState?.webRTC) { let webrtcState = this._sharingState.webRTC; - // If WebRTC device or screen permissions are in use, we need to find - // the associated permission item to set the sharingState field. + // If WebRTC device or screen are in use, we need to find + // the associated ALLOW permission item to set the sharingState field. for (let id of ["camera", "microphone", "screen"]) { if (webrtcState[id]) { let found = false; @@ -477,14 +483,14 @@ var gPermissionPanel = { let [permId] = permission.id.split( SitePermissions.PERM_KEY_DELIMITER ); - if (permId != id) { + if (permId != id || permission.state != SitePermissions.ALLOW) { continue; } found = true; permission.sharingState = webrtcState[id]; } if (!found) { - // If the permission item we were looking for doesn't exist, + // If the ALLOW permission item we were looking for doesn't exist, // the user has temporarily allowed sharing and we need to add // an item in the permissions array to reflect this. permissions.push({ @@ -524,6 +530,12 @@ var gPermissionPanel = { anchor.appendChild(permContainer); } } else if (["camera", "screen", "microphone", "speaker"].includes(id)) { + if ( + permission.state == SitePermissions.PROMPT && + !this._gumShowAlwaysAsk + ) { + continue; + } item = this._createWebRTCPermissionItem(permission, id, key); if (!item) { continue; @@ -979,8 +991,12 @@ var gPermissionPanel = { return null; } } else if (item) { - // If we have a single-key (not device specific) webRTC permission it - // overrides any existing (device specific) permission items. + if (permission.state == SitePermissions.PROMPT) { + return null; + } + // If we have a single-key (not device specific) webRTC permission + // other than PROMPT, it overrides any existing (device specific) + // permission items. item.remove(); } @@ -1117,3 +1133,10 @@ function hasMicCamGracePeriodsSolely(browser) { } return { micGrace: micGrace && !micGrant, camGrace: camGrace && !camGrant }; } + +XPCOMUtils.defineLazyPreferenceGetter( + gPermissionPanel, + "_gumShowAlwaysAsk", + "permissions.media.show_always_ask.enabled", + false +); diff --git a/firefox-src-part/browser/base/content/browser-siteProtections.js b/firefox-src-part/browser/base/content/browser-siteProtections.js index 280ef4b5c..156f53839 100644 --- a/firefox-src-part/browser/base/content/browser-siteProtections.js +++ b/firefox-src-part/browser/base/content/browser-siteProtections.js @@ -7,6 +7,7 @@ ChromeUtils.defineESModuleGetters(this, { ContentBlockingAllowList: "resource://gre/modules/ContentBlockingAllowList.sys.mjs", + ReportBrokenSite: "resource:///modules/ReportBrokenSite.sys.mjs", SpecialMessageActions: "resource://messaging-system/lib/SpecialMessageActions.sys.mjs", }); @@ -1376,6 +1377,8 @@ var gProtectionsHandler = { if (!this._protectionsPopup) { let wrapper = document.getElementById("template-protections-popup"); this._protectionsPopup = wrapper.content.firstElementChild; + this._protectionsPopup.addEventListener("popupshown", this); + this._protectionsPopup.addEventListener("popuphidden", this); wrapper.replaceWith(wrapper.content); this.maybeSetMilestoneCounterText(); diff --git a/firefox-src-part/browser/base/content/browser.js b/firefox-src-part/browser/base/content/browser.js index a29d7a84e..ccd83c15d 100644 --- a/firefox-src-part/browser/base/content/browser.js +++ b/firefox-src-part/browser/base/content/browser.js @@ -50,7 +50,6 @@ ChromeUtils.defineESModuleGetters(this, { NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs", NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs", nsContextMenu: "chrome://browser/content/nsContextMenu.sys.mjs", - openContextMenu: "chrome://browser/content/nsContextMenu.sys.mjs", OpenInTabsUtils: "resource:///modules/OpenInTabsUtils.sys.mjs", PageActions: "resource:///modules/PageActions.sys.mjs", PageThumbs: "resource://gre/modules/PageThumbs.sys.mjs", @@ -68,7 +67,6 @@ ChromeUtils.defineESModuleGetters(this, { PromptUtils: "resource://gre/modules/PromptUtils.sys.mjs", ReaderMode: "resource://gre/modules/ReaderMode.sys.mjs", ResetPBMPanel: "resource:///modules/ResetPBMPanel.sys.mjs", - ReportBrokenSite: "resource:///modules/ReportBrokenSite.sys.mjs", SafeBrowsing: "resource://gre/modules/SafeBrowsing.sys.mjs", Sanitizer: "resource:///modules/Sanitizer.sys.mjs", SaveToPocket: "chrome://pocket/content/SaveToPocket.sys.mjs", @@ -87,6 +85,7 @@ ChromeUtils.defineESModuleGetters(this, { TabsSetupFlowManager: "resource:///modules/firefox-view-tabs-setup-manager.sys.mjs", TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.sys.mjs", + ToolbarContextMenu: "resource:///modules/ToolbarContextMenu.sys.mjs", TranslationsParent: "resource://gre/actors/TranslationsParent.sys.mjs", UITour: "resource:///modules/UITour.sys.mjs", UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs", @@ -105,6 +104,17 @@ ChromeUtils.defineESModuleGetters(this, { ZoomUI: "resource:///modules/ZoomUI.sys.mjs", }); +// Bug 1894239: We will move this up to ChromeUtils.defineESModuleGetters once +// the MOZ_SELECTABLE_PROFILES flag is removed +ChromeUtils.defineLazyGetter(this, "SelectableProfileService", () => { + if (!AppConstants.MOZ_SELECTABLE_PROFILES) { + return null; + } + return ChromeUtils.importESModule( + "resource:///modules/profiles/SelectableProfileService.sys.mjs" + ).SelectableProfileService; +}); + ChromeUtils.defineLazyGetter(this, "fxAccounts", () => { return ChromeUtils.importESModule( "resource://gre/modules/FxAccounts.sys.mjs" @@ -563,13 +573,6 @@ XPCOMUtils.defineLazyPreferenceGetter( false ); -XPCOMUtils.defineLazyPreferenceGetter( - this, - "gAlwaysOpenPanel", - "browser.download.alwaysOpenPanel", - true -); - XPCOMUtils.defineLazyPreferenceGetter( this, "gMiddleClickNewTabUsesPasteboard", @@ -1616,7 +1619,7 @@ var BrowserOnClick = { browsingContext.fixupAndLoadURIString(blockedInfo.uri, { triggeringPrincipal, - flags: Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CLASSIFIER, + loadFlags: Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CLASSIFIER, }); }, }; @@ -2521,7 +2524,9 @@ function FillHistoryMenu(event) { entry.hasUserInteraction === false && // Always allow going to the first and last navigation points. j != end - 1 && - j != start + j != start && + // Always display the current entry + j != index ) { continue; } @@ -3401,8 +3406,6 @@ var XULBrowserWindow = { aFlags ); - gTabletModePageCounter.inc(); - this._updateElementsForContentType(); this._updateMacUserActivity(window, aLocationURI, aWebProgress); @@ -4549,170 +4552,6 @@ function showFullScreenViewContextMenuItems(popup) { } } -function onViewToolbarsPopupShowing(aEvent, aInsertPoint) { - var popup = aEvent.target; - - // triggerNode can be a nested child element of a toolbaritem. - let toolbarItem = popup.triggerNode; - while (toolbarItem) { - let localName = toolbarItem.localName; - if (localName == "toolbar") { - toolbarItem = null; - break; - } - if (localName == "toolbarpaletteitem") { - toolbarItem = toolbarItem.firstElementChild; - break; - } - if (localName == "menupopup") { - aEvent.preventDefault(); - aEvent.stopPropagation(); - return; - } - let parent = toolbarItem.parentElement; - if (parent) { - if ( - parent.classList.contains("customization-target") || - parent.getAttribute("overflowfortoolbar") || // Needs to work in the overflow list as well. - parent.localName == "toolbarpaletteitem" || - parent.localName == "toolbar" - ) { - break; - } - } - toolbarItem = parent; - } - - // Empty the menu - for (var i = popup.children.length - 1; i >= 0; --i) { - var deadItem = popup.children[i]; - if (deadItem.hasAttribute("toolbarId")) { - popup.removeChild(deadItem); - } - } - - MozXULElement.insertFTLIfNeeded("browser/toolbarContextMenu.ftl"); - let firstMenuItem = aInsertPoint || popup.firstElementChild; - let toolbarNodes = gNavToolbox.querySelectorAll("toolbar"); - for (let toolbar of toolbarNodes) { - if (!toolbar.hasAttribute("toolbarname")) { - continue; - } - - if (toolbar.id == "PersonalToolbar") { - let menu = BookmarkingUI.buildBookmarksToolbarSubmenu(toolbar); - popup.insertBefore(menu, firstMenuItem); - } else { - let menuItem = document.createXULElement("menuitem"); - menuItem.setAttribute("id", "toggle_" + toolbar.id); - menuItem.setAttribute("toolbarId", toolbar.id); - menuItem.setAttribute("type", "checkbox"); - menuItem.setAttribute("label", toolbar.getAttribute("toolbarname")); - let hidingAttribute = - toolbar.getAttribute("type") == "menubar" ? "autohide" : "collapsed"; - menuItem.setAttribute( - "checked", - toolbar.getAttribute(hidingAttribute) != "true" - ); - menuItem.setAttribute("accesskey", toolbar.getAttribute("accesskey")); - if (popup.id != "toolbar-context-menu") { - menuItem.setAttribute("key", toolbar.getAttribute("key")); - } - - popup.insertBefore(menuItem, firstMenuItem); - menuItem.addEventListener("command", onViewToolbarCommand); - } - } - - let moveToPanel = popup.querySelector(".customize-context-moveToPanel"); - let removeFromToolbar = popup.querySelector( - ".customize-context-removeFromToolbar" - ); - // Show/hide fullscreen context menu items and set the - // autohide item's checked state to mirror the autohide pref. - showFullScreenViewContextMenuItems(popup); - // View -> Toolbars menu doesn't have the moveToPanel or removeFromToolbar items. - if (!moveToPanel || !removeFromToolbar) { - return; - } - - let showTabStripItems = toolbarItem?.id == "tabbrowser-tabs"; - for (let node of popup.querySelectorAll( - 'menuitem[contexttype="toolbaritem"]' - )) { - node.hidden = showTabStripItems; - } - - for (let node of popup.querySelectorAll('menuitem[contexttype="tabbar"]')) { - node.hidden = !showTabStripItems; - } - - document - .getElementById("toolbar-context-menu") - .querySelectorAll("[data-lazy-l10n-id]") - .forEach(el => { - el.setAttribute("data-l10n-id", el.getAttribute("data-lazy-l10n-id")); - el.removeAttribute("data-lazy-l10n-id"); - }); - - // The "normal" toolbar items menu separator is hidden because it's unused - // when hiding the "moveToPanel" and "removeFromToolbar" items on flexible - // space items. But we need to ensure its hidden state is reset in the case - // the context menu is subsequently opened on a non-flexible space item. - let menuSeparator = document.getElementById("toolbarItemsMenuSeparator"); - menuSeparator.hidden = false; - - document.getElementById("toolbarNavigatorItemsMenuSeparator").hidden = - !showTabStripItems; - - if ( - !CustomizationHandler.isCustomizing() && - CustomizableUI.isSpecialWidget(toolbarItem?.id || "") - ) { - moveToPanel.hidden = true; - removeFromToolbar.hidden = true; - menuSeparator.hidden = !showTabStripItems; - } - - if (showTabStripItems) { - let multipleTabsSelected = !!gBrowser.multiSelectedTabsCount; - document.getElementById("toolbar-context-bookmarkSelectedTabs").hidden = - !multipleTabsSelected; - document.getElementById("toolbar-context-bookmarkSelectedTab").hidden = - multipleTabsSelected; - document.getElementById("toolbar-context-reloadSelectedTabs").hidden = - !multipleTabsSelected; - document.getElementById("toolbar-context-reloadSelectedTab").hidden = - multipleTabsSelected; - document.getElementById("toolbar-context-selectAllTabs").disabled = - gBrowser.allTabsSelected(); - document.getElementById("toolbar-context-undoCloseTab").disabled = - SessionStore.getClosedTabCount() == 0; - return; - } - - // fxms-bmb-button is a Firefox Messaging System Bookmarks bar button - let removable = !toolbarItem?.classList?.contains("fxms-bmb-button"); - let movable = - toolbarItem?.id && - removable && - !toolbarItem?.classList?.contains("fxms-bmb-button") && - CustomizableUI.isWidgetRemovable(toolbarItem); - if (movable) { - if (CustomizableUI.isSpecialWidget(toolbarItem.id)) { - moveToPanel.setAttribute("disabled", true); - } else { - moveToPanel.removeAttribute("disabled"); - } - removeFromToolbar.removeAttribute("disabled"); - } else { - if (removable) { - removeFromToolbar.setAttribute("disabled", true); - } - moveToPanel.setAttribute("disabled", true); - } -} - function onViewToolbarCommand(aEvent) { let node = aEvent.originalTarget; let menuId; @@ -4871,36 +4710,6 @@ var TabletModeUpdater = { }, }; -var gTabletModePageCounter = { - enabled: false, - inc() { - this.enabled = AppConstants.platform == "win"; - if (!this.enabled) { - this.inc = () => {}; - return; - } - this.inc = this._realInc; - this.inc(); - }, - - _desktopCount: 0, - _tabletCount: 0, - _realInc() { - let inTabletMode = document.documentElement.hasAttribute("tabletmode"); - this[inTabletMode ? "_tabletCount" : "_desktopCount"]++; - }, - - finish() { - if (this.enabled) { - let histogram = Services.telemetry.getKeyedHistogramById( - "FX_TABLETMODE_PAGE_LOAD" - ); - histogram.add("tablet", this._tabletCount); - histogram.add("desktop", this._desktopCount); - } - }, -}; - function displaySecurityInfo() { BrowserCommands.pageInfo(null, "securityTab"); } @@ -5401,135 +5210,6 @@ function handleDroppedLink( } } -var ToolbarContextMenu = { - updateDownloadsAutoHide(popup) { - let checkbox = document.getElementById( - "toolbar-context-autohide-downloads-button" - ); - let isDownloads = - popup.triggerNode && - ["downloads-button", "wrapper-downloads-button"].includes( - popup.triggerNode.id - ); - checkbox.hidden = !isDownloads; - if (DownloadsButton.autoHideDownloadsButton) { - checkbox.setAttribute("checked", "true"); - } else { - checkbox.removeAttribute("checked"); - } - }, - - onDownloadsAutoHideChange(event) { - let autoHide = event.target.getAttribute("checked") == "true"; - Services.prefs.setBoolPref("browser.download.autohideButton", autoHide); - }, - - updateDownloadsAlwaysOpenPanel(popup) { - let separator = document.getElementById( - "toolbarDownloadsAnchorMenuSeparator" - ); - let checkbox = document.getElementById( - "toolbar-context-always-open-downloads-panel" - ); - let isDownloads = - popup.triggerNode && - ["downloads-button", "wrapper-downloads-button"].includes( - popup.triggerNode.id - ); - separator.hidden = checkbox.hidden = !isDownloads; - gAlwaysOpenPanel - ? checkbox.setAttribute("checked", "true") - : checkbox.removeAttribute("checked"); - }, - - onDownloadsAlwaysOpenPanelChange(event) { - let alwaysOpen = event.target.getAttribute("checked") == "true"; - Services.prefs.setBoolPref("browser.download.alwaysOpenPanel", alwaysOpen); - }, - - _getUnwrappedTriggerNode(popup) { - // Toolbar buttons are wrapped in customize mode. Unwrap if necessary. - let { triggerNode } = popup; - if (triggerNode && gCustomizeMode.isWrappedToolbarItem(triggerNode)) { - return triggerNode.firstElementChild; - } - return triggerNode; - }, - - _getExtensionId(popup) { - let node = this._getUnwrappedTriggerNode(popup); - return node && node.getAttribute("data-extensionid"); - }, - - _getWidgetId(popup) { - let node = this._getUnwrappedTriggerNode(popup); - return node?.closest(".unified-extensions-item")?.id; - }, - - async updateExtension(popup, event) { - let removeExtension = popup.querySelector( - ".customize-context-removeExtension" - ); - let manageExtension = popup.querySelector( - ".customize-context-manageExtension" - ); - let reportExtension = popup.querySelector( - ".customize-context-reportExtension" - ); - let pinToToolbar = popup.querySelector(".customize-context-pinToToolbar"); - let separator = reportExtension.nextElementSibling; - let id = this._getExtensionId(popup); - let addon = id && (await AddonManager.getAddonByID(id)); - - for (let element of [removeExtension, manageExtension, separator]) { - element.hidden = !addon; - } - - if (pinToToolbar) { - pinToToolbar.hidden = !addon; - } - - reportExtension.hidden = !addon || !gAddonAbuseReportEnabled; - - if (addon) { - popup.querySelector(".customize-context-moveToPanel").hidden = true; - popup.querySelector(".customize-context-removeFromToolbar").hidden = true; - - if (pinToToolbar) { - let widgetId = this._getWidgetId(popup); - if (widgetId) { - let area = CustomizableUI.getPlacementOfWidget(widgetId).area; - let inToolbar = area != CustomizableUI.AREA_ADDONS; - pinToToolbar.setAttribute("checked", inToolbar); - } - } - - removeExtension.disabled = !( - addon.permissions & AddonManager.PERM_CAN_UNINSTALL - ); - - if (event?.target?.id === "toolbar-context-menu") { - ExtensionsUI.originControlsMenu(popup, id); - } - } - }, - - async removeExtensionForContextAction(popup) { - let id = this._getExtensionId(popup); - await BrowserAddonUI.removeAddon(id, "browserAction"); - }, - - async reportExtensionForContextAction(popup, reportEntryPoint) { - let id = this._getExtensionId(popup); - await BrowserAddonUI.reportAddon(id, reportEntryPoint); - }, - - async openAboutAddonsForContextAction(popup) { - let id = this._getExtensionId(popup); - await BrowserAddonUI.manageAddon(id, "browserAction"); - }, -}; - // Note that this is also called from non-browser windows on OSX, which do // share menu items but not much else. See nonbrowser-mac.js. var BrowserOffline = { diff --git a/firefox-src-part/browser/base/content/main-popupset.inc.xhtml b/firefox-src-part/browser/base/content/main-popupset.inc.xhtml index 7c0734fbf..bbe6d8bde 100644 --- a/firefox-src-part/browser/base/content/main-popupset.inc.xhtml +++ b/firefox-src-part/browser/base/content/main-popupset.inc.xhtml @@ -109,14 +109,21 @@ noautofocus="true" hidden="true" /> - +