<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://roshaanahmad.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://roshaanahmad.com/" rel="alternate" type="text/html" /><updated>2026-04-14T10:42:44+00:00</updated><id>https://roshaanahmad.com/feed.xml</id><title type="html">Roshaan’s Homepage</title><subtitle>Roshaan&apos;s academic portfolio</subtitle><author><name>ROSHAAN AHMAD</name><email>roshaan@roshaanahmad.com</email></author><entry><title type="html">My First Contributions to Mozilla Firefox: Setup, Fixes, and the Lessons I Learned</title><link href="https://roshaanahmad.com/posts/2026/04/My-First-Contributions-to-Mozilla-Firefox/" rel="alternate" type="text/html" title="My First Contributions to Mozilla Firefox: Setup, Fixes, and the Lessons I Learned" /><published>2026-04-01T00:00:00+00:00</published><updated>2026-04-01T00:00:00+00:00</updated><id>https://roshaanahmad.com/posts/2026/04/My-First-Contributions-to-Mozilla-Firefox</id><content type="html" xml:base="https://roshaanahmad.com/posts/2026/04/My-First-Contributions-to-Mozilla-Firefox/"><![CDATA[<p>Contributing to <strong>Mozilla Firefox</strong> has been one of the most valuable experiences in my journey as a developer. It gave me firsthand exposure to how a large-scale, production-grade open-source project is structured, maintained, and collaboratively improved by contributors around the world.</p>

<p>This blog documents my experience setting up the Firefox codebase locally, understanding its architecture, and contributing multiple frontend fixes as part of my open-source journey.</p>

<hr />

<h2 id="setting-up-firefox-locally">Setting Up Firefox Locally</h2>

<p>Setting up Firefox locally was one of the most challenging yet educational parts of my journey. Unlike smaller projects, Firefox is a massive codebase with many dependencies, build tools, and platform-specific configurations.</p>

<p>I followed the official <a href="https://firefox-source-docs.mozilla.org/setup/linux_build.html">Firefox build documentation for Linux</a> and carefully prepared my environment step by step.</p>

<h3 id="1-system-preparation">1. System Preparation</h3>

<p>To build Firefox, it is necessary to have Python version 3.9 or later installed. Python 2 is no longer required for building Firefox, although it is still needed for running some types of tests. Additionally, you may need Python development files to install certain pip packages.</p>

<p>You should be able to install Python and Git using your system package manager:</p>

<ul>
  <li>
    <p>For Debian-based Linux (such as Ubuntu):
<code class="language-plaintext highlighter-rouge">sudo apt update &amp;&amp; sudo apt install curl python3 python3-venv git</code></p>
  </li>
  <li>
    <p>For Fedora Linux:
<code class="language-plaintext highlighter-rouge">sudo dnf install python3 git</code></p>
  </li>
</ul>

<hr />

<h3 id="2-bootstrap-a-copy-of-the-firefox-source-code">2. Bootstrap a Copy of the Firefox Source Code</h3>

<p>The second step is to bootstrap a copy of the Firefox source code.</p>

<p>Now that your system is ready, you can download the source code and allow Firefox to automatically fetch the dependencies it needs. The following command will download a large amount of data (including years of Firefox history) and guide you through an interactive setup process.</p>

<p>Firefox provides a bootstrap script that simplifies environment setup. Running this script helped configure most dependencies automatically and guided me through the required installations.</p>

<p>This step significantly reduced manual setup complexity and ensured my environment matched the expected build configuration.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl -LO https://raw.githubusercontent.com/mozilla-firefox/firefox/refs/heads/main/python/mozboot/bin/bootstrap.py

python3 bootstrap.py
</code></pre></div></div>

<h4 id="choosing-a-build-type">Choosing a Build Type</h4>

<p>If you aren’t modifying the Firefox backend, you can select one of the <a href="https://firefox-source-docs.mozilla.org/contributing/build/artifact_builds.html#understanding-artifact-builds">Artifact Mode</a> options. If you are building Firefox for Android, you should refer to the <a href="https://firefox-source-docs.mozilla.org/mobile/android/geckoview/contributor/geckoview-quick-start.html#geckoview-contributor-guide">GeckoView Contributor Guide</a>.</p>

<hr />

<h3 id="3-building-firefox">3. Building Firefox</h3>

<p>After setup, and once your system is bootstrapped, you should be able to build Firefox.</p>

<p>I built Firefox locally using the following commands:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">cd </span>firefox
git pull
./mach build
</code></pre></div></div>

<ul>
  <li>The first build took a significant amount of time due to compiling the entire codebase.</li>
  <li>Subsequent builds were faster using incremental compilation.</li>
  <li>Once the build completed successfully, I was able to run a local version of Firefox.</li>
</ul>

<p>🎉 Congratulations! You’ve built your own Firefox. You should see a success message in your terminal after the build completes.</p>

<p>You can now run your locally built browser using: <code class="language-plaintext highlighter-rouge">./mach run</code></p>

<p>😎 Seeing the browser launch from my own build was a very rewarding moment and gave me the confidence to start contributing.</p>

<p><strong>Note:</strong> If you encounter build errors, refer to the <a href="https://firefox-source-docs.mozilla.org/setup/linux_build.html#troubleshooting">official troubleshooting documentation</a>.</p>

<hr />

<h2 id="the-contribution-phase">The Contribution Phase</h2>

<p>Now the fun begins — time to start contributing!</p>

<p>At this stage, you should join <a href="https://chat.mozilla.org/">Matrix</a> and introduce yourself in the <a href="https://chat.mozilla.org/#/room/#introduction:mozilla.org">Introduction Channel</a>.</p>

<h3 id="1-start-looking-for-beginner-friendly-bugs">1. Start Looking for Beginner-Friendly Bugs</h3>

<p>You can search for beginner-friendly bugs on the <a href="https://codetribute.mozilla.org/">contribute</a> page based on your tech stack. After finding a bug, create an account on <a href="https://bugzilla.mozilla.org/">Bugzilla</a> and request a mentor to assign it to you. Once assigned, you can begin working on it.</p>

<hr />

<h3 id="2-understanding-the-large-codebase">2. Understanding the Large Codebase</h3>

<p>One of the key lessons I learned is that large open-source projects are not just about writing code—they are about understanding patterns, conventions, and existing architecture before making changes.</p>

<p>Your next step is to familiarize yourself with the codebase. Two tools that helped me significantly are:</p>

<ul>
  <li><a href="https://searchfox.org/"><strong>Searchfox</strong></a> – a source code indexing tool for Firefox</li>
  <li><a href="https://firefox-source-docs.mozilla.org/devtools-user/browser_toolbox/index.html"><strong>Browser Toolbox</strong></a> – allows you to debug the browser’s internal JavaScript and UI</li>
</ul>

<p>The Browser Toolbox works on the entire browser context, not just a single webpage, which makes it very powerful for debugging frontend issues.</p>

<p><strong>Note:</strong> If you are unsure about what changes to make, use the <em>needinfo</em> feature on Bugzilla to ask your mentor for clarification.</p>

<hr />

<h3 id="3-writing-and-submitting-a-patch">3. Writing and Submitting a Patch</h3>

<p>After identifying the files that need changes, follow this workflow:</p>

<h4 id="start-from-the-main-branch">Start from the main branch</h4>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git checkout main
git pull
</code></pre></div></div>

<h4 id="create-a-new-branch-for-your-bug">Create a new branch for your bug</h4>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git checkout <span class="nt">-b</span> Bug-XXXXXXX
</code></pre></div></div>

<h4 id="make-your-changes-and-prepare-to-commit">Make your changes and prepare to commit</h4>

<h4 id="commit-your-changes">Commit your changes</h4>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git add &lt;file&gt;
git commit <span class="nt">-m</span> <span class="s2">"Bug XXXXXXX - Description of fix"</span>
</code></pre></div></div>

<h4 id="submit-to-phabricator">Submit to Phabricator</h4>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>moz-phab submit <span class="nt">--no-wip</span>
</code></pre></div></div>

<hr />

<h2 id="my-contributions-to-firefox">My Contributions to Firefox</h2>

<p>After getting comfortable with the setup, I started working on small but meaningful issues. My goal was to begin with manageable tasks while learning the contribution workflow.</p>

<h3 id="1-add-tab-note-background-color-for-default-light-theme-d290018">1. Add tab note background color for default light theme <a href="https://github.com/mozilla-firefox/firefox/commit/6fcae532ae2d">D290018</a></h3>

<p>Contributed a UI improvement by adding a proper background color for tab notes in the default light theme.
This improved visual consistency and readability by ensuring tab notes remain distinguishable from the tab background.</p>

<hr />

<h3 id="2-fix-typo-in-openintabsutilssysmjs--confirmopenintabs-d291855">2. Fix typo in OpenInTabsUtils.sys.mjs – confirmOpenInTabs() <a href="https://github.com/mozilla-firefox/firefox/commit/0a0a5196de8e">D291855</a></h3>

<p>Fixed a typo in the <code class="language-plaintext highlighter-rouge">confirmOpenInTabs()</code> function, improving code clarity and maintainability.
Although a small change, it contributes to overall code quality in a commonly used utility module.</p>

<hr />

<h3 id="3-fix-splitter-border-lines-and-tab-screen-corner-issue-in-split-view-d292101">3. Fix splitter border lines and tab-screen corner issue in split view <a href="https://github.com/mozilla-firefox/firefox/commit/b0c06ce109fb">D292101</a></h3>

<p>Resolved a UI rendering issue where splitter borders and tab corners were misaligned.
Tested across different window sizes and operating systems (Windows and Linux) to ensure consistent behavior.</p>

<hr />

<h2 id="challenges-i-faced">Challenges I Faced</h2>

<p>Working on Firefox was not easy, especially as a first-time contributor to such a large codebase.</p>

<p>Some of the main challenges included:</p>

<ul>
  <li>Setting up the build environment correctly</li>
  <li>Understanding a large and complex code structure</li>
  <li>Locating the correct files for specific UI components</li>
  <li>Ensuring changes did not introduce unintended side effects</li>
</ul>

<p>Each challenge helped me improve my debugging skills and think more carefully before making changes.</p>

<hr />

<h2 id="what-i-learned">What I Learned</h2>

<p>This experience taught me much more than just coding. I learned:</p>

<ul>
  <li>How large-scale open-source projects are structured and maintained</li>
  <li>How to read and navigate unfamiliar codebases efficiently</li>
  <li>The importance of incremental changes and careful testing</li>
  <li>How to follow real-world contribution workflows</li>
  <li>How to communicate and collaborate as a contributor</li>
</ul>

<p>Most importantly, I learned how to stay consistent and patient while working through uncertainty. Open source is not about immediate results—it is about persistence and continuous improvement.</p>

<hr />

<h2 id="final-thoughts">Final Thoughts</h2>

<p>Contributing to Firefox has been one of the most valuable learning experiences in my journey so far. It gave me real exposure to professional open-source development and helped me understand what it means to work on software used by millions of people.</p>

<p>I am still at the beginning of my journey, but this experience has given me the confidence to continue contributing to impactful open-source projects.</p>

<hr />]]></content><author><name>ROSHAAN AHMAD</name><email>roshaan@roshaanahmad.com</email></author><category term="Mozilla Firefox" /><category term="Open-Source" /><category term="Outreachy" /><summary type="html"><![CDATA[Contributing to Mozilla Firefox has been one of the most valuable experiences in my journey as a developer. It gave me firsthand exposure to how a large-scale, production-grade open-source project is structured, maintained, and collaboratively improved by contributors around the world.]]></summary></entry></feed>