From 4007dbe988d31d961e9a3ad9ce9d1bb59242fd26 Mon Sep 17 00:00:00 2001 From: bot Date: Thu, 1 Feb 2024 06:44:29 +0000 Subject: [PATCH] 123.0b5 --- .../actors/ContentSearchParent.sys.mjs | 3 +- .../browser/actors/LinkHandlerParent.sys.mjs | 12 +- .../browser/actors/PluginParent.sys.mjs | 27 +- .../browser/actors/PromptParent.sys.mjs | 1 + .../actors/ScreenshotsComponentChild.sys.mjs | 39 +- .../browser/app/profile/firefox.js | 62 +- .../base/content/appmenu-viewcache.inc.xhtml | 6 +- .../base/content/browser-captivePortal.js | 7 +- .../browser-data-submission-info-bar.js | 4 +- .../browser-fullScreenAndPointerLock.js | 3 + .../browser/base/content/browser-sidebar.js | 2 +- .../base/content/browser-siteIdentity.js | 52 +- .../base/content/browser-siteProtections.js | 199 +- .../base/content/browser-toolbarKeyNav.js | 3 + .../browser/base/content/browser.css | 7 + .../browser/base/content/browser.js | 236 +-- .../browser/base/content/browser.xhtml | 1 + .../base/content/main-popupset.inc.xhtml | 15 +- .../base/content/navigator-toolbox.inc.xhtml | 6 +- .../browser/base/content/nonbrowser-mac.js | 4 - .../browser/base/content/nsContextMenu.js | 109 +- .../browser/base/content/sanitizeDialog.js | 297 ++- .../browser/base/content/sanitize_v2.xhtml | 142 +- .../browser/base/content/spotlight.html | 2 +- .../browser/base/content/spotlight.js | 6 +- .../browser/base/content/tabbrowser-tab.js | 3 + .../browser/base/content/tabbrowser-tabs.js | 38 + .../browser/base/content/tabbrowser.js | 25 +- .../components/BrowserContentHandler.sys.mjs | 155 +- .../browser/components/BrowserGlue.sys.mjs | 19 +- .../aboutlogins/content/aboutLogins.html | 8 +- .../content/components/login-item.css | 2 +- .../components/aboutwelcome/.eslintrc.js | 15 +- .../actors/AboutWelcomeChild.sys.mjs | 16 +- .../actors/AboutWelcomeParent.sys.mjs | 11 +- .../content-src/aboutwelcome.scss | 53 +- .../content-src/components/AdditionalCTA.jsx | 28 +- .../components/MultiStageAboutWelcome.jsx | 136 +- .../components/MultiStageProtonScreen.jsx | 1 + .../content-src/components/SubmenuButton.jsx | 149 ++ .../content-src/components/Themes.jsx | 1 + .../content/aboutwelcome.bundle.js | 441 +++-- .../aboutwelcome/content/aboutwelcome.css | 128 +- .../aboutwelcome/content/aboutwelcome.html | 4 +- .../aboutwelcome/karma.mc.config.js | 31 +- .../modules/AboutWelcomeDefaults.jsm | 3 +- .../modules/AboutWelcomeTelemetry.jsm | 22 +- .../asrouter/content/asrouter-admin.bundle.js | 4 +- .../components/asrouter/karma.mc.config.js | 12 - .../attribution/AttributionCode.sys.mjs | 246 +-- .../attribution/MacAttribution.sys.mjs | 2 +- .../content/ContentAnalysis.sys.mjs | 74 +- .../content/identityPanel.inc.xhtml | 10 +- .../content/permissionPanel.inc.xhtml | 7 +- .../content/protectionsPanel.inc.xhtml | 10 +- .../customizableui/PanelMultiView.sys.mjs | 67 +- .../customizableui/content/panelUI.inc.xhtml | 2 +- .../browser/components/doh/DoHConfig.sys.mjs | 14 + .../downloads/content/downloads.css | 1 - .../content/downloadsPanel.inc.xhtml | 2 +- .../enterprisepolicies/Policies.sys.mjs | 40 +- .../helpers/WebsiteFilter.sys.mjs | 4 +- .../extensions/parent/ext-browser.js | 3 +- .../extensions/parent/ext-search.js | 27 +- .../components/extensions/parent/ext-tabs.js | 3 +- .../components/firefoxview/card-container.css | 1 + .../components/firefoxview/card-container.mjs | 4 +- .../firefox-view-tabs-setup-manager.sys.mjs | 65 +- .../firefoxview/firefoxview-next.css | 189 -- .../firefoxview/firefoxview-next.html | 118 -- .../firefoxview/firefoxview-next.mjs | 143 -- .../components/firefoxview/firefoxview.css | 950 +-------- .../components/firefoxview/firefoxview.html | 366 +--- .../components/firefoxview/firefoxview.mjs | 197 +- .../firefoxview/fxview-empty-state.css | 4 + .../firefoxview/fxview-search-textbox.css | 4 + .../firefoxview/fxview-search-textbox.mjs | 56 +- .../firefoxview/fxview-tab-list.mjs | 2 +- .../components/firefoxview/history.css | 4 + .../components/firefoxview/history.mjs | 138 +- .../components/firefoxview/opentabs.mjs | 35 +- .../components/firefoxview/recentbrowsing.mjs | 8 +- .../firefoxview/recently-closed-tabs.mjs | 477 ----- .../components/firefoxview/recentlyclosed.mjs | 46 +- .../components/firefoxview/syncedtabs.mjs | 40 +- .../firefoxview/tab-pickup-container.mjs | 295 --- .../firefoxview/tab-pickup-list.mjs | 417 ---- .../firefoxview/view-syncedtabs.css | 6 + .../components/firefoxview/viewpage.mjs | 58 +- .../migration/MigrationUtils.sys.mjs | 6 +- .../components/migration/MigratorBase.sys.mjs | 3 +- .../newtab/AboutNewTabService.sys.mjs | 2 +- .../ContentSection/ContentSection.jsx | 32 +- .../DSDismiss/DSDismiss.jsx | 1 - .../content-src/styles/_feature-callout.scss | 51 +- .../newtab/content-src/styles/_shopping.scss | 2 + .../data/content/activity-stream.bundle.js | 1639 +++++----------- .../components/newtab/karma.mc.config.js | 24 +- .../components/newtab/lib/ASRouter.jsm | 13 +- .../newtab/lib/ASRouterPreferences.jsm | 6 +- .../newtab/lib/ASRouterTargeting.jsm | 2 +- .../newtab/lib/ASRouterTriggerListeners.jsm | 6 +- .../components/newtab/lib/CFRPageActions.jsm | 23 +- .../newtab/lib/DiscoveryStreamFeed.jsm | 2 +- .../newtab/lib/FeatureCalloutMessages.sys.mjs | 74 + .../browser/components/newtab/lib/InfoBar.jsm | 8 +- .../newtab/lib/OnboardingMessageProvider.jsm | 20 +- .../components/newtab/lib/Spotlight.jsm | 4 +- .../components/newtab/lib/TelemetryFeed.jsm | 355 +--- .../newtab/lib/ToastNotification.jsm | 3 +- .../components/newtab/lib/ToolbarPanelHub.jsm | 69 - .../components/newtab/lib/TopSitesFeed.jsm | 180 +- .../newtab/webpack.system-addon.config.js | 1 - .../pagedata/PageDataParent.sys.mjs | 3 +- .../pagedata/PageDataService.sys.mjs | 3 +- .../components/places/PlacesUIUtils.sys.mjs | 3 +- .../places/content/browserPlacesViews.js | 2 +- .../components/places/content/editBookmark.js | 5 +- .../components/places/content/treeView.js | 2 +- .../preferences/dialogs/languages.js | 2 + .../components/preferences/main.inc.xhtml | 8 +- .../browser/components/preferences/main.js | 41 +- .../components/preferences/moreFromMozilla.js | 14 + .../components/preferences/preferences.js | 1 + .../components/preferences/privacy.inc.xhtml | 113 +- .../browser/components/preferences/privacy.js | 269 +-- .../components/preferences/search.inc.xhtml | 109 +- .../browser/components/preferences/search.js | 197 +- .../content/reportBrokenSitePanel.inc.xhtml | 15 +- .../ScreenshotsOverlayChild.sys.mjs | 175 +- .../screenshots/ScreenshotsUtils.sys.mjs | 215 ++- .../screenshots/content/screenshots.js | 13 + .../screenshots/screenshots-buttons.css | 11 + .../screenshots/screenshots-buttons.js | 18 +- .../search/BrowserSearchTelemetry.sys.mjs | 15 +- .../components/search/SearchOneOffs.sys.mjs | 15 +- .../search/SearchSERPTelemetry.sys.mjs | 485 +++-- .../search/content/autocomplete-popup.js | 4 +- .../components/search/content/searchbar.js | 3 +- .../sessionstore/SessionStore.sys.mjs | 66 +- .../shell/nsIWindowsShellService.idl | 36 + .../shopping/ShoppingSidebarChild.sys.mjs | 6 + .../shopping/content/onboarding.mjs | 6 +- .../components/tabpreview/tabpreview.css | 63 + .../components/tabpreview/tabpreview.mjs | 227 +++ .../content/translationsPanel.inc.xhtml | 5 +- .../components/urlbar/MerinoClient.sys.mjs | 5 +- .../components/urlbar/QuickSuggest.sys.mjs | 13 +- .../urlbar/UrlbarController.sys.mjs | 13 +- .../components/urlbar/UrlbarInput.sys.mjs | 108 +- .../components/urlbar/UrlbarPrefs.sys.mjs | 7 + .../urlbar/UrlbarProviderAliasEngines.sys.mjs | 5 +- .../urlbar/UrlbarProviderAutofill.sys.mjs | 11 +- .../UrlbarProviderBookmarkKeywords.sys.mjs | 4 +- .../urlbar/UrlbarProviderClipboard.sys.mjs | 23 +- .../UrlbarProviderContextualSearch.sys.mjs | 8 +- .../urlbar/UrlbarProviderExtension.sys.mjs | 2 +- .../UrlbarProviderHeuristicFallback.sys.mjs | 4 +- .../urlbar/UrlbarProviderInputHistory.sys.mjs | 31 +- .../urlbar/UrlbarProviderPlaces.sys.mjs | 37 +- .../UrlbarProviderPrivateSearch.sys.mjs | 2 +- .../urlbar/UrlbarProviderQuickSuggest.sys.mjs | 13 +- .../UrlbarProviderRecentSearches.sys.mjs | 5 + .../UrlbarProviderSearchSuggestions.sys.mjs | 7 +- .../urlbar/UrlbarProviderSearchTips.sys.mjs | 51 +- .../UrlbarProviderTokenAliasEngines.sys.mjs | 4 +- .../urlbar/UrlbarProviderTopSites.sys.mjs | 2 +- .../urlbar/UrlbarProvidersManager.sys.mjs | 24 +- .../urlbar/UrlbarSearchUtils.sys.mjs | 17 +- .../components/urlbar/UrlbarTokenizer.sys.mjs | 19 +- .../components/urlbar/UrlbarUtils.sys.mjs | 22 +- .../components/urlbar/UrlbarView.sys.mjs | 21 +- .../urlbar/private/AdmWikipedia.sys.mjs | 11 + .../urlbar/private/BaseFeature.sys.mjs | 18 + .../urlbar/private/SuggestBackendRust.sys.mjs | 19 +- .../components/urlbar/private/Weather.sys.mjs | 3 +- .../urlbar/private/YelpSuggestions.sys.mjs | 59 + .../formautofill/content/formautofill.css | 56 +- .../formautofill/content/manageDialog.css | 155 +- .../extensions/webcompat/data/injections.js | 45 +- .../extensions/webcompat/data/ua_overrides.js | 37 - ...28-developer-apple.com-transform-scale.css | 21 - ...w.honda.co.uk-choose-dealer-button-fix.css | 17 - .../css/bug1868345-tvmovie.de-scroll-fix.css | 17 + .../extensions/webcompat/shims/blogger.js | 14 + .../modules/BrowserWindowTracker.sys.mjs | 3 +- .../modules/ContentCrashHandlers.sys.mjs | 8 +- .../browser/modules/FaviconLoader.sys.mjs | 5 +- .../browser/modules/FeatureCallout.sys.mjs | 12 +- .../modules/PartnerLinkAttribution.sys.mjs | 53 - .../browser/modules/PermissionUI.sys.mjs | 10 - .../browser/modules/PingCentre.sys.mjs | 173 -- .../modules/ProcessHangMonitor.sys.mjs | 15 +- .../browser/modules/Sanitizer.sys.mjs | 265 ++- .../browser/modules/SiteDataManager.sys.mjs | 76 + .../themes/osx/customizableui/panelUI.css | 14 - .../browser/themes/shared/autocomplete.css | 355 ++-- .../themes/shared/browser-custom-colors.css | 4 + .../browser/themes/shared/browser-shared.css | 29 +- .../shared/customizableui/panelUI-shared.css | 1714 +++++++++-------- .../shared/migration/migration-wizard.css | 8 + .../themes/shared/preferences/preferences.css | 4 + .../themes/shared/sanitizeDialog_v2.css | 25 + .../themes/shared/urlbar-dynamic-results.css | 5 - .../themes/shared/urlbar-searchbar.css | 35 +- .../browser/themes/shared/urlbarView.css | 22 +- .../caps/nsIScriptSecurityManager.idl | 4 + .../src/actions/debug-targets.js | 19 +- .../configs/mozilla-central-mappings.js | 19 - .../devtools/client/debugger/panel.js | 8 +- .../devtools/client/debugger/src/.eslintrc.js | 6 + .../src/actions/ast/setInScopeLines.js | 11 +- .../breakpoints/breakpointPositions.js | 4 +- .../debugger/src/actions/breakpoints/index.js | 4 +- .../src/actions/breakpoints/modify.js | 4 +- .../src/actions/breakpoints/syncBreakpoint.js | 6 +- .../context-menus/breakpoint-heading.js | 2 +- .../src/actions/context-menus/breakpoint.js | 2 +- .../context-menus/editor-breakpoint.js | 2 +- .../src/actions/context-menus/editor.js | 4 +- .../src/actions/context-menus/frame.js | 6 +- .../src/actions/context-menus/outline.js | 2 +- .../actions/context-menus/source-tree-item.js | 4 +- .../debugger/src/actions/context-menus/tab.js | 2 +- .../debugger/src/actions/event-listeners.js | 2 +- .../debugger/src/actions/expressions.js | 2 +- .../debugger/src/actions/file-search.js | 7 +- .../client/debugger/src/actions/index.js | 10 +- .../client/debugger/src/actions/navigation.js | 2 +- .../debugger/src/actions/pause/breakOnNext.js | 2 +- .../debugger/src/actions/pause/commands.js | 4 +- .../src/actions/pause/continueToHere.js | 4 +- .../debugger/src/actions/pause/fetchFrames.js | 2 +- .../debugger/src/actions/pause/fetchScopes.js | 5 +- .../src/actions/pause/inlinePreview.js | 2 +- .../debugger/src/actions/pause/mapFrames.js | 20 +- .../debugger/src/actions/pause/mapScopes.js | 4 +- .../debugger/src/actions/pause/paused.js | 8 +- .../debugger/src/actions/pause/resumed.js | 8 +- .../debugger/src/actions/pause/selectFrame.js | 2 +- .../debugger/src/actions/pause/skipPausing.js | 2 +- .../client/debugger/src/actions/preview.js | 2 +- .../src/actions/project-text-search.js | 2 +- .../debugger/src/actions/sources-tree.js | 2 +- .../debugger/src/actions/sources/blackbox.js | 4 +- .../src/actions/sources/breakableLines.js | 2 +- .../src/actions/sources/loadSourceText.js | 4 +- .../src/actions/sources/newSources.js | 74 +- .../src/actions/sources/prettyPrint.js | 8 +- .../debugger/src/actions/sources/select.js | 54 +- .../debugger/src/actions/sources/symbols.js | 10 +- .../client/debugger/src/actions/tabs.js | 6 +- .../client/debugger/src/actions/threads.js | 2 +- .../client/debugger/src/actions/tracing.js | 2 +- .../client/debugger/src/actions/ui.js | 18 +- .../src/actions/utils/create-store.js | 5 +- .../client/debugger/src/client/firefox.js | 4 +- .../debugger/src/client/firefox/commands.js | 2 +- .../debugger/src/client/firefox/create.js | 2 +- .../client/debugger/src/components/App.js | 60 +- .../src/components/Editor/BlackboxLines.js | 6 +- .../src/components/Editor/Breakpoint.js | 8 +- .../src/components/Editor/Breakpoints.js | 17 +- .../src/components/Editor/ColumnBreakpoint.js | 8 +- .../components/Editor/ColumnBreakpoints.js | 14 +- .../src/components/Editor/ConditionalPanel.js | 22 +- .../src/components/Editor/DebugLine.js | 12 +- .../src/components/Editor/EmptyLines.js | 13 +- .../src/components/Editor/Exception.js | 12 +- .../src/components/Editor/Exceptions.js | 10 +- .../debugger/src/components/Editor/Footer.js | 99 +- .../src/components/Editor/HighlightLine.js | 14 +- .../src/components/Editor/HighlightLines.js | 4 +- .../src/components/Editor/InlinePreview.js | 6 +- .../src/components/Editor/InlinePreviewRow.js | 10 +- .../src/components/Editor/InlinePreviews.js | 10 +- .../Editor/Preview/ExceptionPopup.js | 12 +- .../src/components/Editor/Preview/Popup.js | 46 +- .../src/components/Editor/Preview/index.js | 16 +- .../src/components/Editor/SearchInFileBar.js | 19 +- .../debugger/src/components/Editor/Tab.js | 16 +- .../debugger/src/components/Editor/Tabs.js | 23 +- .../debugger/src/components/Editor/index.js | 53 +- .../src/components/PrimaryPanes/Outline.js | 24 +- .../components/PrimaryPanes/OutlineFilter.js | 14 +- .../components/PrimaryPanes/ProjectSearch.js | 37 +- .../components/PrimaryPanes/SourcesTree.js | 24 +- .../PrimaryPanes/SourcesTreeItem.js | 14 +- .../src/components/PrimaryPanes/index.js | 14 +- .../debugger/src/components/QuickOpenModal.js | 23 +- .../SecondaryPanes/Breakpoints/Breakpoint.js | 27 +- .../Breakpoints/BreakpointHeading.js | 12 +- .../Breakpoints/ExceptionOption.js | 8 +- .../SecondaryPanes/Breakpoints/index.js | 34 +- .../components/SecondaryPanes/CommandBar.js | 51 +- .../SecondaryPanes/DOMMutationBreakpoints.js | 23 +- .../SecondaryPanes/EventListeners.js | 16 +- .../components/SecondaryPanes/Expressions.js | 20 +- .../components/SecondaryPanes/Frames/Frame.js | 8 +- .../SecondaryPanes/Frames/FrameIndent.js | 2 +- .../components/SecondaryPanes/Frames/Group.js | 11 +- .../components/SecondaryPanes/Frames/index.js | 14 +- .../src/components/SecondaryPanes/Scopes.js | 26 +- .../src/components/SecondaryPanes/Thread.js | 14 +- .../src/components/SecondaryPanes/Threads.js | 12 +- .../components/SecondaryPanes/WhyPaused.js | 18 +- .../SecondaryPanes/XHRBreakpoints.js | 17 +- .../src/components/SecondaryPanes/index.js | 30 +- .../debugger/src/components/ShortcutsModal.js | 16 +- .../debugger/src/components/WelcomeBox.js | 18 +- .../src/components/shared/AccessibleImage.js | 8 +- .../src/components/shared/Accordion.js | 13 +- .../debugger/src/components/shared/Badge.js | 5 +- .../src/components/shared/BracketArrow.js | 8 +- .../components/shared/Button/CloseButton.js | 8 +- .../shared/Button/CommandBarButton.js | 10 +- .../shared/Button/PaneToggleButton.js | 10 +- .../src/components/shared/Dropdown.js | 7 +- .../debugger/src/components/shared/Modal.js | 9 +- .../debugger/src/components/shared/Popover.js | 15 +- .../src/components/shared/PreviewFunction.js | 13 +- .../src/components/shared/ResultList.js | 23 +- .../src/components/shared/SearchInput.js | 25 +- .../src/components/shared/SmartGap.js | 7 +- .../src/components/shared/SourceIcon.js | 14 +- .../client/debugger/src/context-menu/menu.js | 4 +- .../devtools/client/debugger/src/main.js | 9 +- .../client/debugger/src/reducers/ast.js | 2 +- .../debugger/src/reducers/breakpoints.js | 2 +- .../client/debugger/src/reducers/pause.js | 109 -- .../debugger/src/reducers/source-actors.js | 24 + .../debugger/src/reducers/source-blackbox.js | 20 +- .../client/debugger/src/reducers/sources.js | 26 + .../client/debugger/src/reducers/ui.js | 24 +- .../client/debugger/src/selectors/ast.js | 2 +- .../src/selectors/breakpointSources.js | 2 +- .../debugger/src/selectors/breakpoints.js | 4 +- .../debugger/src/selectors/exceptions.js | 4 +- .../debugger/src/selectors/expressions.js | 2 +- .../src/selectors/isSelectedFrameVisible.js | 3 +- .../client/debugger/src/selectors/pause.js | 2 +- .../debugger/src/selectors/source-actors.js | 8 + .../debugger/src/selectors/sources-tree.js | 2 +- .../client/debugger/src/selectors/sources.js | 55 +- .../client/debugger/src/selectors/tabs.js | 2 +- .../client/debugger/src/selectors/threads.js | 2 +- .../client/debugger/src/selectors/ui.js | 12 +- .../src/selectors/visibleBreakpoints.js | 4 +- .../src/selectors/visibleColumnBreakpoints.js | 2 +- .../client/debugger/src/utils/bootstrap.js | 29 +- .../debugger/src/utils/breakpoint/index.js | 2 +- .../client/debugger/src/utils/connect.js | 7 - .../client/debugger/src/utils/context.js | 2 +- .../src/utils/editor/create-editor.js | 2 +- .../src/utils/editor/source-editor.js | 145 -- .../debugger/src/utils/editor/tokens.js | 52 +- .../client/debugger/src/utils/location.js | 8 +- .../client/debugger/src/utils/pause/scopes.js | 2 +- .../client/debugger/src/utils/prefs.js | 13 +- .../client/debugger/src/utils/source-maps.js | 11 +- .../client/debugger/src/utils/source-queue.js | 2 +- .../client/debugger/src/utils/source.js | 8 +- .../debugger/src/utils/sources-tree/getURL.js | 2 +- .../client/debugger/src/utils/telemetry.js | 2 +- .../client/debugger/src/utils/utils.js | 2 +- .../client/debugger/src/utils/wasm.js | 6 +- .../debugger/src/workers/parser/getSymbols.js | 60 +- .../debugger/src/workers/parser/index.js | 1 + .../debugger/src/workers/parser/worker.js | 2 + .../devtools/client/devtools-client.js | 13 - .../framework/source-map-url-service.js | 6 + .../devtools/client/framework/toolbox.js | 17 +- .../inspector/rules/views/rule-editor.js | 7 - .../inspector/shared/tooltips-overlay.js | 28 +- .../client/jsonview/converter-child.js | 2 +- .../devtools/client/memory/reducers/filter.js | 2 +- .../src/assets/styles/NetworkDetailsBar.css | 22 + .../request-details/NetworkDetailsBar.js | 1 + .../request-details/TimingsPanel.js | 83 +- .../src/widgets/RequestListContextMenu.js | 18 +- .../performance-new/shared/background.jsm.js | 11 +- .../client/performance-new/shared/utils.js | 5 + .../devtools/client/preferences/debugger.js | 1 + .../client/responsive/components/App.js | 12 - .../devtools/client/responsive/index.js | 3 + .../devtools/client/responsive/manager.js | 3 +- .../devtools/client/responsive/ui.js | 2 +- .../devtools/client/shared/output-parser.js | 29 +- .../client/shared/source-map-loader/index.js | 53 +- .../shared/source-map-loader/source-map.js | 147 +- .../source-map-loader/utils/fetchSourceMap.js | 24 +- .../utils/sourceMapRequests.js | 12 +- .../client/shared/source-map-loader/worker.js | 4 +- .../shared/widgets/tooltip/HTMLTooltip.js | 41 +- .../shared/widgets/tooltip/TooltipToggle.js | 26 +- .../client/styleeditor/StyleEditorUI.sys.mjs | 135 +- .../devtools/client/themes/tooltips.css | 447 ++--- .../devtools/client/themes/webconsole.css | 17 + .../client/webconsole/actions/input.js | 31 +- .../components/Output/ConsoleOutput.js | 39 +- .../components/Output/MessageContainer.js | 3 + .../components/Output/MessageIcon.js | 6 +- .../components/Output/MessageIndent.js | 6 + .../Output/message-types/JSTracerTrace.js | 157 ++ .../Output/message-types/SimpleTable.js | 14 +- .../devtools/client/webconsole/constants.js | 3 + .../client/webconsole/reducers/messages.js | 46 +- .../client/webconsole/utils/messages.js | 102 + .../client/webconsole/webconsole-ui.js | 4 + .../network-monitor/network-event-actor.js | 34 +- .../server/actors/object/previewers.js | 12 +- .../devtools/server/actors/resources/index.js | 30 +- .../{tracing-state.js => jstracer-state.js} | 21 +- .../server/actors/resources/jstracer-trace.js | 43 + .../resources/network-events-content.js | 1 + .../devtools/server/actors/root.js | 3 - .../devtools/server/actors/tracer.js | 163 +- .../server/actors/utils/event-breakpoints.js | 3 +- .../actors/watcher/SessionDataHelpers.jsm | 7 +- .../server/actors/watcher/session-context.js | 3 +- .../devtools/server/actors/webconsole.js | 5 +- .../actors/webconsole/commands/manager.js | 23 +- .../DevToolsServiceWorkerChild.sys.mjs | 2 +- .../DevToolsServiceWorkerParent.sys.mjs | 3 +- .../devtools/server/tracer/tracer.jsm | 283 ++- .../devtools/shared/DevToolsUtils.js | 2 +- .../commands/resource/resource-command.js | 13 +- .../shared/commands/tracer/tracer-command.js | 15 +- firefox-src-part/devtools/shared/defer.js | 25 - .../devtools/shared/inspector/css-logic.js | 48 +- .../devtools/shared/natural-sort.js | 47 +- .../network-observer/NetworkObserver.sys.mjs | 35 +- .../devtools/shared/protocol/Front.js | 3 +- .../devtools/shared/specs/tracer.js | 6 + .../shared/webconsole/js-property-provider.js | 6 +- .../dom/base/nsIContentPolicy.idl | 31 +- firefox-src-part/dom/base/nsINode.cpp | 2 +- firefox-src-part/dom/base/nsINode.h | 2 +- .../nsICanvasRenderingContextInternal.h | 2 +- .../dom/html/nsIConstraintValidation.cpp | 7 - .../interfaces/base/nsIBrowserDOMWindow.idl | 5 + .../base/nsIContentPrefService2.idl | 2 +- .../security/nsIContentSecurityPolicy.idl | 32 +- firefox-src-part/dom/media/webvtt/vtt.sys.mjs | 33 +- .../dom/quota/nsIQuotaResults.idl | 8 +- .../dom/script/nsIScriptElement.cpp | 3 +- .../dom/workers/nsIWorkerDebuggerManager.idl | 4 +- .../editor/composer/res/EditorOverride.css | 8 - .../layout/base/nsIFrameTraversal.h | 88 - firefox-src-part/layout/generic/nsIFrame.cpp | 278 +-- firefox-src-part/layout/generic/nsIFrame.h | 40 +- .../layout/generic/nsIScrollableFrame.h | 27 +- .../layout/style/contenteditable.css | 8 - firefox-src-part/layout/style/res/forms.css | 10 +- firefox-src-part/layout/style/res/html.css | 12 - firefox-src-part/layout/svg/svg.css | 25 - .../GeckoViewPrintDelegateParent.sys.mjs | 43 - .../mobile/android/app/geckoview-prefs.js | 5 + .../extensions/ext-browserAction.js | 5 +- .../components/extensions/ext-downloads.js | 5 +- .../android/components/extensions/ext-tabs.js | 8 +- .../geckoview/GeckoViewPush.sys.mjs | 14 +- .../geckoview/GeckoViewStartup.sys.mjs | 1 + .../geckoview/GeckoViewContent.sys.mjs | 4 + .../geckoview/GeckoViewNavigation.sys.mjs | 4 +- .../geckoview/GeckoViewTranslations.sys.mjs | 60 +- .../geckoview/GeckoViewWebExtension.sys.mjs | 5 + firefox-src-part/modules/libpref/init/all.js | 24 +- firefox-src-part/netwerk/base/nsILoadInfo.idl | 17 +- .../nsIThreadRetargetableStreamListener.idl | 10 +- .../dns/nsINativeDNSResolverOverride.idl | 8 + .../protocol/http/nsIHttpChannelInternal.idl | 9 + .../protocol/webtransport/nsIWebTransport.idl | 9 + .../streamconv/converters/nsIndexedToHTML.cpp | 3 +- .../cdp/domains/parent/Security.sys.mjs | 12 +- .../remote/components/Marionette.sys.mjs | 16 +- .../remote/marionette/cert.sys.mjs | 12 +- .../remote/marionette/event.sys.mjs | 5 +- .../remote/marionette/sync.sys.mjs | 6 +- .../shared/RecommendedPreferences.sys.mjs | 21 +- .../listeners/NetworkEventRecord.sys.mjs | 39 +- .../shared/webdriver/Capabilities.sys.mjs | 36 +- .../remote/webdriver-bidi/RemoteValue.sys.mjs | 41 +- .../modules/root/browsingContext.sys.mjs | 224 ++- .../modules/root/network.sys.mjs | 227 ++- .../modules/root/script.sys.mjs | 16 +- .../windowglobal/browsingContext.sys.mjs | 158 ++ firefox-src-part/services/common/rest.sys.mjs | 3 +- .../services/fxaccounts/FxAccounts.sys.mjs | 39 +- .../fxaccounts/FxAccountsClient.sys.mjs | 10 +- .../fxaccounts/FxAccountsCommon.sys.mjs | 1 + .../fxaccounts/FxAccountsConfig.sys.mjs | 35 +- .../fxaccounts/FxAccountsKeys.sys.mjs | 23 +- .../fxaccounts/FxAccountsOAuth.sys.mjs | 10 +- .../fxaccounts/FxAccountsWebChannel.sys.mjs | 136 +- .../services/sync/modules/constants.sys.mjs | 2 +- .../services/sync/modules/engines.sys.mjs | 5 +- .../sync/modules/engines/tabs.sys.mjs | 2 + .../tps/extensions/tps/resource/tps.sys.mjs | 4 +- .../storage/mozIStorageService.idl | 8 +- .../firefox-flatpak/default-preferences.js | 11 - .../scripts/genHPKPStaticPins.js | 3 - .../toolkit/actors/SelectChild.sys.mjs | 16 +- .../toolkit/actors/SelectParent.sys.mjs | 7 + .../aboutwebauthn/content/aboutWebauthn.css | 22 +- .../aboutwebauthn/content/aboutWebauthn.html | 146 +- .../aboutwebauthn/content/aboutWebauthn.js | 401 +++- .../components/alerts/nsIAlertsService.idl | 4 +- .../alerts/nsIWindowsAlertsService.idl | 29 +- .../asyncshutdown/AsyncShutdown.sys.mjs | 7 +- .../defaults/backgroundtasks.js | 2 + .../browser/nsIWebBrowserChrome.idl | 77 +- .../cleardata/ClearDataService.sys.mjs | 15 +- .../contentanalysis/nsIContentAnalysis.idl | 14 +- .../ContextualIdentityService.sys.mjs | 32 + .../crashes/CrashManager.in.sys.mjs | 7 +- .../crashmonitor/CrashMonitor.sys.mjs | 3 +- .../components/downloads/DownloadCore.sys.mjs | 11 +- .../EnterprisePoliciesParent.sys.mjs | 30 +- .../components/extensions/.eslintrc.js | 18 +- .../extensions/ConduitsChild.sys.mjs | 2 +- .../extensions/ConduitsParent.sys.mjs | 38 +- .../components/extensions/Extension.sys.mjs | 99 +- .../extensions/ExtensionActions.sys.mjs | 7 +- .../extensions/ExtensionActivityLog.sys.mjs | 2 +- .../extensions/ExtensionChild.sys.mjs | 30 +- .../ExtensionChildDevToolsUtils.sys.mjs | 3 +- .../extensions/ExtensionCommon.sys.mjs | 118 +- .../extensions/ExtensionContent.sys.mjs | 71 +- .../extensions/ExtensionDNR.sys.mjs | 32 +- .../extensions/ExtensionDNRStore.sys.mjs | 27 +- .../extensions/ExtensionPageChild.sys.mjs | 67 +- .../extensions/ExtensionParent.sys.mjs | 219 +-- .../extensions/ExtensionPermissions.sys.mjs | 4 +- .../ExtensionPreferencesManager.sys.mjs | 2 +- .../ExtensionScriptingStore.sys.mjs | 4 +- .../extensions/ExtensionSettingsStore.sys.mjs | 6 +- .../extensions/ExtensionShortcuts.sys.mjs | 16 +- .../extensions/ExtensionStorage.sys.mjs | 7 +- .../extensions/ExtensionStorageIDB.sys.mjs | 19 +- .../extensions/ExtensionStorageSync.sys.mjs | 2 +- .../ExtensionStorageSyncKinto.sys.mjs | 14 +- .../extensions/ExtensionTelemetry.sys.mjs | 3 +- .../extensions/ExtensionUtils.sys.mjs | 9 +- .../extensions/ExtensionWorkerChild.sys.mjs | 50 +- .../extensions/ExtensionXPCShellUtils.sys.mjs | 54 +- .../components/extensions/FindContent.sys.mjs | 2 + .../extensions/MessageChannel.sys.mjs | 2 + .../extensions/MessageManagerProxy.sys.mjs | 4 +- .../extensions/NativeMessaging.sys.mjs | 37 +- .../components/extensions/Schemas.sys.mjs | 52 +- .../parent/ext-contextualIdentities.js | 41 + .../extensions/parent/ext-downloads.js | 1 + .../components/extensions/parent/ext-proxy.js | 17 + .../extensions/parent/ext-tabs-base.js | 10 +- .../webrequest/SecurityInfo.sys.mjs | 25 +- .../extensions/webrequest/WebRequest.sys.mjs | 1 + .../AutofillProfileAutoComplete.sys.mjs | 7 +- .../components/formautofill/Constants.ios.mjs | 1 + .../formautofill/FormAutofill.sys.mjs | 18 + .../formautofill/FormAutofillChild.sys.mjs | 132 +- .../formautofill/FormAutofillContent.sys.mjs | 2 +- .../formautofill/FormAutofillParent.sys.mjs | 139 +- .../formautofill/FormAutofillSync.sys.mjs | 1 + .../components/formautofill/Helpers.ios.mjs | 3 - .../android/FormAutofillPrompter.sys.mjs | 28 +- .../default/FormAutofillPrompter.sys.mjs | 693 +++---- .../shared/FormAutofillSection.sys.mjs | 27 +- .../shared/FormAutofillUtils.sys.mjs | 1 + .../toolkit/components/glean/xpcom/nsIFOG.idl | 6 +- .../lib/SpecialMessageActions.sys.mjs | 4 + .../RemoteSettingsExperimentLoader.sys.mjs | 14 + .../nimbus/lib/SharedDataMap.sys.mjs | 3 +- .../components/normandy/Normandy.sys.mjs | 5 +- .../actions/BranchedAddonStudyAction.sys.mjs | 5 +- .../components/normandy/lib/Heartbeat.sys.mjs | 76 +- .../normandy/lib/NormandyAddonManager.sys.mjs | 5 +- .../normandy/lib/RecipeRunner.sys.mjs | 3 +- .../normandy/skin/shared/Heartbeat.css | 2 +- .../passwordmgr/LoginCSVImport.sys.mjs | 146 +- .../components/pdfjs/content/build/pdf.mjs | 337 ++-- .../pdfjs/content/build/pdf.scripting.mjs | 4 +- .../pdfjs/content/build/pdf.worker.mjs | 147 +- .../pdfjs/content/web/viewer-geckoview.css | 4 +- .../pdfjs/content/web/viewer-geckoview.mjs | 20 +- .../components/pdfjs/content/web/viewer.css | 16 +- .../components/pdfjs/content/web/viewer.html | 6 +- .../components/pdfjs/content/web/viewer.mjs | 337 ++-- .../components/places/Bookmarks.sys.mjs | 8 +- .../places/PlacesFrecencyRecalculator.sys.mjs | 3 +- .../places/PlacesTransactions.sys.mjs | 6 +- .../components/places/PlacesUtils.sys.mjs | 24 +- .../places/SyncedBookmarksMirror.sys.mjs | 4 +- .../promiseworker/PromiseWorker.sys.mjs | 8 +- .../prompts/content/commonDialog.js | 64 + .../components/reader/AboutReader.sys.mjs | 11 +- .../components/reader/Reader.worker.js | 2 +- .../toolkit/components/reader/Readerable.js | 3 +- .../components/reader/Readerable.sys.mjs | 2 +- .../reader/{ => readability}/JSDOMParser.js | 16 +- .../Readability-readerable.js | 10 +- .../reader/{ => readability}/Readability.js | 78 +- .../FingerprintingWebCompatService.sys.mjs | 2 +- .../satchel/FormAutoComplete.sys.mjs | 2 +- .../search/AppProvidedSearchEngine.sys.mjs | 6 +- .../search/OpenSearchEngine.sys.mjs | 344 +--- .../search/OpenSearchLoader.sys.mjs | 387 ++++ .../components/search/SearchEngine.sys.mjs | 102 +- .../search/SearchEngineSelector.sys.mjs | 182 +- .../components/search/SearchService.sys.mjs | 25 +- .../search/SearchSuggestionController.sys.mjs | 3 +- .../components/search/SearchUtils.sys.mjs | 12 +- .../components/search/nsISearchService.idl | 30 +- .../shopping/content/ShoppingProduct.mjs | 4 + .../taskscheduler/TaskScheduler.sys.mjs | 63 +- .../TaskSchedulerMacOSImpl.sys.mjs | 14 +- .../TaskSchedulerWinImpl.sys.mjs | 48 +- .../nsIWinTaskSchedulerService.idl | 11 + .../terminator/TerminatorTelemetry.sys.mjs | 3 +- .../actors/TranslationsChild.sys.mjs | 33 +- .../actors/TranslationsParent.sys.mjs | 103 +- .../content/translations-document.sys.mjs | 515 ++++- .../content/translations-engine.sys.mjs | 13 +- .../components/generated/RustSuggest.sys.mjs | 35 +- .../components/generated/RustTabs.sys.mjs | 50 +- .../url-classifier/nsIUrlClassifierInfo.idl | 6 +- .../windowcreator/nsIWindowProvider.idl | 8 + .../windowwatcher/nsPIWindowWatcher.idl | 12 + .../components/xulstore/XULStore.sys.mjs | 24 + .../toolkit/content/aboutNetError.html | 250 +++ .../toolkit/content/aboutNetError.xhtml | 127 -- .../content/aboutwebrtc/aboutWebrtc.mjs | 2 - firefox-src-part/toolkit/content/license.html | 2 +- .../toolkit/content/widgets/datetimebox.css | 81 +- .../toolkit/content/widgets/datetimebox.js | 31 +- .../toolkit/content/widgets/findbar.js | 5 +- .../toolkit/content/widgets/infobar.css | 99 + .../toolkit/content/widgets/message-bar.css | 121 +- .../moz-button-group/moz-button-group.css | 2 +- .../moz-message-bar/moz-message-bar.css | 25 +- .../moz-message-bar/moz-message-bar.mjs | 23 +- .../content/widgets/notificationbox.js | 105 +- .../toolkit/content/widgets/panel.js | 1 - firefox-src-part/toolkit/content/xul.css | 6 + .../toolkit/modules/BrowserUtils.sys.mjs | 13 +- .../toolkit/modules/CertUtils.sys.mjs | 13 +- .../toolkit/modules/Console.sys.mjs | 2 - .../toolkit/modules/DeferredTask.sys.mjs | 8 +- .../toolkit/modules/EventEmitter.sys.mjs | 13 +- .../toolkit/modules/GMPInstallManager.sys.mjs | 6 +- .../toolkit/modules/HiddenFrame.sys.mjs | 4 +- .../modules/PopupNotifications.sys.mjs | 4 +- .../toolkit/modules/PromiseUtils.sys.mjs | 71 - .../toolkit/modules/Sqlite.sys.mjs | 5 +- .../BackgroundTask_defaultagent.sys.mjs | 344 +++- .../mozapps/defaultagent/nsIDefaultAgent.idl | 53 + .../mozapps/extensions/AddonManager.sys.mjs | 6 +- .../extensions/content/aboutaddons.css | 1 - .../extensions/content/aboutaddons.html | 6 +- .../internal/AddonRepository.sys.mjs | 54 +- .../internal/AddonUpdateChecker.sys.mjs | 30 +- .../extensions/internal/XPIDatabase.jsm | 2 +- .../extensions/internal/XPIInstall.jsm | 2 +- .../extensions/internal/XPIProvider.jsm | 5 +- .../mozapps/handling/content/appChooser.js | 14 +- .../mozapps/handling/content/handler.css | 4 + .../mozapps/update/BackgroundUpdate.sys.mjs | 35 +- .../mozapps/update/UpdateService.sys.mjs | 20 +- .../nsIWindowsPackageManager.idl | 5 +- .../themes/osx/global/autocomplete.css | 2 + .../toolkit/themes/shared/aboutReader.css | 4 + .../shared/design-system/tokens-shared.css | 4 + .../toolkit/themes/shared/global-shared.css | 14 +- .../shared/in-content/common-shared.css | 2 +- .../themes/shared/media/videocontrols.css | 5 + .../toolkit/themes/shared/popup.css | 20 +- .../uriloader/base/nsITransfer.idl | 2 +- firefox-src-part/widget/nsIFilePicker.idl | 2 +- firefox-src-part/widget/nsIWidget.h | 18 +- firefox-src-part/widget/nsIWinTaskbar.idl | 14 + firefox-src-part/xpcom/base/nsCRTGlue.cpp | 102 - .../xpcom/base/nsIConsoleService.idl | 4 +- .../xpcom/system/nsICrashReporter.idl | 4 +- version.txt | 2 +- 684 files changed, 16704 insertions(+), 13305 deletions(-) create mode 100644 firefox-src-part/browser/components/aboutwelcome/content-src/components/SubmenuButton.jsx delete mode 100644 firefox-src-part/browser/components/firefoxview/firefoxview-next.css delete mode 100644 firefox-src-part/browser/components/firefoxview/firefoxview-next.html delete mode 100644 firefox-src-part/browser/components/firefoxview/firefoxview-next.mjs delete mode 100644 firefox-src-part/browser/components/firefoxview/recently-closed-tabs.mjs delete mode 100644 firefox-src-part/browser/components/firefoxview/tab-pickup-container.mjs delete mode 100644 firefox-src-part/browser/components/firefoxview/tab-pickup-list.mjs create mode 100644 firefox-src-part/browser/components/tabpreview/tabpreview.css create mode 100644 firefox-src-part/browser/components/tabpreview/tabpreview.mjs create mode 100644 firefox-src-part/browser/components/urlbar/private/YelpSuggestions.sys.mjs delete mode 100644 firefox-src-part/browser/extensions/webcompat/injections/css/bug1570328-developer-apple.com-transform-scale.css delete mode 100644 firefox-src-part/browser/extensions/webcompat/injections/css/bug1800000-www.honda.co.uk-choose-dealer-button-fix.css create mode 100644 firefox-src-part/browser/extensions/webcompat/injections/css/bug1868345-tvmovie.de-scroll-fix.css delete mode 100644 firefox-src-part/browser/modules/PingCentre.sys.mjs delete mode 100644 firefox-src-part/devtools/client/debugger/configs/mozilla-central-mappings.js delete mode 100644 firefox-src-part/devtools/client/debugger/src/utils/connect.js delete mode 100644 firefox-src-part/devtools/client/debugger/src/utils/editor/source-editor.js create mode 100644 firefox-src-part/devtools/client/webconsole/components/Output/message-types/JSTracerTrace.js rename firefox-src-part/devtools/server/actors/resources/{tracing-state.js => jstracer-state.js} (77%) create mode 100644 firefox-src-part/devtools/server/actors/resources/jstracer-trace.js delete mode 100644 firefox-src-part/devtools/shared/defer.js delete mode 100644 firefox-src-part/layout/base/nsIFrameTraversal.h delete mode 100644 firefox-src-part/taskcluster/docker/firefox-flatpak/default-preferences.js rename firefox-src-part/toolkit/components/reader/{ => readability}/JSDOMParser.js (99%) rename firefox-src-part/toolkit/components/reader/{ => readability}/Readability-readerable.js (95%) rename firefox-src-part/toolkit/components/reader/{ => readability}/Readability.js (97%) create mode 100644 firefox-src-part/toolkit/components/search/OpenSearchLoader.sys.mjs create mode 100644 firefox-src-part/toolkit/content/aboutNetError.html delete mode 100644 firefox-src-part/toolkit/content/aboutNetError.xhtml create mode 100644 firefox-src-part/toolkit/content/widgets/infobar.css delete mode 100644 firefox-src-part/toolkit/modules/PromiseUtils.sys.mjs diff --git a/firefox-src-part/browser/actors/ContentSearchParent.sys.mjs b/firefox-src-part/browser/actors/ContentSearchParent.sys.mjs index dd12ceaf4..7c1a39536 100644 --- a/firefox-src-part/browser/actors/ContentSearchParent.sys.mjs +++ b/firefox-src-part/browser/actors/ContentSearchParent.sys.mjs @@ -251,7 +251,6 @@ export let ContentSearch = { data.healthReportKey, { selection: data.selection, - url: submission.uri, } ); }, @@ -557,7 +556,7 @@ export let ContentSearch = { * Converts the engine's icon into an appropriate URL for display at */ async _getEngineIconURL(engine) { - let url = engine.getIconURLBySize(16, 16); + let url = engine.getIconURL(); if (!url) { return SEARCH_ENGINE_PLACEHOLDER_ICON; } diff --git a/firefox-src-part/browser/actors/LinkHandlerParent.sys.mjs b/firefox-src-part/browser/actors/LinkHandlerParent.sys.mjs index b720fddb3..5610c7122 100644 --- a/firefox-src-part/browser/actors/LinkHandlerParent.sys.mjs +++ b/firefox-src-part/browser/actors/LinkHandlerParent.sys.mjs @@ -105,7 +105,15 @@ export class LinkHandlerParent extends JSWindowActorParent { setIconFromLink( gBrowser, browser, - { pageURL, originalURL, canUseForTab, expiration, iconURL, canStoreIcon } + { + pageURL, + originalURL, + canUseForTab, + expiration, + iconURL, + canStoreIcon, + beforePageShow, + } ) { let tab = gBrowser.getTabForBrowser(browser); if (!tab) { @@ -150,7 +158,7 @@ export class LinkHandlerParent extends JSWindowActorParent { } if (canUseForTab) { - gBrowser.setIcon(tab, iconURL, originalURL); + gBrowser.setIcon(tab, iconURL, originalURL, null, beforePageShow); } } } diff --git a/firefox-src-part/browser/actors/PluginParent.sys.mjs b/firefox-src-part/browser/actors/PluginParent.sys.mjs index ba4b82fa3..fa93c1d5a 100644 --- a/firefox-src-part/browser/actors/PluginParent.sys.mjs +++ b/firefox-src-part/browser/actors/PluginParent.sys.mjs @@ -178,11 +178,20 @@ export class PluginParent extends JSWindowActorParent { buttons.push(submitButton); } + // Add the "learn more" link. + let learnMoreLink = { + supportPage: "plugin-crashed-notificationbar", + label: lazy.gNavigatorBundle.GetStringFromName( + "crashedpluginsMessage.learnMore" + ), + }; + buttons.push(learnMoreLink); + let messageString = lazy.gNavigatorBundle.formatStringFromName( "crashedpluginsMessage.title", [report.pluginName] ); - notification = notificationBox.appendNotification( + notificationBox.appendNotification( "plugin-crashed", { label: messageString, @@ -191,21 +200,5 @@ export class PluginParent extends JSWindowActorParent { }, buttons ); - - // Add the "learn more" link. - let link = notification.ownerDocument.createXULElement("label", { - is: "text-link", - }); - link.setAttribute( - "value", - lazy.gNavigatorBundle.GetStringFromName("crashedpluginsMessage.learnMore") - ); - let crashurl = Services.urlFormatter.formatURLPref("app.support.baseURL"); - crashurl += "plugin-crashed-notificationbar"; - link.href = crashurl; - // Append a blank text node to make sure we don't put - // the link right next to the end of the message text. - notification.messageText.appendChild(new Text(" ")); - notification.messageText.appendChild(link); } } diff --git a/firefox-src-part/browser/actors/PromptParent.sys.mjs b/firefox-src-part/browser/actors/PromptParent.sys.mjs index 2e1b3e162..f98edc5b5 100644 --- a/firefox-src-part/browser/actors/PromptParent.sys.mjs +++ b/firefox-src-part/browser/actors/PromptParent.sys.mjs @@ -301,6 +301,7 @@ export class PromptParent extends JSWindowActorParent { args.promptAborted = false; args.openedWithTabDialog = true; + args.owningBrowsingContext = this.browsingContext; // Convert args object to a prop bag for the dialog to consume. let bag; diff --git a/firefox-src-part/browser/actors/ScreenshotsComponentChild.sys.mjs b/firefox-src-part/browser/actors/ScreenshotsComponentChild.sys.mjs index e8935356e..0a4d6d253 100644 --- a/firefox-src-part/browser/actors/ScreenshotsComponentChild.sys.mjs +++ b/firefox-src-part/browser/actors/ScreenshotsComponentChild.sys.mjs @@ -15,6 +15,15 @@ export class ScreenshotsComponentChild extends JSWindowActorChild { #scrollTask; #overlay; + static OVERLAY_EVENTS = [ + "click", + "pointerdown", + "pointermove", + "pointerup", + "keyup", + "keydown", + ]; + get overlay() { return this.#overlay; } @@ -41,10 +50,16 @@ export class ScreenshotsComponentChild extends JSWindowActorChild { handleEvent(event) { switch (event.type) { + case "click": + case "pointerdown": + case "pointermove": + case "pointerup": + case "keyup": case "keydown": - if (event.key === "Escape") { - this.requestCancelScreenshot("escape"); + if (!this.overlay?.initialized) { + return; } + this.overlay.handleEvent(event); break; case "beforeunload": this.requestCancelScreenshot("navigation"); @@ -191,6 +206,13 @@ export class ScreenshotsComponentChild extends JSWindowActorChild { }); } + addOverlayEventListeners() { + let chromeEventHandler = this.docShell.chromeEventHandler; + for (let event of ScreenshotsComponentChild.OVERLAY_EVENTS) { + chromeEventHandler.addEventListener(event, this, true); + } + } + /** * Wait until the document is ready and then show the screenshots overlay * @@ -208,24 +230,33 @@ export class ScreenshotsComponentChild extends JSWindowActorChild { let overlay = this.overlay || (this.#overlay = new lazy.ScreenshotsOverlay(this.document)); - this.document.addEventListener("keydown", this); this.document.ownerGlobal.addEventListener("beforeunload", this); this.contentWindow.addEventListener("resize", this); this.contentWindow.addEventListener("scroll", this); this.contentWindow.addEventListener("visibilitychange", this); + this.addOverlayEventListeners(); + overlay.initialize(); return true; } + removeOverlayEventListeners() { + let chromeEventHandler = this.docShell.chromeEventHandler; + for (let event of ScreenshotsComponentChild.OVERLAY_EVENTS) { + chromeEventHandler.removeEventListener(event, this, true); + } + } + /** * Removes event listeners and the screenshots overlay. */ endScreenshotsOverlay(options = {}) { - this.document.removeEventListener("keydown", this); this.document.ownerGlobal.removeEventListener("beforeunload", this); this.contentWindow.removeEventListener("resize", this); this.contentWindow.removeEventListener("scroll", this); this.contentWindow.removeEventListener("visibilitychange", this); + this.removeOverlayEventListeners(); + this.overlay?.tearDown(options); this.#resizeTask?.disarm(); this.#scrollTask?.disarm(); diff --git a/firefox-src-part/browser/app/profile/firefox.js b/firefox-src-part/browser/app/profile/firefox.js index ee839b8c7..1580d8772 100644 --- a/firefox-src-part/browser/app/profile/firefox.js +++ b/firefox-src-part/browser/app/profile/firefox.js @@ -641,6 +641,10 @@ pref("browser.urlbar.suggest.addons", true); // mdn suggestions are turned on. pref("browser.urlbar.suggest.mdn", true); +// If `browser.urlbar.yelp.featureGate` is true, this controls whether +// Yelp suggestions are turned on. +pref("browser.urlbar.suggest.yelp", true); + // The minimum prefix length of addons keyword the user must type to trigger // the suggestion. 0 means the min length should be taken from Nimbus. pref("browser.urlbar.addons.minKeywordLength", 0); @@ -710,9 +714,6 @@ pref("browser.download.clearHistoryOnDelete", 0); pref("browser.helperApps.showOpenOptionForPdfJS", true); pref("browser.helperApps.showOpenOptionForViewableInternally", true); -// search engine removal URL -pref("browser.search.searchEngineRemoval", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/search-engine-removal"); - // search engines URL pref("browser.search.searchEnginesURL", "https://addons.mozilla.org/%LOCALE%/firefox/search-engines/"); @@ -781,6 +782,14 @@ pref("browser.shopping.experience2023.survey.hasSeen", false); // Number of PDP visits used to display shopping survey pref("browser.shopping.experience2023.survey.pdpVisits", 0); +// Enables the auto-open feature for the shopping sidebar, +// including new callouts and settings UI changes +// (this is just the feature flag). +pref("browser.shopping.experience2023.autoOpen.enabled", true); + +// Opens the shopping sidebar automatically when viewing a PDP. +pref("browser.shopping.experience2023.autoOpen.userEnabled", true); + // Enables the display of the Mozilla VPN banner in private browsing windows pref("browser.privatebrowsing.vpnpromourl", "https://vpn.mozilla.org/?utm_source=firefox-browser&utm_medium=firefox-%CHANNEL%-browser&utm_campaign=private-browsing-vpn-link"); @@ -907,6 +916,10 @@ pref("browser.tabs.tooltipsShowPidAndActiveness", true); pref("browser.tabs.tooltipsShowPidAndActiveness", false); #endif +pref("browser.tabs.cardPreview.enabled", false); +pref("browser.tabs.cardPreview.delayMs", 1000); +pref("browser.tabs.cardPreview.showThumbnails", true); + pref("browser.tabs.firefox-view", true); pref("browser.tabs.firefox-view-next", true); pref("browser.tabs.firefox-view-newIcon", true); @@ -1017,6 +1030,11 @@ pref("privacy.clearOnShutdown.sessions", true); pref("privacy.clearOnShutdown.offlineApps", false); pref("privacy.clearOnShutdown.siteSettings", false); pref("privacy.clearOnShutdown.openWindows", false); +// Clear on shutdown prefs used in the new dialog +pref("privacy.clearOnShutdown_v2.historyFormDataAndDownloads", true); +pref("privacy.clearOnShutdown_v2.cookiesAndStorage", true); +pref("privacy.clearOnShutdown_v2.cache", true); +pref("privacy.clearOnShutdown_v2.siteSettings", false); pref("privacy.cpd.history", true); pref("privacy.cpd.formdata", true); @@ -1041,6 +1059,8 @@ pref("privacy.history.custom", false); // 6 - Last 24 hours pref("privacy.sanitize.timeSpan", 1); +pref("privacy.sanitize.useOldClearHistoryDialog", true); + pref("privacy.panicButton.enabled", true); // Time until temporary permissions expire, in ms @@ -1318,10 +1338,6 @@ pref("places.frecency.origins.alternative.featureGate", false); // selects "Forget About This Site". pref("places.forgetThisSite.clearByBaseDomain", true); -#ifdef NIGHTLY_BUILD -pref("places.experimental.useSingleQueueTransactionManager", true); -#endif - // Whether to warm up network connections for places: menus and places: toolbar. pref("browser.places.speculativeConnect.enabled", true); @@ -1560,13 +1576,18 @@ pref("services.sync.prefs.sync.permissions.default.image", true); pref("services.sync.prefs.sync.pref.downloads.disable_button.edit_actions", true); pref("services.sync.prefs.sync.pref.privacy.disable_button.cookie_exceptions", true); pref("services.sync.prefs.sync.privacy.clearOnShutdown.cache", true); +pref("services.sync.prefs.sync.privacy.clearOnShutdown_v2.cache", true); pref("services.sync.prefs.sync.privacy.clearOnShutdown.cookies", true); +pref("services.sync.prefs.sync.privacy.clearOnShutdown_v2.cookiesAndStorage", true); pref("services.sync.prefs.sync.privacy.clearOnShutdown.downloads", true); +pref("services.sync.prefs.sync.privacy.clearOnShutdown_v2.downloads", true); pref("services.sync.prefs.sync.privacy.clearOnShutdown.formdata", true); pref("services.sync.prefs.sync.privacy.clearOnShutdown.history", true); +pref("services.sync.prefs.sync.privacy.clearOnShutdown_v2.historyFormDataAndDownloads", true); pref("services.sync.prefs.sync.privacy.clearOnShutdown.offlineApps", true); pref("services.sync.prefs.sync.privacy.clearOnShutdown.sessions", true); pref("services.sync.prefs.sync.privacy.clearOnShutdown.siteSettings", true); +pref("services.sync.prefs.sync.privacy.clearOnShutdown_v2.siteSettings", true); pref("services.sync.prefs.sync.privacy.donottrackheader.enabled", true); pref("services.sync.prefs.sync.privacy.globalprivacycontrol.enabled", true); pref("services.sync.prefs.sync.privacy.sanitize.sanitizeOnShutdown", true); @@ -1840,6 +1861,9 @@ pref("identity.fxaccounts.remote.root", "https://accounts.firefox.com/"); // The value of the context query parameter passed in fxa requests. pref("identity.fxaccounts.contextParam", "fx_desktop_v3"); +// Whether to use the oauth flow for desktop or not +pref("identity.fxaccounts.oauth.enabled", false); + // The remote URL of the FxA Profile Server pref("identity.fxaccounts.remote.profile.uri", "https://profile.accounts.firefox.com/v1"); @@ -1948,10 +1972,6 @@ pref("toolkit.telemetry.updatePing.enabled", true); // Enables sending 'bhr' pings when the browser hangs. pref("toolkit.telemetry.bhrPing.enabled", true); -// Ping Centre Telemetry settings. -pref("browser.ping-centre.telemetry", true); -pref("browser.ping-centre.log", false); - // Enable GMP support in the addon manager. pref("media.gmp-provider.enabled", true); @@ -2071,8 +2091,7 @@ pref("browser.contentblocking.report.show_mobile_app", true); pref("browser.send_to_device_locales", "de,en-GB,en-US,es-AR,es-CL,es-ES,es-MX,fr,id,pl,pt-BR,ru,zh-TW"); // Avoid advertising in certain regions. Comma separated string of two letter ISO 3166-1 country codes. -// We're currently blocking all of Ukraine (ua), but would prefer to block just Crimea (ua-43). Currently, the Mozilla Location Service APIs used by Region.sys.mjs only exposes the country, not the subdivision. -pref("browser.vpn_promo.disallowed_regions", "ae,by,cn,cu,iq,ir,kp,om,ru,sd,sy,tm,tr,ua"); +pref("browser.vpn_promo.disallowed_regions", "ae,by,cn,cu,iq,ir,kp,om,ru,sd,sy,tm,tr"); // Default to enabling VPN promo messages to be shown when specified and allowed pref("browser.vpn_promo.enabled", true); @@ -2356,6 +2375,9 @@ pref("extensions.screenshots.disabled", false); // Preference that determines whether Screenshots is opened as a dedicated browser component pref("screenshots.browser.component.enabled", false); +// Preference that determines what button to focus +pref("screenshots.browser.component.last-saved-method", "download"); + // DoH Rollout: whether to clear the mode value at shutdown. pref("doh-rollout.clearModeOnShutdown", false); @@ -2444,7 +2466,7 @@ pref("browser.toolbars.bookmarks.showInPrivateBrowsing", false); // quick access to sign-in and manage your Firefox Account. pref("identity.fxaccounts.toolbar.enabled", true); pref("identity.fxaccounts.toolbar.accessed", false); -pref("identity.fxaccounts.toolbar.defaultVisible", false); +pref("identity.fxaccounts.toolbar.defaultVisible", true); pref("identity.fxaccounts.toolbar.pxiToolbarEnabled", false); // Check bundled omni JARs for corruption. @@ -2870,9 +2892,9 @@ pref("browser.firefox-view.view-count", 0); // Maximum number of rows to show on the "History" page. pref("browser.firefox-view.max-history-rows", 300); // Enables search functionality in Firefox View. -pref("browser.firefox-view.search.enabled", false); +pref("browser.firefox-view.search.enabled", true); // Enables virtual list functionality in Firefox View. -pref("browser.firefox-view.virtual-list.enabled", false); +pref("browser.firefox-view.virtual-list.enabled", true); // If the user has seen the pdf.js feature tour this value reflects the tour // message id, the id of the last screen they saw, and whether they completed the tour @@ -2891,6 +2913,9 @@ pref("browser.pdfjs.feature-tour", "{\"screen\":\"\",\"complete\":false}"); pref("cookiebanners.ui.desktop.enabled", false); #endif +// When true, shows a one-time feature callout for cookie banner blocking. +pref("cookiebanners.ui.desktop.showCallout", false); + // Controls which variant of the cookie banner CFR the user is presented with. pref("cookiebanners.ui.desktop.cfrVariant", 0); @@ -2951,11 +2976,6 @@ pref("ui.new-webcompat-reporter.reason-dropdown", 0); // performing the clear action. pref("browser.privatebrowsing.resetPBM.showConfirmationDialog", true); -// bug 1858545: Temporary pref to enable a staged rollout of macOS attribution Telemetry -#ifdef XP_MACOSX - pref("browser.attribution.macos.enabled", false); -#endif - // the preferences related to the Nimbus experiment, to activate and deactivate // the the entire rollout or deactivate only the OS prompt (see: bug 1864216) pref("browser.mailto.dualPrompt", false); diff --git a/firefox-src-part/browser/base/content/appmenu-viewcache.inc.xhtml b/firefox-src-part/browser/base/content/appmenu-viewcache.inc.xhtml index 8c37c4ab8..171758cc3 100644 --- a/firefox-src-part/browser/base/content/appmenu-viewcache.inc.xhtml +++ b/firefox-src-part/browser/base/content/appmenu-viewcache.inc.xhtml @@ -260,7 +260,9 @@ /> - + @@ -718,7 +720,7 @@ - + diff --git a/firefox-src-part/browser/base/content/browser-captivePortal.js b/firefox-src-part/browser/base/content/browser-captivePortal.js index 23957124d..6136e3fdd 100644 --- a/firefox-src-part/browser/base/content/browser-captivePortal.js +++ b/firefox-src-part/browser/base/content/browser-captivePortal.js @@ -264,12 +264,15 @@ var CaptivePortalWatcher = { } }, - handleEvent(aEvent) { + async handleEvent(aEvent) { switch (aEvent.type) { case "activate": this._delayedCaptivePortalDetected(); break; case "TabSelect": + if (this._notificationPromise) { + await this._notificationPromise; + } if (!this._captivePortalTab || !this._captivePortalNotification) { break; } @@ -323,7 +326,7 @@ var CaptivePortalWatcher = { gBrowser.tabContainer.removeEventListener("TabSelect", this); }; - gNotificationBox.appendNotification( + this._notificationPromise = gNotificationBox.appendNotification( this.PORTAL_NOTIFICATION_VALUE, { label: message, diff --git a/firefox-src-part/browser/base/content/browser-data-submission-info-bar.js b/firefox-src-part/browser/base/content/browser-data-submission-info-bar.js index 896542796..26d9affb2 100644 --- a/firefox-src-part/browser/base/content/browser-data-submission-info-bar.js +++ b/firefox-src-part/browser/base/content/browser-data-submission-info-bar.js @@ -40,7 +40,7 @@ var gDataNotificationInfoBar = { return gNotificationBox.getNotificationWithValue(name); }, - _displayDataPolicyInfoBar(request) { + async _displayDataPolicyInfoBar(request) { if (this._getDataReportingNotification()) { return; } @@ -59,7 +59,7 @@ var gDataNotificationInfoBar = { ]; this._log.info("Creating data reporting policy notification."); - gNotificationBox.appendNotification( + await gNotificationBox.appendNotification( this._DATA_REPORTING_NOTIFICATION, { label: { diff --git a/firefox-src-part/browser/base/content/browser-fullScreenAndPointerLock.js b/firefox-src-part/browser/base/content/browser-fullScreenAndPointerLock.js index b115b04eb..a0102728f 100644 --- a/firefox-src-part/browser/base/content/browser-fullScreenAndPointerLock.js +++ b/firefox-src-part/browser/base/content/browser-fullScreenAndPointerLock.js @@ -255,6 +255,9 @@ var PointerlockFsWarning = { if (this._state == "hiding") { this._element.hidden = true; } + if (this._state == "onscreen") { + window.dispatchEvent(new CustomEvent("FullscreenWarningOnScreen")); + } break; } case "activate": { diff --git a/firefox-src-part/browser/base/content/browser-sidebar.js b/firefox-src-part/browser/base/content/browser-sidebar.js index fe1565f1a..ea6457a5c 100644 --- a/firefox-src-part/browser/base/content/browser-sidebar.js +++ b/firefox-src-part/browser/base/content/browser-sidebar.js @@ -88,7 +88,7 @@ var SidebarUI = { */ _observer: null, - _initDeferred: PromiseUtils.defer(), + _initDeferred: Promise.withResolvers(), get promiseInitialized() { return this._initDeferred.promise; diff --git a/firefox-src-part/browser/base/content/browser-siteIdentity.js b/firefox-src-part/browser/base/content/browser-siteIdentity.js index dd045561e..a2a5f6ff7 100644 --- a/firefox-src-part/browser/base/content/browser-siteIdentity.js +++ b/firefox-src-part/browser/base/content/browser-siteIdentity.js @@ -508,15 +508,16 @@ var gIdentityHandler = { * -1 indicates a incompatible scheme on the current URI. */ _getHttpsOnlyPermission() { - if ( - !gBrowser.currentURI.schemeIs("http") && - !gBrowser.currentURI.schemeIs("https") - ) { + let uri = gBrowser.currentURI; + if (uri instanceof Ci.nsINestedURI) { + uri = uri.QueryInterface(Ci.nsINestedURI).innermostURI; + } + if (!uri.schemeIs("http") && !uri.schemeIs("https")) { return -1; } - const httpURI = gBrowser.currentURI.mutate().setScheme("http").finalize(); + uri = uri.mutate().setScheme("http").finalize(); const principal = Services.scriptSecurityManager.createContentPrincipal( - httpURI, + uri, gBrowser.contentPrincipal.originAttributes ); const { state } = SitePermissions.getForPrincipal( @@ -561,7 +562,11 @@ var gIdentityHandler = { // We always want to set the exception for the HTTP version of the current URI, // since when we check wether we should upgrade a request, we are checking permissons // for the HTTP principal (Bug 1757297). - const newURI = gBrowser.currentURI.mutate().setScheme("http").finalize(); + let newURI = gBrowser.currentURI; + if (newURI instanceof Ci.nsINestedURI) { + newURI = newURI.QueryInterface(Ci.nsINestedURI).innermostURI; + } + newURI = newURI.mutate().setScheme("http").finalize(); const principal = Services.scriptSecurityManager.createContentPrincipal( newURI, gBrowser.contentPrincipal.originAttributes @@ -787,13 +792,7 @@ var gIdentityHandler = { * built-in (returns false) or imported (returns true). */ _hasCustomRoot() { - let issuerCert = null; - issuerCert = - this._secInfo.succeededCertChain[ - this._secInfo.succeededCertChain.length - 1 - ]; - - return !issuerCert.isBuiltInRoot; + return !this._secInfo.isBuiltCertChainRootBuiltInRoot; }, /** @@ -1178,8 +1177,8 @@ var gIdentityHandler = { }, setURI(uri) { - if (uri.schemeIs("view-source")) { - uri = Services.io.newURI(uri.spec.replace(/^view-source:/i, "")); + if (uri instanceof Ci.nsINestedURI) { + uri = uri.QueryInterface(Ci.nsINestedURI).innermostURI; } this._uri = uri; @@ -1190,7 +1189,7 @@ var gIdentityHandler = { this._uriHasHost = false; } - if (uri.schemeIs("about")) { + if (uri.schemeIs("about") || uri.schemeIs("moz-safe-about")) { let module = E10SUtils.getAboutModule(uri); if (module) { let flags = module.getURIFlags(uri); @@ -1202,24 +1201,7 @@ var gIdentityHandler = { this._isSecureInternalUI = false; } this._pageExtensionPolicy = WebExtensionPolicy.getByURI(uri); - - // Create a channel for the sole purpose of getting the resolved URI - // of the request to determine if it's loaded from the file system. - this._isURILoadedFromFile = false; - let chanOptions = { uri: this._uri, loadUsingSystemPrincipal: true }; - let resolvedURI; - try { - resolvedURI = NetUtil.newChannel(chanOptions).URI; - if (resolvedURI.schemeIs("jar")) { - // Given a URI "jar:!/" - // create a new URI using !/ - resolvedURI = NetUtil.newURI(resolvedURI.pathQueryRef); - } - // Check the URI again after resolving. - this._isURILoadedFromFile = resolvedURI.schemeIs("file"); - } catch (ex) { - // NetUtil's methods will throw for malformed URIs and the like - } + this._isURILoadedFromFile = uri.schemeIs("file"); }, /** diff --git a/firefox-src-part/browser/base/content/browser-siteProtections.js b/firefox-src-part/browser/base/content/browser-siteProtections.js index 83de8791a..516c7cc0e 100644 --- a/firefox-src-part/browser/base/content/browser-siteProtections.js +++ b/firefox-src-part/browser/base/content/browser-siteProtections.js @@ -7,10 +7,8 @@ ChromeUtils.defineESModuleGetters(this, { ContentBlockingAllowList: "resource://gre/modules/ContentBlockingAllowList.sys.mjs", -}); - -XPCOMUtils.defineLazyModuleGetters(this, { - ToolbarPanelHub: "resource://activity-stream/lib/ToolbarPanelHub.jsm", + SpecialMessageActions: + "resource://messaging-system/lib/SpecialMessageActions.sys.mjs", }); XPCOMUtils.defineLazyServiceGetter( @@ -1657,6 +1655,13 @@ var gProtectionsHandler = { () => this.maybeSetMilestoneCounterText() ); + XPCOMUtils.defineLazyPreferenceGetter( + this, + "protectionsPanelMessageSeen", + "browser.protections_panel.infoMessage.seen", + false + ); + for (let blocker of Object.values(this.blockers)) { if (blocker.init) { blocker.init(); @@ -1813,7 +1818,7 @@ var gProtectionsHandler = { // Insert the info message if needed. This will be shown once and then // remain collapsed. - ToolbarPanelHub.insertProtectionPanelMessage(event); + this._insertProtectionsPanelInfoMessage(event); if (!event.target.hasAttribute("toast")) { Services.telemetry.recordEvent( @@ -2693,4 +2698,188 @@ var gProtectionsHandler = { this._earliestRecordedDate = date; } }, + + _sendUserEventTelemetry(event, value = null, options = {}) { + // Only send telemetry for non private browsing windows + if (!PrivateBrowsingUtils.isWindowPrivate(window)) { + Services.telemetry.recordEvent( + "security.ui.protectionspopup", + event, + "protectionspopup_cfr", + value, + options + ); + } + }, + + /** + * Dispatch the action defined in the message and user telemetry event. + */ + _dispatchUserAction(message) { + let url; + try { + // Set platform specific path variables for SUMO articles + url = Services.urlFormatter.formatURL(message.content.cta_url); + } catch (e) { + console.error(e); + url = message.content.cta_url; + } + SpecialMessageActions.handleAction( + { + type: message.content.cta_type, + data: { + args: url, + where: message.content.cta_where || "tabshifted", + }, + }, + window.browser + ); + + this._sendUserEventTelemetry("click", "learn_more_link", { + message: message.id, + }); + }, + + /** + * Attach event listener to dispatch message defined action. + */ + _attachCommandListener(element, message) { + // Add event listener for `mouseup` not to overlap with the + // `mousedown` & `click` events dispatched from PanelMultiView.sys.mjs + // https://searchfox.org/mozilla-central/rev/7531325c8660cfa61bf71725f83501028178cbb9/browser/components/customizableui/PanelMultiView.jsm#1830-1837 + element.addEventListener("mouseup", () => { + this._dispatchUserAction(message); + }); + element.addEventListener("keyup", e => { + if (e.key === "Enter" || e.key === " ") { + this._dispatchUserAction(message); + } + }); + }, + + /** + * Inserts a message into the Protections Panel. The message is visible once + * and afterwards set in a collapsed state. It can be shown again using the + * info button in the panel header. + */ + _insertProtectionsPanelInfoMessage(event) { + // const PROTECTIONS_PANEL_INFOMSG_PREF = + // "browser.protections_panel.infoMessage.seen"; + const message = { + id: "PROTECTIONS_PANEL_1", + content: { + title: { string_id: "cfr-protections-panel-header" }, + body: { string_id: "cfr-protections-panel-body" }, + link_text: { string_id: "cfr-protections-panel-link-text" }, + cta_url: `${Services.urlFormatter.formatURLPref( + "app.support.baseURL" + )}etp-promotions?as=u&utm_source=inproduct`, + cta_type: "OPEN_URL", + }, + }; + + const doc = event.target.ownerDocument; + const container = doc.getElementById("messaging-system-message-container"); + const infoButton = doc.getElementById("protections-popup-info-button"); + const panelContainer = doc.getElementById("protections-popup"); + const toggleMessage = () => { + const learnMoreLink = doc.querySelector( + "#messaging-system-message-container .text-link" + ); + if (learnMoreLink) { + container.toggleAttribute("disabled"); + infoButton.toggleAttribute("checked"); + panelContainer.toggleAttribute("infoMessageShowing"); + learnMoreLink.disabled = !learnMoreLink.disabled; + } + // If the message panel is opened, send impression telemetry + if (panelContainer.hasAttribute("infoMessageShowing")) { + this._sendUserEventTelemetry("open", "impression", { + message: message.id, + }); + } + }; + if (!container.childElementCount) { + const messageEl = this._createHeroElement(doc, message); + container.appendChild(messageEl); + infoButton.addEventListener("click", toggleMessage); + } + // Message is collapsed by default. If it was never shown before we want + // to expand it + if ( + !this.protectionsPanelMessageSeen && + container.hasAttribute("disabled") + ) { + toggleMessage(message); + } + // Save state that we displayed the message + if (!this.protectionsPanelMessageSeen) { + Services.prefs.setBoolPref( + "browser.protections_panel.infoMessage.seen", + true + ); + } + // Collapse the message after the panel is hidden so we don't get the + // animation when opening the panel + panelContainer.addEventListener( + "popuphidden", + () => { + if ( + this.protectionsPanelMessageSeen && + !container.hasAttribute("disabled") + ) { + toggleMessage(message); + } + }, + { + once: true, + } + ); + }, + + _createElement(doc, elem, options = {}) { + const node = doc.createElementNS("http://www.w3.org/1999/xhtml", elem); + if (options.classList) { + node.classList.add(options.classList); + } + if (options.content) { + doc.l10n.setAttributes(node, options.content.string_id); + } + return node; + }, + + _createHeroElement(doc, message) { + const messageEl = this._createElement(doc, "div"); + messageEl.setAttribute("id", "protections-popup-message"); + messageEl.classList.add("whatsNew-hero-message"); + const wrapperEl = this._createElement(doc, "div"); + wrapperEl.classList.add("whatsNew-message-body"); + messageEl.appendChild(wrapperEl); + + wrapperEl.appendChild( + this._createElement(doc, "h2", { + classList: "whatsNew-message-title", + content: message.content.title, + }) + ); + + wrapperEl.appendChild( + this._createElement(doc, "p", { content: message.content.body }) + ); + + if (message.content.link_text) { + let linkEl = this._createElement(doc, "a", { + classList: "text-link", + content: message.content.link_text, + }); + + linkEl.disabled = true; + wrapperEl.appendChild(linkEl); + this._attachCommandListener(linkEl, message); + } else { + this._attachCommandListener(wrapperEl, message); + } + + return messageEl; + }, }; diff --git a/firefox-src-part/browser/base/content/browser-toolbarKeyNav.js b/firefox-src-part/browser/base/content/browser-toolbarKeyNav.js index 1cf66aed9..caa01100c 100644 --- a/firefox-src-part/browser/base/content/browser-toolbarKeyNav.js +++ b/firefox-src-part/browser/base/content/browser-toolbarKeyNav.js @@ -36,6 +36,9 @@ ToolbarKeyboardNavigator = { kSearchClearTimeout: 1000, _isButton(aElem) { + if (aElem.getAttribute("keyNav") === "false") { + return false; + } return ( aElem.tagName == "toolbarbutton" || aElem.getAttribute("role") == "button" ); diff --git a/firefox-src-part/browser/base/content/browser.css b/firefox-src-part/browser/base/content/browser.css index bf8e3856c..8a2a20280 100644 --- a/firefox-src-part/browser/base/content/browser.css +++ b/firefox-src-part/browser/base/content/browser.css @@ -1311,6 +1311,13 @@ printpreview-pagination:focus-within, } } +/* Screenshots */ +#screenshotsPagePanel { + position: relative; + max-height: 0; +} + + #sidebar-box { min-width: 14em; max-width: 36em; diff --git a/firefox-src-part/browser/base/content/browser.js b/firefox-src-part/browser/base/content/browser.js index 022c45898..4daaa140a 100644 --- a/firefox-src-part/browser/base/content/browser.js +++ b/firefox-src-part/browser/base/content/browser.js @@ -41,7 +41,6 @@ ChromeUtils.defineESModuleGetters(this, { isProductURL: "chrome://global/content/shopping/ShoppingProduct.mjs", LightweightThemeConsumer: "resource://gre/modules/LightweightThemeConsumer.sys.mjs", - Log: "resource://gre/modules/Log.sys.mjs", LoginHelper: "resource://gre/modules/LoginHelper.sys.mjs", LoginManagerParent: "resource://gre/modules/LoginManagerParent.sys.mjs", MigrationUtils: "resource:///modules/MigrationUtils.sys.mjs", @@ -61,7 +60,6 @@ ChromeUtils.defineESModuleGetters(this, { Pocket: "chrome://pocket/content/Pocket.sys.mjs", PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs", ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.sys.mjs", - PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs", PromptUtils: "resource://gre/modules/PromptUtils.sys.mjs", ReaderMode: "resource://gre/modules/ReaderMode.sys.mjs", ResetPBMPanel: "resource:///modules/ResetPBMPanel.sys.mjs", @@ -719,7 +717,6 @@ var gInitialPages = [ "about:blank", "about:home", "about:firefoxview", - "about:firefoxview-next", "about:newtab", "about:privatebrowsing", "about:sessionrestore", @@ -1109,7 +1106,7 @@ const gStoragePressureObserver = { } messageFragment.appendChild(message); - gNotificationBox.appendNotification( + await gNotificationBox.appendNotification( NOTIFICATION_VALUE, { label: messageFragment, @@ -1125,7 +1122,7 @@ const gStoragePressureObserver = { }; var gPopupBlockerObserver = { - handleEvent(aEvent) { + async handleEvent(aEvent) { if (aEvent.originalTarget != gBrowser.selectedBrowser) { return; } @@ -1161,23 +1158,31 @@ var gPopupBlockerObserver = { let notificationBox = gBrowser.getNotificationBox(); let notification = - notificationBox.getNotificationWithValue("popup-blocked"); + notificationBox.getNotificationWithValue("popup-blocked") || + (await this.notificationPromise); if (notification) { notification.label = label; } else { const image = "chrome://browser/skin/notification-icons/popup.svg"; const priority = notificationBox.PRIORITY_INFO_MEDIUM; - notificationBox.appendNotification( - "popup-blocked", - { label, image, priority }, - [ - { - "l10n-id": "popup-warning-button", - popup: "blockedPopupOptions", - callback: null, - }, - ] - ); + try { + this.notificationPromise = notificationBox.appendNotification( + "popup-blocked", + { label, image, priority }, + [ + { + "l10n-id": "popup-warning-button", + popup: "blockedPopupOptions", + callback: null, + }, + ] + ); + await this.notificationPromise; + } catch (err) { + console.warn(err); + } finally { + this.notificationPromise = null; + } } } @@ -1405,7 +1410,7 @@ var gKeywordURIFixup = { let asciiHost = fixedURI.asciiHost; let onLookupCompleteListener = { - onLookupComplete(request, record, status) { + async onLookupComplete(request, record, status) { let browserRef = weakBrowser.get(); if (!Components.isSuccessCode(status) || !browserRef) { return; @@ -1460,7 +1465,7 @@ var gKeywordURIFixup = { }, }, ]; - let notification = notificationBox.appendNotification( + let notification = await notificationBox.appendNotification( "keyword-uri-fixup", { label: message, @@ -1950,10 +1955,7 @@ var gBrowserInit = { } FullScreen.init(); - - if (AppConstants.platform == "win") { - MenuTouchModeObserver.init(); - } + MenuTouchModeObserver.init(); if (AppConstants.MOZ_DATA_REPORTING) { gDataNotificationInfoBar.init(); @@ -2331,6 +2333,13 @@ var gBrowserInit = { readSetting(); }); + scheduleIdleTask(() => { + // load the tab preview component + import("chrome://browser/content/tabpreview/tabpreview.mjs").catch( + console.error + ); + }); + scheduleIdleTask(() => { // setup simple gestures support gGestureSupport.init(true); @@ -2560,9 +2569,7 @@ var gBrowserInit = { ); Services.obs.removeObserver(gKeywordURIFixup, "keyword-uri-fixup"); - if (AppConstants.platform == "win") { - MenuTouchModeObserver.uninit(); - } + MenuTouchModeObserver.uninit(); BrowserOffline.uninit(); CanvasPermissionPromptHelper.uninit(); WebAuthnPromptHelper.uninit(); @@ -2582,7 +2589,7 @@ var gBrowserInit = { ChromeUtils.defineLazyGetter( gBrowserInit, "_firstContentWindowPaintDeferred", - () => PromiseUtils.defer() + () => Promise.withResolvers() ); gBrowserInit.idleTasksFinishedPromise = new Promise(resolve => { @@ -3337,22 +3344,9 @@ function PageProxyClickHandler(aEvent) { * us via async messaging. */ var BrowserOnClick = { - ignoreWarningLink(reason, blockedInfo, browsingContext) { - let triggeringPrincipal = - blockedInfo.triggeringPrincipal || - _createNullPrincipalFromTabUserContextId(); - - // Allow users to override and continue through to the site, - // but add a notify bar as a reminder, so that they don't lose - // track after, e.g., tab switching. - // Note that we have to use the passed URI info and can't just - // rely on the document URI, because the latter contains - // additional query parameters that should be stripped. - browsingContext.fixupAndLoadURIString(blockedInfo.uri, { - triggeringPrincipal, - flags: Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CLASSIFIER, - }); - + async ignoreWarningLink(reason, blockedInfo, browsingContext) { + // Add a notify bar before allowing the user to continue through to the + // site, so that they don't lose track after, e.g., tab switching. // We can't use browser.contentPrincipal which is principal of about:blocked // Create one from uri with current principal origin attributes let principal = Services.scriptSecurityManager.createContentPrincipal( @@ -3427,7 +3421,20 @@ var BrowserOnClick = { // provide a URL endpoint for these reports. } - SafeBrowsingNotificationBox.show(title, buttons); + await SafeBrowsingNotificationBox.show(title, buttons); + + // Allow users to override and continue through to the site. + // Note that we have to use the passed URI info and can't just + // rely on the document URI, because the latter contains + // additional query parameters that should be stripped. + let triggeringPrincipal = + blockedInfo.triggeringPrincipal || + _createNullPrincipalFromTabUserContextId(); + + browsingContext.fixupAndLoadURIString(blockedInfo.uri, { + triggeringPrincipal, + flags: Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CLASSIFIER, + }); }, }; @@ -4196,7 +4203,7 @@ const BrowserSearch = { inBackground = !inBackground; } - let { engine, url } = await BrowserSearch._loadSearch( + let { engine } = await BrowserSearch._loadSearch( terms, where, usePrivate, @@ -4212,8 +4219,7 @@ const BrowserSearch = { BrowserSearchTelemetry.recordSearch( gBrowser.selectedBrowser, engine, - "contextmenu", - { url } + "contextmenu" ); } }, @@ -4222,7 +4228,7 @@ const BrowserSearch = { * Perform a search initiated from the command line. */ async loadSearchFromCommandLine(terms, usePrivate, triggeringPrincipal, csp) { - let { engine, url } = await BrowserSearch._loadSearch( + let { engine } = await BrowserSearch._loadSearch( terms, "current", usePrivate, @@ -4234,8 +4240,7 @@ const BrowserSearch = { BrowserSearchTelemetry.recordSearch( gBrowser.selectedBrowser, engine, - "system", - { url } + "system" ); } }, @@ -4265,8 +4270,7 @@ const BrowserSearch = { BrowserSearchTelemetry.recordSearch( gBrowser.selectedBrowser, result.engine, - "webextension", - { url: result.url } + "webextension" ); }, @@ -4286,26 +4290,8 @@ const BrowserSearch = { * @param {string} newEngine * name of the application default engine to replaced the removed engine. */ - removalOfSearchEngineNotificationBox(oldEngine, newEngine) { - let messageFragment = document.createDocumentFragment(); - let message = document.createElement("span"); - let link = document.createXULElement("label", { - is: "text-link", - }); - - link.href = Services.urlFormatter.formatURLPref( - "browser.search.searchEngineRemoval" - ); - link.setAttribute("data-l10n-name", "remove-search-engine-article"); - document.l10n.setAttributes(message, "removed-search-engine-message", { - oldEngine, - newEngine, - }); - - message.appendChild(link); - messageFragment.appendChild(message); - - let button = [ + async removalOfSearchEngineNotificationBox(oldEngine, newEngine) { + let buttons = [ { "l10n-id": "remove-search-engine-button", primary: true, @@ -4316,15 +4302,21 @@ const BrowserSearch = { gNotificationBox.removeNotification(notificationBox); }, }, + { + supportPage: "search-engine-removal", + }, ]; - gNotificationBox.appendNotification( + await gNotificationBox.appendNotification( "search-engine-removal", { - label: messageFragment, + label: { + "l10n-id": "removed-search-engine-message2", + "l10n-args": { oldEngine, newEngine }, + }, priority: gNotificationBox.PRIORITY_SYSTEM, }, - button + buttons ); // Update engine name in the placeholder to the new default engine name. @@ -6048,7 +6040,8 @@ nsBrowserAccess.prototype = { aTriggeringPrincipal = null, aName = "", aCsp = null, - aSkipLoad = false + aSkipLoad = false, + aForceLoadInBackground = false ) { let win, needToFocusWin; @@ -6074,6 +6067,9 @@ nsBrowserAccess.prototype = { let loadInBackground = Services.prefs.getBoolPref( "browser.tabs.loadDivertedInBackground" ); + if (aForceLoadInBackground) { + loadInBackground = true; + } let tab = win.gBrowser.addTab(aURI ? aURI.spec : "about:blank", { triggeringPrincipal: aTriggeringPrincipal, @@ -6241,7 +6237,8 @@ nsBrowserAccess.prototype = { console.error(ex); } break; - case Ci.nsIBrowserDOMWindow.OPEN_NEWTAB: { + case Ci.nsIBrowserDOMWindow.OPEN_NEWTAB: + case Ci.nsIBrowserDOMWindow.OPEN_NEWTAB_BACKGROUND: { // If we have an opener, that means that the caller is expecting access // to the nsIDOMWindow of the opened tab right away. For e10s windows, // this means forcing the newly opened browser to be non-remote so that @@ -6252,6 +6249,8 @@ nsBrowserAccess.prototype = { let userContextId = aOpenWindowInfo ? aOpenWindowInfo.originAttributes.userContextId : openingUserContextId; + let forceLoadInBackground = + aWhere == Ci.nsIBrowserDOMWindow.OPEN_NEWTAB_BACKGROUND; let browser = this._openURIInNewTab( aURI, referrerInfo, @@ -6264,7 +6263,8 @@ nsBrowserAccess.prototype = { aTriggeringPrincipal, "", aCsp, - aSkipLoad + aSkipLoad, + forceLoadInBackground ); if (browser) { browsingContext = browser.browsingContext; @@ -6363,7 +6363,10 @@ nsBrowserAccess.prototype = { ); } - if (aWhere != Ci.nsIBrowserDOMWindow.OPEN_NEWTAB) { + if ( + aWhere != Ci.nsIBrowserDOMWindow.OPEN_NEWTAB && + aWhere != Ci.nsIBrowserDOMWindow.OPEN_NEWTAB_BACKGROUND + ) { dump("Error: openURIInFrame can only open in new tabs or print"); return null; } @@ -6376,6 +6379,9 @@ nsBrowserAccess.prototype = { ? aParams.openerOriginAttributes.userContextId : Ci.nsIScriptSecurityManager.DEFAULT_USER_CONTEXT_ID; + var forceLoadInBackground = + aWhere == Ci.nsIBrowserDOMWindow.OPEN_NEWTAB_BACKGROUND; + return this._openURIInNewTab( aURI, aParams.referrerInfo, @@ -6388,7 +6394,8 @@ nsBrowserAccess.prototype = { aParams.triggeringPrincipal, aName, aParams.csp, - aSkipLoad + aSkipLoad, + forceLoadInBackground ); }, @@ -9065,7 +9072,7 @@ var PanicButtonNotifier = { const SafeBrowsingNotificationBox = { _currentURIBaseDomain: null, - show(title, buttons) { + async show(title, buttons) { let uri = gBrowser.currentURI; // start tracking host so that we know when we leave the domain @@ -9086,7 +9093,7 @@ const SafeBrowsingNotificationBox = { notificationBox.removeNotification(previousNotification); } - let notification = notificationBox.appendNotification( + let notification = await notificationBox.appendNotification( value, { label: title, @@ -9961,18 +9968,12 @@ var ConfirmationHint = { var FirefoxViewHandler = { tab: null, BUTTON_ID: "firefox-view-button", - _enabled: false, get button() { return document.getElementById(this.BUTTON_ID); }, init() { CustomizableUI.addListener(this); - this._updateEnabledState = this._updateEnabledState.bind(this); - this._updateEnabledState(); - NimbusFeatures.majorRelease2022.onUpdate(this._updateEnabledState); - NimbusFeatures.firefoxViewNext.onUpdate(this._updateEnabledState); - ChromeUtils.defineESModuleGetters(this, { SyncedTabs: "resource://services-sync/SyncedTabs.sys.mjs", }); @@ -9981,25 +9982,6 @@ var FirefoxViewHandler = { uninit() { CustomizableUI.removeListener(this); Services.obs.removeObserver(this, "firefoxview-notification-dot-update"); - NimbusFeatures.majorRelease2022.offUpdate(this._updateEnabledState); - NimbusFeatures.firefoxViewNext.offUpdate(this._updateEnabledState); - }, - _updateEnabledState() { - this._enabled = - NimbusFeatures.majorRelease2022.getVariable("firefoxView") || - NimbusFeatures.firefoxViewNext.getVariable("enabled"); - // We use a root attribute because there's no guarantee the button is in the - // DOM, and visibility changes need to take effect even if it isn't in the DOM - // right now. - document.documentElement.toggleAttribute( - "firefoxviewhidden", - !this._enabled - ); - document.getElementById("menu_openFirefoxView").hidden = !this._enabled; - document.getElementById("firefox-view-button").style.listStyleImage = - NimbusFeatures.firefoxViewNext.getVariable("newIcon") - ? "" - : 'url("chrome://branding/content/about-logo.png")'; }, onWidgetRemoved(aWidgetId) { if (aWidgetId == this.BUTTON_ID && this.tab) { @@ -10011,10 +9993,7 @@ var FirefoxViewHandler = { this.button.removeAttribute("open"); } }, - openTab(event) { - if (event?.type == "mousedown" && event?.button != 0) { - return; - } + openTab(section) { if (!CustomizableUI.getPlacementOfWidget(this.BUTTON_ID)) { CustomizableUI.addWidgetToArea( this.BUTTON_ID, @@ -10022,9 +10001,10 @@ var FirefoxViewHandler = { CustomizableUI.getPlacementOfWidget("tabbrowser-tabs").position ); } - const viewURL = NimbusFeatures.firefoxViewNext.getVariable("enabled") - ? "about:firefoxview-next" - : "about:firefoxview"; + let viewURL = "about:firefoxview"; + if (section) { + viewURL = `${viewURL}#${section}`; + } // Need to account for navigation to Firefox View pages if ( this.tab && @@ -10046,6 +10026,12 @@ var FirefoxViewHandler = { this._closeDeviceConnectedTab(); gBrowser.selectedTab = this.tab; }, + openToolbarMouseEvent(event, section) { + if (event?.type == "mousedown" && event?.button != 0) { + return; + } + this.openTab(section); + }, handleEvent(e) { switch (e.type) { case "TabSelect": @@ -10054,13 +10040,10 @@ var FirefoxViewHandler = { this.button?.setAttribute("aria-pressed", selected); this._recordViewIfTabSelected(); this._onTabForegrounded(); - if (e.target == this.tab) { - // If Fx View is opened, add temporary style to make first available tab focusable - gBrowser.visibleTabs[0].style["-moz-user-focus"] = "normal"; - } else { - // When Fx View is closed, remove temporary -moz-user-focus style from first available tab - gBrowser.visibleTabs[0].style.removeProperty("-moz-user-focus"); - } + // If Fx View is opened, add temporary style to make first available tab focusable + // When Fx View is closed, remove temporary -moz-user-focus style from first available tab + gBrowser.visibleTabs[0].style.MozUserFocus = + e.target == this.tab ? "normal" : ""; break; case "TabClose": this.tab = null; @@ -10122,18 +10105,11 @@ var FirefoxViewHandler = { const PREF_NAME = "browser.firefox-view.view-count"; const MAX_VIEW_COUNT = 10; let viewCount = Services.prefs.getIntPref(PREF_NAME, 0); - let isFirefoxViewNext = Services.prefs.getBoolPref( - "browser.tabs.firefox-view-next", - false - ); // Record telemetry - Services.telemetry.setEventRecordingEnabled( - isFirefoxViewNext ? "firefoxview_next" : "firefoxview", - true - ); + Services.telemetry.setEventRecordingEnabled("firefoxview_next", true); Services.telemetry.recordEvent( - isFirefoxViewNext ? "firefoxview_next" : "firefoxview", + "firefoxview_next", "tab_selected", "toolbarbutton", null, diff --git a/firefox-src-part/browser/base/content/browser.xhtml b/firefox-src-part/browser/base/content/browser.xhtml index dfb912281..9719727d5 100644 --- a/firefox-src-part/browser/base/content/browser.xhtml +++ b/firefox-src-part/browser/base/content/browser.xhtml @@ -95,6 +95,7 @@ + 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 5cac936d0..4074f35ff 100644 --- a/firefox-src-part/browser/base/content/main-popupset.inc.xhtml +++ b/firefox-src-part/browser/base/content/main-popupset.inc.xhtml @@ -145,16 +145,9 @@ - - - + @@ -419,6 +412,8 @@ +