Author: Christian Biesinger This document is licensed under the Creative Commons Attribution-ShareAlike 2.0 license. http://creativecommons.org/licenses/by-sa/2.0/ This document describes the mozilla tree structure, i.e. the purpose of the directories under mozilla/. Note that there is also another doc, http://www.mozilla.org/docs/source-directories-overview.html, with similar purpose. I was not aware of that document when writing this one. Also note that some of these descriptions may be SeaMonkey centric; i.e., corresponding code for Firefox may live in other directories. Finally note that the list of directories is based on a checkout by client.mk. The mozilla.org CVS repository contains more directories which are not described here. Those are not part of the mozilla build. This document is now replaced by http://developer.mozilla.org/en/docs/Mozilla_Source_Code_Directory_Structure But these things here still have to be incorporated into that doc: ---- Comments on this doc, that I will incorporate at some point: timeless lib is almost entirely dead timeless it was the old structure for classic timeless sun-java is probably mostly in case people want to support oji w/o grabbing files from sun timeless and it probably doesn't work :) timeless plugin/oji contains _implementations_ of oji plugins (macintosh runtime for java) timeless xpinstall should be documented for more directories timeless there's /packager/ which builds xpis for distribution timeless there's /wizard/ which is the standalone frontends timeless /src/ is the shared implementation (used both by gecko and wizard) timeless and /cleanup/ is for after xpis run timeless /public/ is of course the interfaces, except for xpinstall.js ---- accessible Files for accessibility (i.e. MSAA (Microsoft Active Accessibility), ATK (Accessibility Toolkit, used by GTK+ 2) support files) http://www.mozilla.org/projects/ui/accessibility/ browser Firefox-specific frontend files. build Misc. files used by the build process calendar Implementation of the Calendar, originally created by OEone. See http://www.mozilla.org/projects/calendar. caps capability-based web page security management caps contains C++ interfaces and code for determining the capabilities of content based on the security settings or certificates (e.g. VeriSign). http://www.mozilla.org/projects/security/components/ chrome Chrome registry used with toolkit/. config More files used by the build process, common includes for the makefiles, etc content Files for the content tree generated from page source codes. Much of the implementation of DOM interfaces is under this directory. db Container for database-accessing modules. Currently contains mork and sqlite. db/mdb db/mork Implementation of Mork, a textual format for databases. Used for example to store the global history. db/sqlite3 The SQLite database, used by storage. Planned to supersede mork. dbm Source code of the berkeley database library, hacked from the 4.4BSD version. Used mainly by NSS code as certificate store. directory LDAP support for Mozilla. Used in mailnews. docshell Implementation of the docshell, the main object managing things related to a document window. Each frame has its own docshell. Contains methods for loading URIs, managing URI content listeners, etc. dom Contains the DOM interfaces used by mozilla and the basics of the implementation of the document object model. Most of the interfaces are implemented in content/ rather than here. editor Source code for the editor used by Mozilla, both back- and frontend. This is not only used for mail composer and the page editor composer, but also for rich text editing inside webpages (http://www.mozilla.org/editor/midas-spec.html), and each textarea or input field is also using such an editor (in the plaintext variant). http://www.mozilla.org/editor/ embedding XXX this needs a description http://www.mozilla.org/projects/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/access-builtin XXX document me extensions/auth Implementation of the negotiate auth method for HTTP and other protocols. Has code for SSPI, GSSAPI, etc. http://www.mozilla.org/projects/netlib/integrated-auth.html extensions/cck The Client Customization Kit, Firefox version. This is actually a rewrite of Netscape's CCK which shares little more than the name and purpose with the code in cck/. http://www.mozilla.org/projects/cck/firefox/ 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/editor csseditor support (?) 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. http://www.mozilla.org/projects/help-viewer/ extensions/inspector DOM Inspector is a tool that can be used to inspect and edit the live DOM of any web document or XUL file. http://www.mozilla.org/projects/inspector/ extensions/irc This is ChatZilla, the IRC (Internet Relay Chat) component. http://www.mozilla.org/projects/rt-messaging/chatzilla/ extensions/java XPCOM<->Java bridge ("JavaXPCOM", formerly known as Javaconnect). Unrelated to the code in java/. extensions/layout-debug 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 The Lightning project, "an extension to tightly integrate calendar functionality (scheduling, tasks, etc.) into Thunderbird." http://wiki.mozilla.org/Calendar:Lightning extensions/manticore C# based Gecko embedding. Also embeds Trident. Probably obsolete? extensions/mono A two-way bridge between the CLR/.NET/Mono/C#/etc. world and XPCOM. extensions/p3p Implementation of W3C's Platform for Privacy Preferences standard. http://www.mozilla.org/projects/p3p/ extensions/permissions XXX writeme extensions/pref Preference-related extensions: o autoconfig XXX what does this do? is it the lock_pref stuff? Could be downloading preferences from remote servers (like LDAP) o system-pref Support for using OS-wide preferences in Mozilla, mainly for GConf (Gnome) extensions/python Support for implementing XPCOM components in python. extensions/reporter An extension to report problems with web pages. Client-side part. http://reporter.mozilla.org/app/ extension/schema-validation Allows validating XML trees according to specified XML Schemas. extension/spatialnavigation Spatial navigation, navigating between links of a document according to their on-screen position. http://www.mozilla.org/access/keyboard/snav/ extensions/spellcheck Spellchecker for mailnews and composer. Also used for spellchecking of textareas. extensions/sql Support for accessing SQL databases from XUL applications. http://www.mozilla.org/projects/sql/ extensions/sroaming Session roaming, i.e. support for storing a profile on a remote server. extensions/tasks Support for launching OS-provided tasks, like a calendar. extensions/transformiix XSLT support. XSL Transformations is a language used to transform XML document into other XML documents. http://www.mozilla.org/projects/xslt/ extensions/tridentprofile Support for importing profiles from MSIE. extensions/typeaheadfind Find As You Type allows quick web page navigation when you type a succession of characters in the body of the displayed page http://www.mozilla.org/projects/ui/accessibility/typeaheadfind.html extensions/universalchardet Universal character set detector. extensions/venkman The JavaScript Debugger http://www.mozilla.org/projects/venkman/ extensions/wallet Password and Form Manager extensions/webdav WebDAV code; exposes special APIs for accessing WebDAV servers. Used by the Calendar project. extensions/webservices Support for Webservices. http://www.mozilla.org/projects/webservices/ extensions/xforms Code for the XForms extension. http://www.mozilla.org/projects/xforms/ extensions/xmlextras Several XML-related extensions. http://www.mozilla.org/xmlextras/ extensions/xml-rpc XML Remote Procedure Calls. Unowned these days. http://www.mozilla.org/projects/xmlrpc/ extensions/xmlterm XMLTerm, a terminal implemented using mozilla technology. Only available on GTK builds. gc Container for garbage collection libraries, currently only boehm GC. gc/boehm Source code of boehm gc, not compiled by default. Used to be used for leak detection. gfx The mozilla interface to a platform's graphics toolkit. Contains methods to draw images onto a rendering context, as well as graphics primitives like lines, circles etc. Also contains text rendering functions. It's also the home of the new graphics architecture based on cairo (via a C++ wrapper called thebes). http://wiki.mozilla.org/Mozilla2:NewGFXAPIs http://wiki.mozilla.org/Mozilla2:GFXEvolution intl Internationalization support. Things like changing the case of unicode strings, line breakers, character set conversions, line/word breakers, etc. http://www.mozilla.org/projects/intl/index.html ipc Container for implementations of IPC (Inter-Process Communication) mechanisms. ipc/ipcd The IPC daemon that's 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 Source code of libjpeg, used by the mozilla image library. js/src The JavaScript engine, also known as Spidermonkey. See http://www.mozilla.org/js/ js/jsd Javascript debugging library. http://www.mozilla.org/js/jsd/ js/src/xpconnect Support code for calling JS Code from C++ code and C++ code from JS Code, using XPCOM interfaces. http://www.mozilla.org/scriptable/ js/src/liveconnect Liveconnect, the bridge between JS and Java code. http://www.mozilla.org/js/liveconnect/ l10n Basically empty and not used by the mozilla build. layout Layout code. This is code that's responsible for displaying the content tree on the screen. http://www.mozilla.org/newlayout/ lib Mostly unused; might be used on mac? mail Thunderbird frontend files. Note that many thunderbird files are shared with Mozilla Mailnews and can be found under mailnews/. mailnews The MailNews part of Mozilla. Most of this code is also used by Thunderbird. modules/libimg Contains libpng, used by the image library for PNG Image decoding. modules/libjar Code to read zip files, used for reading the .jar files that contain the files for the mozilla frontend. modules/libpr0n Image rendering library. Contains decoders for the image formats mozilla supports. modules/libpref Library for reading and writing preferences. modules/libreg Library for reading the netscape binary registry files, used for the ~/.mozilla/appreg file (registry.dat on windows). modules/libutil XXX what's this?? modules/oji Support for the java plugin. http://www.mozilla.org/oji/ modules/plugin Plugin support. Implements the Netscape Plugin-API NPAPI http://www.mozilla.org/projects/plugins/ modules/staticmod Helper files for static mozilla builds modules/zlib Source code of zlib, used at least in the networking library for compressed transfers. netwerk Networking library. Reponsible for doing actual transfers from and to servers, as well as for URI handling and related stuff. http://www.mozilla.org/projects/netlib/ nsprpub Netscape Portable Runtime. Used as an abstraction layer to things like threads, file I/O and socket I/O. http://www.mozilla.org/projects/nspr/ other-licenses Contains libraries that are not covered by the MPL but used in some mozilla code. parser/expat Copy of the expat source code, which is the XML parser used by mozilla. parser/htmlparser Contains the html parser used by Mozilla, which parses HTML source code and calls the appropriate methods on a content sink. plugin XXX what's this, and how does it relate to modules/oji? profile Code for profile handling, the profile manager backend and frontend. rdf RDF handling APIs. http://www.mozilla.org/rdf/doc/ security Contains NSS and PSM, to support cryptographic functions in mozilla (like S/MIME, SSL, etc). http://www.mozilla.org/projects/security/pki/nss/ http://www.mozilla.org/projects/security/pki/psm/ storage XPCOM wrapper for sqlite. Wants to unify storage of all profile-related data. Supersedes mork. http://wiki.mozilla.org/Mozilla2:Unified_Storage suite Newer parts of SeaMonkey-specific code. Older parts live in xpfe/. sun-java XXX another java directory? themes Contains the themes shipped with SeaMonkey. Classic and Modern at the time of this writing. toolkit The "new toolkit" used by Thunderbird, Firefox, etc. tools Some tools which are optionally built during the mozilla build process, mostly used for debugging. uriloader/base Content dispatch in Mozilla. Used to load uris and find an appropriate content listener for the data. Also manages web progress notifications. http://www.mozilla.org/docs/docshell/uri-load-start.html http://www.mozilla.org/docs/url_load.html uriloader/exthandler 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 Service to prefetch documents in order to have them cached for faster loading. view View manager. Handles opacity, z-index etc. webshell Contains webshell-related interfaces. XXX this is a useless description Eventually, this should be moved into docshell/. widget Interface to the OS-provided widgets like windows, filepickers, etc. xpcom Cross-Platform Component Object Model. Also contains data structures used by the rest of the mozilla code. http://www.mozilla.org/projects/xpcom/ xpfe XPFE is the Mozilla frontend. It contains the XUL files for the browser interface, as well as common files used by the other parts of the mozilla suite. xpfe/components Components used by the Mozilla frontend, as well as implementations of interfaces that other parts of mozilla expect. xpfe/bootstrap 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 Contains the installer code, as well as the XPI handling functions. http://www.mozilla.org/projects/xpinstall/