Eitan Isaacson cf6484047a Bug 1898096 - Replace color settings with "contrast control". r=emilio,fluent-reviewers,settings-reviewers,accessibility-frontend-reviewers,morgan,bolsson,masayuki,mossop,pdfjs-reviewers,calixte
This patch changes the backing prefs by relying on the tristate offered
by browser.display.document_color_use instead of
browser.display.use_system_colors. This simplifies the color
decision tree, and offers a simplified UI.

The tristate preference offered to the user is as follows:
 1. "Use platform's contrast settings" (document_color_use=0)
 2. "Off" - never use HCM, regardless of platform setting (document_color_use=1)
 3. "On" - always use HCM, regardless of platform setting (document_color_use=2)

Option 3 also reveals a colors UI for the user to choose the palette the
browser HCM will use (bg/text/link/visited).

There are three color palettes to choose from in light of the preference
above they are:
 1. WIDGET_COLORS: The OS's configured colors used by its theme.
 2. HARDCODED_COLORS: Colors deemed as standard and are hard coded into
    Firefox (eg. white on black text, blue and purple links).
 3. PREFERENCE_COLORS: Colors that are stored in preferences and are
    configurable from the colors UI (eg. browser.visited_color and
    browser.display.background_color)

The decision over which palette to use is as follows:
 * If we are styling browser UI -> WIDGET_COLORS
 * else, if resist fingerprinting is enabled -> HARDCODED_COLORS
 * else, if document_color_use==0 AND OS HCM is on -> WIDGET_COLORS
 * else, if document_color_use==2 -> PREFERENCE_COLORS
 * else -> HARDCODED_COLORS

Differential Revision: https://phabricator.services.mozilla.com/D211115
2025-03-05 19:18:08 +00:00

An explanation of the Firefox Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://firefox-source-docs.mozilla.org/contributing/directory_structure.html

For information on how to build Firefox from the source code and create the patch see:

    https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html

If you have a question about developing Firefox, and can't find the solution
on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel.


Nightly development builds can be downloaded from:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    https://www.mozilla.org/firefox/channel/desktop/#nightly

Keep in mind that nightly builds, which are used by Firefox developers for
testing, may be buggy.
Description
Preconfigured browser for YouTube's TV interface
Readme 5.5 GiB
Languages
JavaScript 32.6%
C++ 25.1%
HTML 20.9%
C 10.6%
Python 2.8%
Other 7.6%