diff --git a/.clang-format-ignore b/.clang-format-ignore index bfa911029d..ff9305ff37 100644 --- a/.clang-format-ignore +++ b/.clang-format-ignore @@ -63,10 +63,6 @@ devtools/client/shared/sourceeditor/codemirror/.* devtools/client/shared/sourceeditor/tern/.* dom/canvas/test/webgl-conf/checkout/closure-library/.* dom/media/gmp/rlz/.* -dom/media/gmp/widevine-adapter/content_decryption_module.h -dom/media/gmp/widevine-adapter/content_decryption_module_export.h -dom/media/gmp/widevine-adapter/content_decryption_module_ext.h -dom/media/gmp/widevine-adapter/content_decryption_module_proxy.h dom/media/platforms/ffmpeg/ffmpeg57/.* dom/media/platforms/ffmpeg/ffmpeg58/.* dom/media/platforms/ffmpeg/libav53/.* @@ -111,7 +107,6 @@ js/src/vtune/jitprofiling.c js/src/vtune/jitprofiling.h js/src/vtune/legacy/.* media/ffvpx/.* -media/gmp-clearkey/0.1/openaes/.* media/kiss_fft/.* media/libaom/.* media/libcubeb/.* diff --git a/.eslintignore b/.eslintignore index ab54c23dc6..8ffd473e43 100644 --- a/.eslintignore +++ b/.eslintignore @@ -210,7 +210,6 @@ layout/mathml/imptests/ # Exclude everything but self-hosted JS js/ductwork/ js/examples/ -js/ipc/ js/public/ js/xpconnect/ js/src/devtools/ diff --git a/.eslintrc.js b/.eslintrc.js index fcb8b911c2..9e1014bc2e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -71,13 +71,6 @@ module.exports = { "env": { "mozilla/browser-window": true } - }, { - // TODO: Bug 1513639. Temporarily turn off reject-importGlobalProperties - // due to other ESLint enabling happening in DOM. - "files": "dom/**", - "rules": { - "mozilla/reject-importGlobalProperties": "off", - } }, { // TODO: Bug 1515949. Enable no-undef for gfx/ "files": "gfx/layers/apz/test/mochitest/**", diff --git a/.gdbinit_python b/.gdbinit_python index 07129d2c1e..9ad12bd2ac 100644 --- a/.gdbinit_python +++ b/.gdbinit_python @@ -1,5 +1,5 @@ python import sys -sys.path.append('third_party/python/gdbpp/') +sys.path.append('python/gdbpp/') import gdbpp end diff --git a/.gitignore b/.gitignore index 96ec746368..793124c263 100644 --- a/.gitignore +++ b/.gitignore @@ -99,6 +99,9 @@ devtools/client/debugger/assets/module-manifest.json # Ignore node_modules directories in devtools devtools/**/node_modules +# Ignore browsertime output directory +browsertime-results + # Tag files generated by GNU Global GTAGS GRTAGS diff --git a/Cargo.lock b/Cargo.lock index efe5d73b74..514d58f707 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1235,6 +1235,7 @@ name = "gkrust" version = "0.1.0" dependencies = [ "gkrust-shared", + "mozglue-static", "mozilla-central-workspace-hack", "stylo_tests", ] @@ -1245,6 +1246,7 @@ version = "0.1.0" dependencies = [ "bench-collections-gtest", "gkrust-shared", + "mozglue-static", "mp4parse-gtest", "nsstring-gtest", "xpcom-gtest", @@ -1555,6 +1557,8 @@ name = "jsrust" version = "0.1.0" dependencies = [ "jsrust_shared", + "mozglue-static", + "wat", ] [[package]] @@ -1624,6 +1628,12 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" +[[package]] +name = "leb128" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" + [[package]] name = "libc" version = "0.2.60" @@ -3744,6 +3754,24 @@ version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a026c1436af49d5537c7561c7474f81f7a754e36445fe52e6e88795a9747291c" +[[package]] +name = "wast" +version = "23.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b080a48623c1b15193eac2e28c7b8d0e6b2e1c6c67ed46ddcd86063e78e504" +dependencies = [ + "leb128", +] + +[[package]] +name = "wat" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c350d7431aa486488d28cdf75b57d59c02fab9cde20d93c52424510afe18ecc" +dependencies = [ + "wast", +] + [[package]] name = "webdriver" version = "0.40.1" diff --git a/Makefile.in b/Makefile.in index 17bed3485c..098abb7d04 100644 --- a/Makefile.in +++ b/Makefile.in @@ -150,13 +150,6 @@ endif recurse_artifact: $(topsrcdir)/mach --log-no-times artifact install$(if $(MOZ_ARTIFACT_BUILD_SYMBOLS), --symbols$(addprefix =,$(filter full,$(MOZ_ARTIFACT_BUILD_SYMBOLS))))$(if $(MOZ_AUTOMATION), --host-bins) -ifdef MOZ_EME_WIN32_ARTIFACT -recurse_win32-artifact: - rm -rf $(DIST)/i686 - $(topsrcdir)/mach --log-no-times artifact install --job $(if $(MOZ_PGO),win32-pgo,win32-opt) --no-tests --distdir $(DIST)/i686 - mv $(DIST)/i686/bin/* $(DIST)/i686 -endif - ifdef MOZ_ANDROID_FAT_AAR_ARCHITECTURES recurse_android-fat-aar-artifact: $(call py_action,fat_aar,$(MOZ_ANDROID_FAT_AAR_ARCHITECTURES) --distdir $(abspath $(DIST)/fat-aar)) diff --git a/accessible/tests/browser/events/browser_test_focus_urlbar.js b/accessible/tests/browser/events/browser_test_focus_urlbar.js index 1cb0473776..379c65be76 100644 --- a/accessible/tests/browser/events/browser_test_focus_urlbar.js +++ b/accessible/tests/browser/events/browser_test_focus_urlbar.js @@ -31,19 +31,10 @@ function isEventForAutocompleteItem(event) { * search isn't finished yet. */ function waitForSearchFinish() { - if (UrlbarPrefs.get("quantumbar")) { - return Promise.all([ - gURLBar.lastQueryContextPromise, - BrowserTestUtils.waitForCondition(() => gURLBar.view.isOpen), - ]); - } - return BrowserTestUtils.waitForCondition( - () => - gURLBar.popupOpen && - gURLBar.controller.searchStatus >= - Ci.nsIAutoCompleteController.STATUS_COMPLETE_NO_MATCH, - "Waiting for search to complete" - ); + return Promise.all([ + gURLBar.lastQueryContextPromise, + BrowserTestUtils.waitForCondition(() => gURLBar.view.isOpen), + ]); } // Check that the URL bar manages accessibility focus appropriately. @@ -132,9 +123,7 @@ async function runTests() { EventUtils.synthesizeKey("KEY_ArrowLeft"); await focused; testStates(textBox, STATE_FOCUSED); - if (UrlbarPrefs.get("quantumbar")) { - gURLBar.view.close(); - } + gURLBar.view.close(); // On Mac, down arrow when not at the end of the field moves to the end. // Move back to the end so the next press of down arrow opens the popup. EventUtils.synthesizeKey("KEY_ArrowRight"); diff --git a/accessible/tests/browser/general/browser_test_urlbar.js b/accessible/tests/browser/general/browser_test_urlbar.js index 2df17158f7..63244f8041 100644 --- a/accessible/tests/browser/general/browser_test_urlbar.js +++ b/accessible/tests/browser/general/browser_test_urlbar.js @@ -14,9 +14,7 @@ add_task(async function testAutocompleteRichResult() { let tab = await openNewTab("data:text/html;charset=utf-8,"); let accService = await initAccessibilityService(); - info( - "Opening the URL bar and entering a key to show the PopupAutoCompleteRichResult panel" - ); + info("Opening the URL bar and entering a key to show the urlbar panel"); await UrlbarTestUtils.promiseAutocompleteResultPopup({ window, waitForFocus, @@ -25,22 +23,10 @@ add_task(async function testAutocompleteRichResult() { info("Waiting for accessibility to be created for the richlistbox"); let resultsView; - if (UrlbarPrefs.get("quantumbar")) { - resultsView = gURLBar.view.panel.querySelector("#urlbarView-results"); - await BrowserTestUtils.waitForCondition(() => - accService.getAccessibleFor(resultsView) - ); - } else { - let urlbarPopup = document.getElementById("PopupAutoCompleteRichResult"); - resultsView = document.getAnonymousElementByAttribute( - urlbarPopup, - "anonid", - "richlistbox" - ); - await BrowserTestUtils.waitForCondition(() => - accService.getAccessibleFor(resultsView) - ); - } + resultsView = gURLBar.view.panel.querySelector("#urlbarView-results"); + await BrowserTestUtils.waitForCondition(() => + accService.getAccessibleFor(resultsView) + ); info("Confirming that the special case is handled in XULListboxAccessible"); let accessible = accService.getAccessibleFor(resultsView); diff --git a/browser/actors/ContextMenuChild.jsm b/browser/actors/ContextMenuChild.jsm index bcf0136f9e..7a360dbf20 100644 --- a/browser/actors/ContextMenuChild.jsm +++ b/browser/actors/ContextMenuChild.jsm @@ -27,6 +27,7 @@ XPCOMUtils.defineLazyModuleGetters(this, { PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm", InlineSpellCheckerContent: "resource://gre/modules/InlineSpellCheckerContent.jsm", + ContentDOMReference: "resource://gre/modules/ContentDOMReference.jsm", }); XPCOMUtils.defineLazyGetter(this, "PageMenuChild", () => { @@ -188,6 +189,8 @@ const messageListeners = { let ctxDraw = canvas.getContext("2d"); ctxDraw.drawImage(video, 0, 0); + // Note: if changing the content type, don't forget to update + // consumers that also hardcode this content type. this.mm.sendAsyncMessage("ContextMenu:SaveVideoFrameAsImage:Result", { dataURL: canvas.toDataURL("image/jpeg", ""), }); @@ -531,7 +534,7 @@ class ContextMenuChild extends ActorChild { // The same-origin check will be done in nsContextMenu.openLinkInTab. let parentAllowsMixedContent = !!this.docShell.mixedContentChannel; - let disableSetDesktopBg = null; + let disableSetDesktopBackground = null; // Media related cache info parent needs for saving let contentType = null; @@ -541,7 +544,7 @@ class ContextMenuChild extends ActorChild { aEvent.composedTarget instanceof Ci.nsIImageLoadingContent && aEvent.composedTarget.currentURI ) { - disableSetDesktopBg = this._disableSetDesktopBackground( + disableSetDesktopBackground = this._disableSetDesktopBackground( aEvent.composedTarget ); @@ -587,6 +590,7 @@ class ContextMenuChild extends ActorChild { Ci.nsIReferrerInfo ); referrerInfo.initWithElement(aEvent.composedTarget); + referrerInfo = E10SUtils.serializeReferrerInfo(referrerInfo); // In the case "onLink" we may have to send link referrerInfo to use in // _openLinkInParameters @@ -598,45 +602,38 @@ class ContextMenuChild extends ActorChild { linkReferrerInfo.initWithElement(context.link); } - let targetAsCPOW = context.target; - if (targetAsCPOW) { + let target = context.target; + if (target) { this._cleanContext(); } - let isRemote = - Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT; + editFlags = SpellCheckHelper.isEditable( + aEvent.composedTarget, + this.content + ); - if (isRemote) { - editFlags = SpellCheckHelper.isEditable( - aEvent.composedTarget, - this.content + if (editFlags & SpellCheckHelper.SPELLCHECKABLE) { + spellInfo = InlineSpellCheckerContent.initContextMenu( + aEvent, + editFlags, + this ); + } - if (editFlags & SpellCheckHelper.SPELLCHECKABLE) { - spellInfo = InlineSpellCheckerContent.initContextMenu( - aEvent, - editFlags, - this.mm - ); - } - - // Set the event target first as the copy image command needs it to - // determine what was context-clicked on. Then, update the state of the - // commands on the context menu. - this.docShell.contentViewer - .QueryInterface(Ci.nsIContentViewerEdit) - .setCommandNode(aEvent.composedTarget); - aEvent.composedTarget.ownerGlobal.updateCommands("contentcontextmenu"); + // Set the event target first as the copy image command needs it to + // determine what was context-clicked on. Then, update the state of the + // commands on the context menu. + this.docShell.contentViewer + .QueryInterface(Ci.nsIContentViewerEdit) + .setCommandNode(aEvent.composedTarget); + aEvent.composedTarget.ownerGlobal.updateCommands("contentcontextmenu"); - customMenuItems = PageMenuChild.build(aEvent.composedTarget); - principal = doc.nodePrincipal; - } + principal = doc.nodePrincipal; let data = { context, charSet, baseURI, - isRemote, referrerInfo, editFlags, principal, @@ -650,26 +647,22 @@ class ContextMenuChild extends ActorChild { contentDisposition, frameOuterWindowID, popupNodeSelectors, - disableSetDesktopBg, + disableSetDesktopBackground, parentAllowsMixedContent, }; if (context.inFrame && !context.inSrcdocFrame) { - if (isRemote) { - data.frameReferrerInfo = E10SUtils.serializeReferrerInfo( - doc.referrerInfo - ); - } else { - data.frameReferrerInfo = doc.referrerInfo; - } + data.frameReferrerInfo = E10SUtils.serializeReferrerInfo( + doc.referrerInfo + ); + } + + if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) { + data.customMenuItems = PageMenuChild.build(aEvent.composedTarget); } if (linkReferrerInfo) { - if (isRemote) { - data.linkReferrerInfo = E10SUtils.serializeReferrerInfo(linkReferrerInfo); - } else { - data.linkReferrerInfo = linkReferrerInfo; - } + data.linkReferrerInfo = E10SUtils.serializeReferrerInfo(linkReferrerInfo); } Services.obs.notifyObservers( @@ -677,27 +670,14 @@ class ContextMenuChild extends ActorChild { "on-prepare-contextmenu" ); - if (isRemote) { - data.referrerInfo = E10SUtils.serializeReferrerInfo(data.referrerInfo); - if (data.frameReferrerInfo) { - data.frameReferrerInfo = - E10SUtils.serializeReferrerInfo(data.frameReferrerInfo); - } - - this.mm.sendAsyncMessage("contextmenu", data, { - targetAsCPOW, - }); - } else { - let browser = this.docShell.chromeEventHandler; - let mainWin = browser.ownerGlobal; + // In the event that the content is running in the parent process, we don't + // actually want the contextmenu events to reach the parent - we'll dispatch + // a new contextmenu event after the async message has reached the parent + // instead. + aEvent.preventDefault(); + aEvent.stopPropagation(); - data.documentURIObject = doc.documentURIObject; - data.disableSetDesktopBackground = data.disableSetDesktopBg; - delete data.disableSetDesktopBg; - - data.context.targetAsCPOW = targetAsCPOW; - mainWin.setContextMenuContentData(data); - } + this.mm.sendAsyncMessage("contextmenu", data); } /** @@ -869,6 +849,7 @@ class ContextMenuChild extends ActorChild { // Remember the node and its owner document that was clicked // This may be modifed before sending to nsContextMenu context.target = node; + context.targetIdentifier = ContentDOMReference.get(node); context.principal = context.target.ownerDocument.nodePrincipal; context.storagePrincipal = diff --git a/browser/app/permissions b/browser/app/permissions index dcb4517e74..f672a087e5 100644 --- a/browser/app/permissions +++ b/browser/app/permissions @@ -6,13 +6,6 @@ # * permission is an integer between 1 and 15 # See nsPermissionManager.cpp for more... -# UITour -origin uitour 1 https://www.mozilla.org -origin uitour 1 https://screenshots.firefox.com -origin uitour 1 https://support.mozilla.org -origin uitour 1 about:home -origin uitour 1 about:newtab - # Remote troubleshooting origin remote-troubleshooting 1 https://support.mozilla.org diff --git a/browser/app/profile/mypal.js b/browser/app/profile/mypal.js index 8659928048..5e9cbb46c0 100644 --- a/browser/app/profile/mypal.js +++ b/browser/app/profile/mypal.js @@ -147,15 +147,6 @@ pref("lightweightThemes.getMoreURL", "data:text/plain,"); pref("browser.eme.ui.enabled", false); #endif -// UI tour experience. -pref("browser.uitour.enabled", false); -pref("browser.uitour.loglevel", "Error"); -pref("browser.uitour.requireSecure", true); -pref("browser.uitour.themeOrigin", "data:text/plain,"); -pref("browser.uitour.url", "data:text/plain,"); -// How long to show a Hearbeat survey (two hours, in seconds) -pref("browser.uitour.surveyDuration", 7200); - pref("keyword.enabled", false); pref("browser.fixup.domainwhitelist.localhost", true); @@ -1612,9 +1603,6 @@ pref("dom.ipc.processPrelaunch.enabled", true); pref("browser.migrate.chrome.history.limit", 2000); pref("browser.migrate.chrome.history.maxAgeInDays", 180); -// Enable browser frames for use on desktop. Only exposed to chrome callers. -pref("dom.mozBrowserFramesEnabled", true); - pref("signon.generation.available", true); pref("signon.generation.enabled", true); pref("signon.schemeUpgrades", true); diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc index 9b9266f621..3fc8333628 100644 --- a/browser/base/content/browser-menubar.inc +++ b/browser/base/content/browser-menubar.inc @@ -572,10 +572,6 @@ #else /> #endif - .overflow-but } .titlebar-buttonbox { - -moz-appearance: -moz-window-button-box; + appearance: auto; + -moz-default-appearance: -moz-window-button-box; position: relative; } @@ -340,7 +341,8 @@ toolbarpaletteitem { %ifdef XP_MACOSX #titlebar-fullscreen-button { - -moz-appearance: -moz-mac-fullscreen-button; + appearance: auto; + -moz-default-appearance: -moz-mac-fullscreen-button; } /** @@ -541,9 +543,6 @@ toolbar:not(#TabsToolbar) > #personal-bookmarks { min-width: 1px; } -#urlbar[quantumbar="false"] { - -moz-binding: url(chrome://browser/content/urlbarBindings.xml#legacy-urlbar); -} #urlbar[quantumbar="true"] { -moz-binding: url(chrome://browser/content/urlbarBindings.xml#urlbar); @@ -624,71 +623,6 @@ html|input.urlbar-input { } } -/* Always show URLs LTR. */ -.ac-url-text:-moz-locale-dir(rtl), -.ac-title-text[lookslikeurl]:-moz-locale-dir(rtl) { - direction: ltr !important; -} - -/* Never show a scrollbar for the Location Bar popup. This overrides the - richlistbox inline overflow: auto style.*/ -#PopupAutoCompleteRichResult > richlistbox { - overflow: hidden !important; -} - -/* For non-action items, hide the action text; for action items, hide the URL - text. Don't show the separator for keyword results. */ -#PopupAutoCompleteRichResult > richlistbox > richlistitem > .ac-type-icon, -#PopupAutoCompleteRichResult > richlistbox > richlistitem > .ac-site-icon, -#PopupAutoCompleteRichResult > richlistbox > richlistitem > .ac-tags:not([empty]), -#PopupAutoCompleteRichResult > richlistbox > richlistitem > .ac-separator:not([type=keyword]), -#PopupAutoCompleteRichResult > richlistbox > richlistitem > .ac-url:not([actiontype]), -#PopupAutoCompleteRichResult > richlistbox > richlistitem > .ac-action[actiontype], -#PopupAutoCompleteRichResult > richlistbox > richlistitem[selected] > .ac-url[actiontype=remotetab], -#PopupAutoCompleteRichResult > richlistbox > richlistitem:hover > .ac-url[actiontype=remotetab] -{ - display: -moz-box; -} - -#PopupAutoCompleteRichResult > richlistbox > richlistitem[selected] > .ac-action[actiontype=remotetab], -#PopupAutoCompleteRichResult > richlistbox > richlistitem:hover > .ac-action[actiontype=remotetab] { - display: none; -} - -/* Normally we want to show the "Search with Engine" label only on hover or - selection, but we also want to show it for "alias offer" results -- that is, - non-heuristic search engine results that have an alias and empty query. - These results tell the user that they can be used to search. */ -#PopupAutoCompleteRichResult > richlistbox > richlistitem:not([selected]):not(:hover):not(.aliasOffer) > .ac-action[actiontype=searchengine], -#PopupAutoCompleteRichResult > richlistbox > richlistitem:not([selected]):not(:hover):not(.aliasOffer) > .ac-separator[actiontype=searchengine] { - display: none; -} - -/* Hide the em-dash separator between the search query description (.ac-title) - and the "Search with Foo" description (.ac-url) if the search query is the - empty string. Also hide .ac-title itself because it has a margin-inline-end; - alternatively we would need to remove that margin in this case. */ -#PopupAutoCompleteRichResult > richlistbox > richlistitem.emptySearchQuery > .ac-separator, -#PopupAutoCompleteRichResult > richlistbox > richlistitem.emptySearchQuery > .ac-title { - display: none; -} - -#PopupAutoCompleteRichResult > richlistbox > richlistitem > .ac-site-icon { - margin-inline-start: 0; -} - -/* For action items in a noactions popup, show the URL text and hide the action - text and type icon. */ -#PopupAutoCompleteRichResult[noactions] > richlistbox > richlistitem.overridable-action > .ac-url { - display: -moz-box; -} -#PopupAutoCompleteRichResult[noactions] > richlistbox > richlistitem.overridable-action > .ac-action { - display: none; -} -#PopupAutoCompleteRichResult[noactions] > richlistbox > richlistitem.overridable-action > .ac-type-icon { - list-style-image: none; -} - #urlbar[actionoverride] > #urlbar-display-box, #urlbar:not([actiontype="switchtab"]):not([actiontype="extension"]) > #urlbar-display-box, #urlbar:not([actiontype="switchtab"]) > #urlbar-display-box > #switchtab, @@ -733,31 +667,6 @@ html|input.urlbar-input { margin-inline-start: 0; } -#PopupAutoCompleteRichResult { - -moz-binding: url("chrome://browser/content/urlbarBindings.xml#urlbar-rich-result-popup"); -} - -#PopupAutoCompleteRichResult.showSearchSuggestionsNotification { - transition: height 100ms; -} - -#PopupAutoCompleteRichResult > deck[anonid="search-suggestions-notification"] { - display: none; - transition: margin-top 100ms; -} - -#PopupAutoCompleteRichResult.showSearchSuggestionsNotification > deck[anonid="search-suggestions-notification"] { - display: -moz-deck; -} - -#PopupAutoCompleteRichResult > richlistbox { - transition: height 100ms; -} - -#PopupAutoCompleteRichResult.showSearchSuggestionsNotification > richlistbox { - transition: none; -} - #urlbar[pageproxystate=invalid] > #page-action-buttons > .urlbar-page-action, #identity-box.chromeUI ~ #page-action-buttons > .urlbar-page-action:not(#star-button-box), .urlbar-history-dropmarker[usertyping], @@ -1076,7 +985,7 @@ toolbarpaletteitem[place="palette"] > #downloads-button[indicator] > #downloads- /* Give this menupopup an arrow panel styling */ #BMB_bookmarksPopup { - -moz-appearance: none; + appearance: none; -moz-binding: url("chrome://browser/content/places/menu.xml#places-popup-arrow"); background: transparent; border: none; @@ -1217,8 +1126,7 @@ toolbarpaletteitem[place="palette"] > #downloads-button[indicator] > #downloads- } toolbarpaletteitem[dragover] { - border-left-color: transparent; - border-right-color: transparent; + border-inline-color: transparent; } #customization-palette-container { @@ -1278,71 +1186,6 @@ toolbarpaletteitem > toolbaritem { display: none; } -/* UI Tour */ - -@keyframes uitour-wobble { - from { - transform: rotate(0deg) translateX(3px) rotate(0deg); - } - 50% { - transform: rotate(360deg) translateX(3px) rotate(-360deg); - } - to { - transform: rotate(720deg) translateX(0px) rotate(-720deg); - } -} - -@keyframes uitour-zoom { - from { - transform: scale(0.8); - } - 50% { - transform: scale(1.0); - } - to { - transform: scale(0.8); - } -} - -@keyframes uitour-color { - from { - border-color: #5B9CD9; - } - 50% { - border-color: #FF0000; - } - to { - border-color: #5B9CD9; - } -} - -#UITourHighlightContainer, -#UITourHighlight { - pointer-events: none; -} - -#UITourHighlight[active] { - animation-delay: 2s; - animation-fill-mode: forwards; - animation-iteration-count: infinite; - animation-timing-function: linear; -} - -#UITourHighlight[active="wobble"] { - animation-name: uitour-wobble; - animation-delay: 0s; - animation-duration: 1.5s; - animation-iteration-count: 1; -} -#UITourHighlight[active="zoom"] { - animation-name: uitour-zoom; - animation-duration: 1s; -} -#UITourHighlight[active="color"] { - animation-name: uitour-color; - animation-duration: 2s; -} - /* Combined context-menu items */ #context-navigation > .menuitem-iconic > .menu-iconic-text, #context-navigation > .menuitem-iconic > .menu-accel-container { @@ -1362,7 +1205,7 @@ toolbarpaletteitem > toolbaritem { } .dragfeedback-tab { - -moz-appearance: none; + appearance: none; opacity: 0.65; -moz-window-shadow: none; } diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 992ad4bca5..bd09bd4fc9 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -35,6 +35,7 @@ XPCOMUtils.defineLazyModuleGetters(this, { LightweightThemeConsumer: "resource://gre/modules/LightweightThemeConsumer.jsm", Log: "resource://gre/modules/Log.jsm", + LoginHelper: "resource://gre/modules/LoginHelper.jsm", LoginManagerParent: "resource://gre/modules/LoginManagerParent.jsm", MigrationUtils: "resource:///modules/MigrationUtils.jsm", NetUtil: "resource://gre/modules/NetUtil.jsm", @@ -68,7 +69,6 @@ XPCOMUtils.defineLazyModuleGetters(this, { TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm", TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.jsm", Translation: "resource:///modules/translation/Translation.jsm", - UITour: "resource:///modules/UITour.jsm", UpdateUtils: "resource://gre/modules/UpdateUtils.jsm", UrlbarInput: "resource:///modules/UrlbarInput.jsm", UrlbarPrefs: "resource:///modules/UrlbarPrefs.jsm", @@ -182,7 +182,7 @@ XPCOMUtils.defineLazyScriptGetter( ); XPCOMUtils.defineLazyScriptGetter( this, - ["setContextMenuContentData", "openContextMenu", "nsContextMenu"], + ["openContextMenu", "nsContextMenu"], "chrome://browser/content/nsContextMenu.js" ); XPCOMUtils.defineLazyScriptGetter( @@ -290,60 +290,30 @@ XPCOMUtils.defineLazyGetter(this, "gURLBar", () => gURLBarHandler.urlbar); /** * Tracks the urlbar object, allowing to reinitiate it when necessary, e.g. on - * customization or when the quantumbar pref changes. + * customization. */ var gURLBarHandler = { - toggleQuantumBarAttribute() { - this.textbox = document.getElementById("urlbar"); - this.textbox.setAttribute("quantumbar", this.quantumbar); - }, - /** * The urlbar binding or object. */ get urlbar() { if (!this._urlbar) { - if (this.quantumbar) { - this._urlbar = new UrlbarInput({ textbox: this.textbox }); - if (this._lastValue) { - this._urlbar.value = this._lastValue; - delete this._lastValue; - } - } else { - this._urlbar = this.textbox; + let textbox = document.getElementById("urlbar"); + this._urlbar = new UrlbarInput({ textbox }); + if (this._lastValue) { + this._urlbar.value = this._lastValue; + delete this._lastValue; } gBrowser.tabContainer.addEventListener("TabSelect", this._urlbar); } return this._urlbar; }, - /** - * Forwards to gURLBar.formatValue(), if the binding has been applied already. - * This is necessary until the Quantum Bar is not the default and we allow - * to dynamically switch between it and the legacy implementation, because the - * binding is only applied before the initial xul layout. - */ - formatValue() { - if (this.quantumbar) { - this.urlbar.formatValue(); - } else if (typeof this.textbox.formatValue == "function") { - this.textbox.formatValue(); - } - }, - - /** - * Invoked when the quantumbar pref changes. - */ - handlePrefChange() { - this._updateBinding(); - this._reset(); - }, - /** * Invoked by CustomizationHandler when a customization starts. */ customizeStart() { - if (this._urlbar && this._urlbar.constructor.name == "UrlbarInput") { + if (this._urlbar) { this._urlbar.removeCopyCutController(); } }, @@ -355,44 +325,20 @@ var gURLBarHandler = { this._reset(); }, - /** - * Rebuilds the textbox binding by detaching the element when necessary. - */ - _updateBinding() { - let quantumbarApplied = this.textbox.getAttribute("quantumbar") == "true"; - if (quantumbarApplied != this.quantumbar) { - let placeholder = document.createXULElement("toolbarpaletteitem"); - let parent = this.textbox.parentNode; - parent.replaceChild(placeholder, this.textbox); - this.textbox.setAttribute("quantumbar", this.quantumbar); - parent.replaceChild(this.textbox, placeholder); - } - }, - /** * Used to reset the gURLBar value. */ _reset() { if (this._urlbar) { gBrowser.tabContainer.removeEventListener("TabSelect", this._urlbar); - if (this._urlbar.constructor.name == "UrlbarInput") { - this._lastValue = this._urlbar.value; - this._urlbar.uninit(); - } + this._lastValue = this._urlbar.value; + this._urlbar.uninit(); delete this._urlbar; gURLBar = this.urlbar; } }, }; -XPCOMUtils.defineLazyPreferenceGetter( - gURLBarHandler, - "quantumbar", - "browser.urlbar.quantumbar", - false, - gURLBarHandler.handlePrefChange.bind(gURLBarHandler) -); - XPCOMUtils.defineLazyGetter(this, "ReferrerInfo", () => Components.Constructor( "@mozilla.org/referrer-info;1", @@ -1666,8 +1612,9 @@ var gBrowserInit = { }, onBeforeInitialXULLayout() { - // Dynamically switch on-off the Quantum Bar based on prefs. - gURLBarHandler.toggleQuantumBarAttribute(); + // Turn on QuantumBar. This can be removed once the quantumbar attribute is gone. + let urlbar = document.getElementById("urlbar"); + urlbar.setAttribute("quantumbar", true); // Set a sane starting width/height for all resolutions on new profiles. if (Services.prefs.getBoolPref("privacy.resistFingerprinting")) { @@ -2807,29 +2754,17 @@ function loadOneOrMoreURIs(aURIString, aTriggeringPrincipal, aCsp) { /** * Focuses the location bar input field and selects its contents. - * - * @param [optional] userInitiatedFocus - * Whether this focus is caused by an user interaction whose intention - * was to use the location bar. For example, using a shortcut to go to - * the location bar, or a contextual menu to search from it. - * The default is false and should be used in all those cases where the - * code focuses the location bar but that's not the primary user - * intention, like when opening a new tab. */ -function focusAndSelectUrlBar(userInitiatedFocus = false) { +function focusAndSelectUrlBar() { // In customize mode, the url bar is disabled. If a new tab is opened or the // user switches to a different tab, this function gets called before we've // finished leaving customize mode, and the url bar will still be disabled. // We can't focus it when it's disabled, so we need to re-run ourselves when // we've finished leaving customize mode. - if (CustomizationHandler.isExitingCustomizeMode) { - gNavToolbox.addEventListener( - "aftercustomization", - function() { - focusAndSelectUrlBar(userInitiatedFocus); - }, - { once: true } - ); + if (CustomizationHandler.isCustomizing()) { + gNavToolbox.addEventListener("aftercustomization", focusAndSelectUrlBar, { + once: true, + }); return; } @@ -2837,14 +2772,15 @@ function focusAndSelectUrlBar(userInitiatedFocus = false) { FullScreen.showNavToolbox(); } - gURLBar.userInitiatedFocus = userInitiatedFocus; gURLBar.select(); - gURLBar.userInitiatedFocus = false; } function openLocation() { if (window.location.href == AppConstants.BROWSER_CHROME_URL) { - focusAndSelectUrlBar(true); + focusAndSelectUrlBar(); + if (gURLBar.openViewOnFocus && !gURLBar.view.isOpen) { + gURLBar.startQuery(); + } return; } @@ -3090,13 +3026,8 @@ function readFromClipboard() { /** * Open the View Source dialog. * - * @param aArgsOrDocument - * Either an object or a Document. Passing a Document is deprecated, - * and is not supported with e10s. This function will throw if - * aArgsOrDocument is a CPOW. - * - * If aArgsOrDocument is an object, that object can take the - * following properties: + * @param args + * An object with the following properties: * * URL (required): * A string URL for the page we'd like to view the source of. @@ -3111,27 +3042,7 @@ function readFromClipboard() { * lineNumber (optional): * The line number to focus on once the source is loaded. */ -async function BrowserViewSourceOfDocument(aArgsOrDocument) { - let args; - - if (aArgsOrDocument instanceof Document) { - let doc = aArgsOrDocument; - // Deprecated API - callers should pass args object instead. - if (Cu.isCrossProcessWrapper(doc)) { - throw new Error( - "BrowserViewSourceOfDocument cannot accept a CPOW as a document." - ); - } - - let win = doc.defaultView; - let browser = win.docShell.chromeEventHandler; - let outerWindowID = win.windowUtils.outerWindowID; - let URL = browser.currentURI.spec; - args = { browser, outerWindowID, URL }; - } else { - args = aArgsOrDocument; - } - +async function BrowserViewSourceOfDocument(args) { // Check if external view source is enabled. If so, try it. If it fails, // fallback to internal view source. if (Services.prefs.getBoolPref("view_source.editor.external")) { @@ -4089,9 +4000,7 @@ function getDetailedCertErrorInfo(location, securityInfo) { hasHPKP, ]); - certErrorDetails += - "\r\n\r\n" + - gNavigatorBundle.getString("certErrorDetailsCertChain.label"); + certErrorDetails; return certErrorDetails; } @@ -5975,7 +5884,7 @@ var XULBrowserWindow = { // Make sure the "https" part of the URL is striked out or not, // depending on the current mixed active content blocking state. - gURLBarHandler.formatValue(); + gURLBar.formatValue(); try { uri = Services.io.createExposableURI(uri); @@ -8917,58 +8826,39 @@ var gPrivateBrowsingUI = { // temporary fix until bug 463607 is fixed document.getElementById("Tools:Sanitize").setAttribute("disabled", "true"); - if (window.location.href == AppConstants.BROWSER_CHROME_URL) { - // Adjust the window's title - let docElement = document.documentElement; - if (!PrivateBrowsingUtils.permanentPrivateBrowsing) { - docElement.setAttribute( - "title", - docElement.getAttribute("title_privatebrowsing") - ); - docElement.setAttribute( - "titlemodifier", - docElement.getAttribute("titlemodifier_privatebrowsing") - ); - } - docElement.setAttribute( - "privatebrowsingmode", - PrivateBrowsingUtils.permanentPrivateBrowsing - ? "permanent" - : "temporary" - ); - gBrowser.updateTitlebar(); - - if (PrivateBrowsingUtils.permanentPrivateBrowsing) { - // Adjust the New Window menu entries - [ - { normal: "menu_newNavigator", private: "menu_newPrivateWindow" }, - ].forEach(function(menu) { - let newWindow = document.getElementById(menu.normal); - let newPrivateWindow = document.getElementById(menu.private); - if (newWindow && newPrivateWindow) { - newPrivateWindow.hidden = true; - newWindow.label = newPrivateWindow.label; - newWindow.accessKey = newPrivateWindow.accessKey; - newWindow.command = newPrivateWindow.command; - } - }); - } + if (window.location.href != AppConstants.BROWSER_CHROME_URL) { + return; } - let urlBarSearchParam = - gURLBar.getAttribute("autocompletesearchparam") || ""; - if ( - !PrivateBrowsingUtils.permanentPrivateBrowsing && - !urlBarSearchParam.includes("disable-private-actions") - ) { - // Disable switch to tab autocompletion for private windows. - // We leave it enabled for permanent private browsing mode though. - urlBarSearchParam += " disable-private-actions"; + // Adjust the window's title + let docElement = document.documentElement; + if (!PrivateBrowsingUtils.permanentPrivateBrowsing) { + docElement.setAttribute( + "title", + docElement.getAttribute("title_privatebrowsing") + ); + docElement.setAttribute( + "titlemodifier", + docElement.getAttribute("titlemodifier_privatebrowsing") + ); } - if (!urlBarSearchParam.includes("private-window")) { - urlBarSearchParam += " private-window"; + docElement.setAttribute( + "privatebrowsingmode", + PrivateBrowsingUtils.permanentPrivateBrowsing ? "permanent" : "temporary" + ); + gBrowser.updateTitlebar(); + + if (PrivateBrowsingUtils.permanentPrivateBrowsing) { + // Adjust the New Window menu entries + let newWindow = document.getElementById("menu_newNavigator"); + let newPrivateWindow = document.getElementById("menu_newPrivateWindow"); + if (newWindow && newPrivateWindow) { + newPrivateWindow.hidden = true; + newWindow.label = newPrivateWindow.label; + newWindow.accessKey = newPrivateWindow.accessKey; + newWindow.command = newPrivateWindow.command; + } } - gURLBar.setAttribute("autocompletesearchparam", urlBarSearchParam); }, }; diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index f024f1856d..9538ef22bf 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -221,16 +221,6 @@ noautofocus="true" hidden="true" /> - -