Bug 1886990 - Move 'browser-sidebar.js' into the new 'browser/components/sidebar' directory r=sidebar-reviewers,Gijs,frontend-codestyle-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D206247
This commit is contained in:
Kelly Cochrane 2024-04-02 22:04:41 +00:00
Родитель d23342d3a1
Коммит c8125486a4
5 изменённых файлов: 11 добавлений и 8 удалений

Просмотреть файл

@ -117,7 +117,7 @@
Services.scriptloader.loadSubScript("chrome://browser/content/browser-development-helpers.js", this);
}
Services.scriptloader.loadSubScript("chrome://browser/content/browser-pageActions.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/browser-sidebar.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/sidebar/browser-sidebar.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/browser-tabsintitlebar.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/browser-unified-extensions.js", this);
Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this);

Просмотреть файл

@ -55,7 +55,6 @@ browser.jar:
content/browser/browser-places.js (content/browser-places.js)
content/browser/browser-profiles.js (content/browser-profiles.js)
content/browser/browser-safebrowsing.js (content/browser-safebrowsing.js)
content/browser/browser-sidebar.js (content/browser-sidebar.js)
content/browser/browser-siteIdentity.js (content/browser-siteIdentity.js)
content/browser/browser-sitePermissionPanel.js (content/browser-sitePermissionPanel.js)
content/browser/browser-siteProtections.js (content/browser-siteProtections.js)

Просмотреть файл

@ -203,7 +203,7 @@ var SidebarUI = {
/**
* The handler for Services.obs.addObserver.
**/
*/
observe(_subject, topic, _data) {
switch (topic) {
case "intl:app-locales-changed": {
@ -260,6 +260,7 @@ var SidebarUI = {
/**
* Handles keydown on the the switcherTarget button
*
* @param {Event} event
*/
handleKeydown(event) {
@ -368,8 +369,9 @@ var SidebarUI = {
/**
* Try and adopt the status of the sidebar from another window.
*
* @param {Window} sourceWindow - Window to use as a source for sidebar status.
* @return true if we adopted the state, or false if the caller should
* @returns {boolean} true if we adopted the state, or false if the caller should
* initialize the state itself.
*/
adoptFromWindow(sourceWindow) {
@ -512,7 +514,7 @@ var SidebarUI = {
* @param {string} commandID ID of the sidebar.
* @param {DOMNode} [triggerNode] Node, usually a button, that triggered the
* visibility toggling of the sidebar.
* @return {Promise}
* @returns {Promise}
*/
toggle(commandID = this.lastOpenedId, triggerNode) {
if (
@ -559,7 +561,7 @@ var SidebarUI = {
* @param {string} commandID ID of the sidebar to use.
* @param {DOMNode} [triggerNode] Node, usually a button, that triggered the
* showing of the sidebar.
* @return {Promise<boolean>}
* @returns {Promise<boolean>}
*/
async show(commandID, triggerNode) {
let panelType = commandID.substring(4, commandID.length - 7);
@ -588,7 +590,7 @@ var SidebarUI = {
* when a window opens (not triggered by user interaction).
*
* @param {string} commandID ID of the sidebar.
* @return {Promise<boolean>}
* @returns {Promise<boolean>}
*/
async showInitially(commandID) {
let panelType = commandID.substring(4, commandID.length - 7);
@ -610,7 +612,7 @@ var SidebarUI = {
* when a window is opened and we don't want to ping telemetry.
*
* @param {string} commandID ID of the sidebar.
* @return {Promise<void>}
* @returns {Promise<void>}
*/
_show(commandID) {
return new Promise(resolve => {

Просмотреть файл

@ -3,6 +3,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
browser.jar:
content/browser/sidebar/browser-sidebar.js
content/browser/sidebar/sidebar-launcher.css
content/browser/sidebar/sidebar-launcher.mjs
content/browser/sidebar/sidebar-history.html

Просмотреть файл

@ -57,6 +57,7 @@ const MAPPINGS = {
"browser/components/places/content/places-menupopup.js",
"shopping-sidebar.js":
"browser/components/shopping/content/shopping-sidebar.js",
"browser-sidebar.js": "browser/components/sidebar/browser-sidebar.js",
};
const globalScriptsRegExp =