Firefox Source Docs Logo

Quick search

Overview

  • A Glossary of Common Terms
  • A Quick Guide to Mozilla Applications

Getting Started

  • Getting Set Up To Work On The Firefox Codebase

Working On Firefox

  • Working on Firefox
  • Bug Handling

Firefox User Guide

  • Firefox DevTools User Docs

Source Code Documentation

  • Governance
  • Firefox Front-end
  • DOM
  • Editor
  • Style system (CSS) & Layout
  • Graphics
  • Processes, Threads and IPC
  • Firefox DevTools Contributor Docs
  • Toolkit
  • SpiderMonkey
  • JS Loader
  • GeckoView
  • Fenix
  • Focus for Android
  • WebIDL
  • libpref
  • Networking
  • Remote Protocols
  • Services
  • Permissions
  • File Handling
  • Firefox on macOS
  • Firefox on Windows
  • Firefox AI Runtime
  • Accessibility
  • Media Playback
  • Code quality
    • Static Analysis
    • Linting
    • Coding style
      • Getting Help
        • C++ Coding style
        • Mode line
        • Java Coding style
        • JavaScript Coding style
        • Python Coding style
        • CSS Guidelines
        • Formatting C++ Code With clang-format
        • RTL Guidelines
        • SVG Guidelines
        • Using C++ in Mozilla code
  • Writing Rust Code
  • Rust Components
  • Gecko Profiler
  • Performance
  • Database bindings (SQLite, KV, …)
  • XPCOM
  • NSPR
  • Network Security Services (NSS)
  • Web Security Checks in Gecko

The Firefox Build System

  • Mach
  • Pushing to Try
  • Build System
  • Firefox CI and Taskgraph
  • Managing Documentation
  • Vendoring Third Party Components

Testing & Test Infrastructure

  • Automated Testing
  • Understanding Treeherder Results
  • Sheriffed intermittent failures
  • Turning on Firefox tests for a new configuration
  • Avoiding intermittent tests
  • Testing Policy
  • Configuration Changes
  • Browser chrome mochitests
  • Chrome Tests
  • Marionette
  • geckodriver
  • Test Verification
  • WebRender Tests
  • Mochitest
  • XPCShell tests
  • TPS
  • web-platform-tests
  • GTest
  • Fuzzing
  • Sanitizer
  • Performance Testing
  • Code coverage
  • Testing & Debugging Rust Code

Releases & Updates

  • Mozilla Update Infrastructure
  • Watershed Updates
  • Desupport Updates
  • Update Verify

Localization & Internationalization

  • Internationalization
  • Localization

Firefox and Python

  • mozbase
  • Using third-party Python packages

Metrics Collected in Firefox

  • Metrics
Firefox Source Docs
  • Code quality
  • Coding style
  • Report an issue / View page source

Coding style

Firefox code is using different programming languages. For each language, we are enforcing a specific coding style.

Getting Help

If you need help or have questions, please don’t hesitate to contact us via Matrix in the “Lint and Formatting” room (#lint:mozilla.org).

Coding Style User Guide

  • C++ Coding style
    • Formatting code
    • Static analysis
    • Additional rules
    • C/C++ practices
    • Header files
    • Include directives
    • COM and pointers
    • IDL
    • Error handling
    • Strings
    • Usage of PR_(MAX|MIN|ABS|ROUNDUP) macro calls
    • Use of SpiderMonkey rooting typedefs
  • Mode line
  • Java Coding style
  • JavaScript Coding style
    • Coding style
    • Methods and functions
    • JavaScript objects
    • Operators
    • Literals
    • Prefixes
    • Other advice
  • Python Coding style
    • Coding style
    • Linting
    • Indentation
    • Other advice
  • CSS Guidelines
    • Basics
    • Formatting
    • Overriding CSS
    • Using CSS variables
    • Localization
    • Writing cross-platform CSS
    • Theme support
    • Layout & performance
    • Misc
  • Formatting C++ Code With clang-format
    • Manual formatting
    • Editor integration
    • Ignore lists
  • RTL Guidelines
    • Mirroring layout
    • Mirroring elements
    • LTR text inside RTL contexts
    • Testing
    • See also
    • Credits
  • SVG Guidelines
    • Pros and cons of SVG for images
    • Authoring guidelines
  • Using C++ in Mozilla code
    • C++ language features
    • C++ and Mozilla standard libraries
    • Further C++ rules
    • Stuff that is good to do for C or C++
Previous Next

Built with Sphinx using a theme provided by Read the Docs.