Estructura de directorios de código fuente de Mozilla

El código para todos los proyectos de la familia Mozilla (como Firefox, Thunderbird, etc.) se combina en un único árbol-fuente. El árbol contiene el código fuente, así como el código necesario para generar cada proyecto en las plataformas compatibles (Linux, Windows, Mac OS, etc).

Si simplemente quieres echar un vistazo al código fuente de Mozilla, no es necesario que lo descargues. Puedes mirar el codigo fuente directamente con tu navegador web usando MXR (la raiz del codigo fuente completo de Mozilla comienza en http://mxr.mozilla.org/mozilla-central/source/).

Para modificar el código fuente, tienes que adquirirlo, ya sea descargando una instantánea de las fuentes o revisando las fuentes actuales de Mercurial.

Este documento describe la estructura de directorios que puede ser generada por client.mk -- es decir, los directorios que se utilizan por lo menos en algún producto del proyecto Mozilla. Hay otros directorios en el repositorio CVS de Mozilla, como los de las herramientas Web y los del código base clásico.

Esto no está del todo actualizado. Mira la descripción general de los directorios del código fuente para una versión algo diferente (antigua) de la misma información. También mira la descripción más detallada de las partes de Gecko.

accessible

Archivos para la accesibilidad (por ejemplo, los archivos de soporte MSAA (Microsoft Active Accessibility) y ATK (Accessibility Toolkit, usado por GTK+ 2)). Ver Accesibilidad de Mozilla  Accesibilidad.

browser

Contiene el código de la parte del usuario para el navegador Firefox (en XUL, JavaScript, XBL, y C++). Muchos de estos archivos comenzaron como una copia de los archivos de xpfe/.

build

Archivos varios, utilizados en el proceso de compilación. Véase también config/.

calendar

Implementación de Calendar, creado originalmente por OEone. Véase también extensions/lightning/.

caps

Gestión de la seguridad de la página web basada en capabilities.

Caps contiene las interfaces de C++ y el código para determinar las capabilities del contenido basado en la configuración de seguridad o certificados (por ejemplo VeriSign). Ver seguridad de componentes.

chrome

Registro chrome utilizado con toolkit/. Estos archivos fueron originalmente copias de los archivos de rdf/chrome/.

composer

El código (XUL y JavaScript) de la parte del usuario (front-end) para la aplicación standalone Composer.

config

Más archivos utilizados por el proceso de compilación, incluidos normalmente para los makefiles, etc. Véase también build/.

content

Las estructuras de datos que representan la estructura de las páginas Web (HTML, SVG, documentos XML, elementos, nodos de texto, etc.). Estos objetos contienen la implementación de varias interfaces DOM y también implementan algunos de los comportamientos asociados a esos objetos, como manejo de enlaces, control del comportamiento del formulario y envío del formulario.

Este directorio también contiene el código para XUL, XBL, XTF, <canvas>, así como el código de la implementación XSLT y manejo de eventos.

db

Contenedor para los módulos de acceso a las bases de datos. Actualmente contiene mork y sqlite.

db/mdb, db/mork, and db/morkreader

Implementación de Mork, un formato de texto para bases de datos. Este se utiliza por ejemplo para almacenar la historia global.

morkreader es un analizador simple para mork usado para migrar los datos antiguos a las nuevas bases de datos basadas en sqlite.

db/sqlite3

La base de datos SQLite, usada por storage. Reemplaza a mork en Firefox 3.

dbm

Código fuente de la librería Berkeley de base de datos, hackeado desde la versión 4.4BSD. Utilizado principalmente por el código NSS como almacén de certificados.

directory

Soporte LDAP para Mozilla. Utilizado en las noticias por correo.

docshell

Implementación del docshell, el objeto principal para el manejo de lo relacionado con la ventana de un documento. Cada cuadro tiene su propio docshell. Contiene métodos para la carga de URIs, gestión de los oyentes del contenido de los URIs, etc. Es la capa más externa de la API embebida usada para incrustar un navegador Gecko en una aplicación. Ver también webshell/.

dom

Contiene:

  • Definiciones IDL de las interfaces definidas por las especificaciones DOM y las extensiones de Mozilla a estas interfaces (las implementaciones de estas interfaces están principalmente, aunque no completamente, en content/).
  • Las partes de la conexión entre JavaScript y las implementaciones de objetos DOM que son específicos para JavaScript y el DOM. (Las partes que no son específicas del DOM, es decir, la unión genérica entre XPCOM y JavaScript, se encuentran en js/src/xpconnect/.)
  • Las implementaciones de algunos de los principales objetos "DOM nivel 0", tales como window, window.navigator, window.location, etc.

editor

The editor directory contains C++ interfaces, C++ code, and XUL/JavaScript for the embeddable editor component, which is used for the HTML Editor("Composer"), for plain and HTML mail composition, and for text fields and text areas throughout the product. The editor is designed like a "browser window with editing features": it adds some special classes for editing text and managing transaction undo/redo, but reuses browser code for nearly everything else.

Contains:

  • The backend for HTML and text editing. This is not only used for the mail composer and the page editor composer, but also for rich text editing inside webpages. Textarea and input fields are using such an editor as well (in the plaintext variant). See Mozilla Editor.
  • The frontend for the HTML editor that is part of SeaMonkey.

embedding

XXX this needs a description. See Embedding.

extensions

Contains several extensions to mozilla, which can be enabled at compile-time using the --enable-extensions configure argument.

Note that some of these are now built specially and not using the --enable-extensions option. For example, disabling xmlextras is done using --disable-xmlextras.

extensions/auth

Implementation of the negotiate auth method for HTTP and other protocols. Has code for SSPI, GSSAPI, etc. See Integrated Authentication.

extensions/content-packs

Content- and locale-pack switching user interface.

extensions/cookie

Permissions backend for cookies, images etc, as well as the user interface to these permissions and other cookie features.

extensions/cview

Component viewer, which allows to view the currently registered components and interfaces.

extensions/datetime

Support for the datetime protocol.

extensions/finger

Support for the finger protocol.

extensions/gnomevfs

Interface to gnome-vfs to allow using all protocols supported by gnome-vfs inside of mozilla.

extensions/help

Help viewer and help content. See Mozilla Help Viewer Project.

extensions/irc

Edit section

This is ChatZilla, the IRC (Internet Relay Chat) component. See ChatZilla.

extensions/java

Edit section

XPCOM<->Java bridge ("JavaXPCOM", formerly known as Javaconnect). Unrelated to the code in java/.

extensions/layout-debug

Edit section

Layout debugger. Intended as replacement for "viewer". Can be used to run layout regression tests and has support for other layout debugging features.

extensions/lightning

Edit section

The Lightning project, "an extension to tightly integrate calendar functionality (scheduling, tasks, etc.) into Thunderbird." See Lightning.

extensions/mono

Edit section

A two-way bridge between the CLR/.NET/Mono/C#/etc. world and XPCOM.

extensions/p3p

Edit section

Implementation of W3C's Platform for Privacy Preferences standard. See Platform for Privacy Preferences (P3P).

extensions/pref

Edit section

Preference-related extensions:

extensions/python

Edit section

Support for implementing XPCOM components in python. See PyXPCOM.

extensions/reporter

Edit section

An extension to report problems with web pages. Client-side part. See Mozilla Reporter.

extension/schema-validation

Edit section

Allows to validate XML trees according to specified XML Schemas.

extension/spatialnavigation

Edit section

Spatial navigation, navigating between links of a document according to their on-screen position. See Spatial Navigation.

extensions/spellcheck

Edit section

Spellchecker for mailnews and composer.

extensions/sql

Edit section

Support for accessing SQL databases from XUL applications. See SQL Support in Mozilla.

extensions/sroaming

Edit section

Session roaming, i.e. support for storing a profile on a remote server.

extensions/transformiix

Edit section

XSLT support. XSL Transformations is a language used to transform XML documents into other XML documents. See XSL Transformations.

extensions/tridentprofile

Edit section

Support for importing profiles from MSIE.

extensions/typeaheadfind

Edit section

Find As You Type allows quick web page navigation when you type a succession of characters in the body of the displayed page. See Find As You Type.

extensions/universalchardet

Edit section

Universal character set detector.

extensions/venkman

Edit section

The JavaScript Debugger.

extensions/wallet

Edit section

Password and Form Manager.

extensions/webdav

Edit section

WebDAV code; exposes special APIs for accessing WebDAV servers. Used by the Calendar project.

extensions/webservices

Edit section

Support for Webservices. See Web Services.

extensions/xforms

Edit section

Code for the XForms extension. See XForms.

extensions/xmlextras

Edit section

Several XML-related extensions. See XML Extras.

extensions/xml-rpc

Edit section

XML Remote Procedure Calls. Unowned these days. See XML-RPC in Mozilla.

extensions/xmlterm

Edit section

XMLTerm, a terminal implemented using mozilla technology. Only available on GTK builds.

gc

Edit section

Container for garbage collection libraries, currently only boehm GC.

gfx

Edit section

Contains interfaces that abstract the capabilities of platform specific graphics toolkits, along with implementations on various platforms. These interfaces provide methods for things like drawing images, text, and basic shapes. It also contains basic data structures such as points and rectangles used here and in other parts of Mozilla.

It is also the home of the new graphics architecture based on cairo (via a C++ wrapper called thebes). See NewGFXAPIs and GFXEvolution.

image

Edit section

Image rendering library. Contains decoders for the image formats mozilla supports.

intl

Edit section

Internationalization and localization support. See Internationalisation Projects.

bidi
Obsolete.
chardet
Code for "sniffing" the character encoding of Web pages.
ctl
Code for dealing with Complex Text Layout, related to shaping of south Asian languages (not built by default, needs --enable-ctl).
locale
Code related to determination of locale information from the operating environment.
lwbrk
Code related to line breaking and word breaking.
strres
Code related to string resources used for localization.
uconv
Code that converts (both ways: encoders and decoders) between UTF-16 and many other character encodings.
unicharutil
Code related to implementation of various algorithms for Unicode text, such as case conversion.

ipc

Edit section

Container for implementations of IPC (Inter-Process Communication) mechanisms.

ipc/ipcd

Edit section

The IPC daemon that is used for communication between several mozilla processes to support profile sharing. (Note that at the time of this writing (Dec 2005), profile sharing is not supported by mozilla).

jpeg

Edit section

Source code of libjpeg, used by the mozilla image library.

js/src

Edit section

The JavaScript engine, also known as SpiderMonkey. See also JavaScript.

js/jsd

Edit section

JavaScript debugging library. See JavaScript Debugging.

js/src/xpconnect

Edit section

Support code for calling JavaScript code from C++ code and C++ code from JavaScript code, using XPCOM interfaces. See XPConnect].

js/src/liveconnect

Edit section

Liveconnect, the bridge between JavaScript and Java. See LiveConnect Overview.

l10n

Edit section

Basically empty and not used by the mozilla build.

layout

Edit section

Code that implements a tree of rendering objects that describe the types and locations of the objects that are displayed on the screen (such as CSS boxes, tables, form controls, XUL boxes, etc.), and code that manages operations over that rendering tree (such as creating and destroying it, doing layout, painting, and event handling). See documentation and other information.

base
Code that deals with the rendering tree.
generic
The basic rendering object interface and the rendering tree objects for basic CSS boxes.
forms
Rendering tree objects for HTML form controls.
tables
Rendering tree objects for CSS/HTML tables
mathml
Rendering tree objects for MathML.
svg
Rendering tree objects for SVG.
xul
Additional rendering object interfaces for XUL and the rendering tree objects for XUL boxes.

lib

Edit section

Mostly unused; might be used on mac?

mail

Edit section

Thunderbird frontend files. Note that many thunderbird files are shared with Mozilla Mailnews and can be found under mailnews/.

mailnews

Edit section

The mail and news backend code (e.g. code that manages folders, manages databases, or interacts with mail servers) and the frontend code for the SeaMonkey mail client, some of which is shared by Thunderbird.

modules/libimg

Edit section

Contains libpng, used by the image library for PNG Image decoding.

modules/libjar

Edit section

Code to read zip files, used for reading the .jar files that contain the files for the mozilla frontend.

modules/libpref

Edit section

Library for reading and writing preferences.

modules/libreg

Edit section

Library for reading the netscape binary registry files, used for the ~/.mozilla/appreg file (registry.dat on windows).

modules/oji

Edit section

Support for the Java plugin (a bridge for plugging-in generic Java VMs). See Open JVM Integration (OJI).

Note: OJI may be removed from Mozilla 2.0 according to this post by Josh.

modules/plugin

Edit section

Plugin support. Implements the Netscape Plugin API (NPAPI). See Plugins.

modules/staticmod

Edit section

Helper files for static mozilla builds.

modules/zlib

Edit section

Source code of zlib, used at least in the networking library for compressed transfers.

netwerk

Edit section

Networking library, also known as Necko. Responsible for doing actual transfers from and to servers, as well as for URI handling and related stuff. See also Network library documentation.

nsprpub

Edit section

Netscape Portable Runtime. Used as an abstraction layer to things like threads, file I/O and socket I/O. See Netscape Portable Runtime.

other-licenses

Edit section

Contains libraries that are not covered by the MPL but used in some mozilla code.

parser/expat

Edit section

Copy of the expat source code, which is the XML parser used by mozilla.

parser/htmlparser

Edit section

Contains the html parser used by Mozilla, which parses HTML source code and calls the appropriate methods on a content sink.

profile

Edit section

Code for profile handling, the profile manager backend and frontend.

rdf

Edit section

RDF handling APIs. See RDF and RDF.

Also contains the chrome registry code used by SeaMonkey, although toolkit apps (such as Firefox and Thunderbird) use the copy forked into chrome.

security

Edit section

Contains NSS and PSM, to support cryptographic functions in mozilla (like S/MIME, SSL, etc). See Network Security Services (NSS) and Personal Security Manager (PSM).

storage

Edit section

Storage: XPCOM wrapper for sqlite. Wants to unify storage of all profile-related data. Supersedes mork. See also Unified Storage.

suite

Edit section

Newer parts of SeaMonkey-specific code. Older parts live in xpfe/.

themes

Edit section

Contains the themes shipped with SeaMonkey. Classic and Modern at the time of this writing.

toolkit

Edit section

The "new toolkit" used by Thunderbird, Firefox, etc. This contains numerous front-end components shared between applications as well as most of the XBL-implemented parts of the XUL language (most of which was originally forked from versions in xpfe/).

tools

Edit section

Some tools which are optionally built during the mozilla build process, mostly used for debugging.

uriloader/base

Edit section

Content dispatch in Mozilla. Used to load uris and find an appropriate content listener for the data. Also manages web progress notifications. See Document Loading: From Load Start to Finding a Handler and The Life Of An HTML HTTP Request.

uriloader/exthandler

Edit section

Used to handle content that Mozilla can't handle itself. Responsible for showing the helper app dialog, and generally for finding information about helper applications.

uriloader/prefetch

Edit section

Service to prefetch documents in order to have them cached for faster loading.

view

Edit section

View manager. Contains cross-platform code used for painting, scrolling, event handling, z-ordering, and opacity. Soon to become obsolete, gradually.

widget

Edit section

A cross-platform API, with implementations on each platform, for dealing with operating system/environment widgets, i.e., code related to creation and handling of windows, popups, and other native widgets and to converting the system's messages related to painting and events into the messages used by other parts of Mozilla (e.g. view/ and content/, the latter of which converts many of the messages to yet another API, the DOM event API).

xpcom

Edit section

Cross-Platform Component Object Model. Also contains data structures used by the rest of the mozilla code. See also XPCOM Project.

xpfe

Edit section

XPFE is the SeaMonkey frontend. It contains the XUL files for the browser interface, common files used by the other parts of the mozilla suite, and the XBL files for the parts of the XUL language that are implemented in XBL. Much of this code has been copied to browser/ and toolkit/ for use in Firefox, Thunderbird, etc.

xpfe/components

Edit section

Components used by the Mozilla frontend, as well as implementations of interfaces that other parts of mozilla expect.

xpfe/bootstrap

Edit section

Startup code for Mozilla. This contains the main/WinMain function. (Not used by "new toolkit" apps; for those, see toolkit/xre and the "app" directory for each specific app).

xpinstall

Edit section

The installer, which contains code for installing Mozilla and for installing XPIs/extensions. This directory also contains code needed to build installer packages. See XPInstall and the XPInstall project page.

Etiquetas y colaboradores del documento

Contributors to this page: ethertank, MiguelFRomeroR, Sheppy
Última actualización por: ethertank,