Version 1 (modified by Meeh, 9 months ago) (diff)

I2P Browser source directory overview

This article provides an overview of what the various directories in the I2P Browser source code directories contains.

The code for all projects in the Mozilla family (such as Firefox, Thunderbird, etc.) is combined into a single source tree. The tree contains the source code as well as the code required to build each project on supported platforms (Linux, Windows, macOS, etc). This document describes the directory structure that can be pulled by — i.e., directories that are used by at least some of the Mozilla project's client products. There are other directories in the Mozilla CVS repository, such as those for Web tools and those for the Classic codebase.

Root directory


Configuration files for the Cargo package manager.


Configuration files used by the Visual Studio Code IDE when working in the mozilla-central tree.


Files for accessibility (i.e., MSAA (Microsoft Active Accessibility), ATK (Accessibility Toolkit, used by GTK+ 2) support files). See Accessibility.


The add-on SDK for creating Firefox add-ons using standard Web Technologies.


Contains the front end code (in XUL, Javascript, XBL, and C++) for the Firefox browser. Many of these files started off as a copy of files in xpfe/.


Contains PDF.js and Shumway built-in extensions.


Contains images and CSS files to skin the browser for each OS (Linux, Mac and Windows)


Miscellaneous files used by the build process. See also config/.


Capability-based web page security management. It contains C++ interfaces and code for determining the capabilities of content based on the security settings or certificates (e.g., VeriSign?). See Component Security.


Chrome registry (See here) used with toolkit/. These files were originally copies of files in rdf/chrome/ (SeaMonkey? still uses these).


More files used by the build process, common includes for the makefiles, etc. See also build/.


Container for database-accessing modules.


The SQLite database, used by storage.


The Firefox Developer Tools server and client components.


Implementation of the docshell, the main object managing things related to a document window. Each frame has its own docshell. It contains methods for loading URIs, managing URI content listeners, etc. It is the outermost layer of the embedding API used to embed a Gecko browser into an application.


IDL definitions of the interfaces defined by the DOM specifications and Mozilla extensions to those interfaces (implementations of these interfaces are primarily, but not completely, in content/). The parts of the connection between JavaScript? and the implementations of DOM objects that are specific both to JavaScript? and to the DOM. (The parts that are not DOM-specific, i.e., the generic binding between XPCOM and JavaScript?, live in js/src/xpconnect/.) Implementations of a few of the core "DOM Level 0" objects, such as window, window.navigator, window.location, etc.


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.


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 This directory contains IDL, headers, and support files needed in order to embed Gecko in applications.


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.


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


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


Preference-related extensions.


Spellchecker for mailnews and composer.


Detects the character encoding of text.


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.