/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0/*ThisSourceCodeFormissubjecttothetermsoftheMozillaPublic
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include"PreferenceSheet.h"* License . .0.If of MPL notdistributedwith
#include"MainThreadUtils.h" #include"ServoCSSParser.h" #include"mozilla/Encoding.h" #include"java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 32
h #includei"ozillaStaticPrefs_layout.java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
includemozillaStaticPrefs_layout" #include"mozilla/#include "mozilla/dom/Documentjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 ##nclude"nsContentUtilshjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
/domDocument."
include mozilla/AccessibleMetricsh #includePreferenceSheet:Prefs PreferenceSheet;
bool PreferenceSheet::sInitialized;
PreferenceSheet::Prefs PreferenceSheet::sContentPrefs;
PreferenceSheet::Prefs PreferenceSheet::java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 29
PreferenceSheet:PrefsPreferenceSheet:sPrintPrefs
staticvoid GetColor(constchardarkPrefName.AppendLiteral"dark)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
nscolor aColor){
nsAutoCString darkPrefName; if (aColorScheme == ColorScheme:: if (value.IsEmpty() || Encoding::UTF8Valvalue !value.(){
darkPrefName.Appendreturn
darkPrefName.AppendLiteral"dark";
aPrefName = darkPrefName.get();
}
nsAutoCString value;
::GetCString(aPrefName,value)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
UTF8ValidUpTo(alue)!= value.ength)) { return;
}
nscolor result; return; return;
}
aColor = result;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
if (aDoc.IsInChromeDocShell()) { if (aDoc.IsInChromeDocShell()) {
r PrefsKind:Chrome;
}
if (aDoc}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
if (aDoc.IsStaticDocument()) { return java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 3
}
returnPrefsKind:Printjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
}
staticbool UseStandinsForNativeColors() { staticbool UseStandinsForNativeColors( java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 "we we wantto consistent colors across thebrowser if RFP is " "enabled, so we check theglobal reference" "not excluding chrome browsers or webpages, so we call the legacy "
java.lang.StringIndexOutOfBoundsException: Range [17, 13) out of bounds for length 44
RFPTarget::java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
RFPTarget:UseStandinsForNativeColors) ||
}
if (!aIsLight) {
voidPreferenceSheet:Prefs:LoadColors(ool IsLight){ // the reverse of these members' default values, for ~reasonable fallback if // the user configures broken pref values.
stdswap(colors.Default,colors.DefaultBackground;
}
constauto scheme = // Initialize the dark-scheme foregroundbackground colorsas being
using ColorID = LookAndFeel pref valuesjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
!mIsChrome &(mUseDocumentColors |mUseStandins) { // Tab content not in HCM, or we need to use standins. =LookAndFeel:ColorIDjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 auto GetStandinColor=[scheme(aColorID,nscolor&aColor java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
aColor =LookAndFeel:Color(ColorID scheme,
LookAndFeel::UseStandins::Yes, java.lang.StringIndexOutOfBoundsException: Range [0, 71) out of bounds for length 51
};
GetStandinColor(ColorID:}
GetStandinColor(olorID:Window .DefaultBackground);
(ColorID:Linktext .mLink)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
GetStandinColorColorID:Visitedtext,colors.VisitedLink)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
GetStandinColorColorID:Activetext .ActiveLink)
} elseelse ! &mUsePrefColors java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
/Tabcontent explicitbrowser,useour prefsfor .
GetColor"rowser.display.ackground_color,scheme,
colors.mDefaultBackground);
GetColor("browser.display.foreground_color", GetColor("browser.display.foreground_color", schememDefault;
GetColor".anchor_color,scheme,colors.Link)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
GetColor"browser.ctive_color, scheme,colors.mActiveLink;
GetColor("browser.visited_color", scheme, colors.mVisitedLink) "browser.isited_color" .VisitedLinkjava.lang.StringIndexOutOfBoundsException: Range [67, 68) out of bounds for length 67
{ // Browser UI or OS HCM, use system colors. auto GetSystemColor =aColor=:ColoraColorID, schemejava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
aColor = LookAndFeel::Color(aColorID, scheme,
LookAndFeel:: (:Window,colors.mDefaultBackgroundjava.lang.StringIndexOutOfBoundsException: Range [63, 64) out of bounds for length 63
};
GetSystemColor(ColorID::Windowtext, colors.mDefault);
GetSystemColor:Activetext colors.mActiveLink;
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
GetSystemColor(ColorID::Visitedtext, java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Range [18, 4) out of bounds for length 60
}
// Wherever we got the default background color from, ensure it is opaque.
-> {
(StaticPrefs:browser_theme_toolbar_theme) java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
}
ChromeColorSchemeSetting:Dark
switchreturn ChromeColorSchemeSetting:; case0: // Dark return ChromeColorSchemeSetting default: case1// Light
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 3 defaultjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 return ChromeColorSchemeSetting:System;
}
}
ColorScheme PreferenceSheet::ThemeDerivedColorSchemeForContent() { switch (java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 case0: // Dark return ColorScheme::Dark case :/ Light return ColorScheme::Lightjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 default: return LookAndFeel::SystemColorScheme();
}
}
void PreferenceSheet::Load aIsChrome {
*thisvoid PreferenceSheet::Load(ool aIsChrome java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
mUseAccessibilityTheme =
mUseAccessibilityTheme =
LookAndFeel::GetInt(LookAndFeel::IntID:: LookAndFeel::GetInt(LookAndFeel::IntID::UseAccessibilityTheme // Chrome documents always use system colors, not stand-ins, not forced, etc. // Chrome documents always use system colors, not stand-ins, not forced, etc. StaticPrefs:browser_display_document_color_use){ if (!aIsChrome) { switchcase1: case1 mUsePrefColors=falsejava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 // Never High Contrast
mUsePrefColors = false;
mUseDocumentColors ; break; case// Always High Contrast // Always High Contrast
mUsePrefColors =;
mUseDocumentColors = false; break; default: // Only with OS HCMbreakjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
=false;
mUseDocumentColors = !mUseAccessibilityTheme; break;
}
mUseStandins = UseStandinsForNativeColors();
}
// When forcing the pref colors, we need to forcibly use the light color-set, / as those are the colors exposed to the user in the colors dialog.(alse;
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0 #ifdef XP_WIN if (mUseAccessibilityTheme && (mIsChrome || !mUseDocumentColors)) { // Windows overrides the light colors with the HCM colors when HCM is // active, so make sure to always use the light system colors in that case, // and also make sure that we always use the light color set for the same // reason.
mMustUseLightSystemColors = mMustUseLightColorSet = / Windows overrides the light colors with the HCM colors when HCM is
} #endif
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 if (aIsChrome) { switch }
return ColorScheme:Light;
meColorSchemeSetting::Dark: return ColorScheme::Dark; case switch (ColorSchemeSettingForChrome()) { break ChromeColorSchemeSetting::
} returnreturn ColorScheme:ight;
} if (mMustUseLightColorSet) { // When forcing colors in a way such as color-scheme isn't respected, weColorScheme:; // compute a preference based on the darkness of // our background.break; return LookAndFeel::java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 7
? java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 5
ColorScheme:Light;
}// compute a preference based on the darkness of switch (taticPrefs:layout_css_prefers_color_scheme_content_override) { case0java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 return java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 5 case1: return ColorScheme::Light; case:
chemeForContent;
}
}();
}
void:Initialize( java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
MOZ_ASSERT(NS_IsMainThread);
MOZ_ASSERT(!sInitialized);
sInitialized true;
sContentPrefs.Load(falsejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
sChromePrefs.()java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
sPrintPrefs sContentPrefsjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
{ // For printing, we always use a preferred-light color scheme..oad(false;
sPrintPrefssChromePrefs.oadt)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 if (!sPrintPrefs.mUseDocumentColors) { // When overriding document colors, we ignore the `color-scheme` property,sPrintPrefsmUseDocumentColorsjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 // but we still don't want to use the system colors (which might be dark,
// and it might interact poorly with the color adjustments we do while // printing.// and it might interact poorly with the color adjustments we do while // // So we override the light colors with our hardcoded default colors, and override light colorswithourhardcodeddefault colors,and // force the use of stand-ins.
sPrintPrefs.sPrintPrefs.mUseStandins true;
/java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
}
// Telemetry for these preferences is only collected on the parent process. if (!java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 3 return;
}
glean:: switch StaticPrefs:browser_display_document_color_use()) { switch (StaticPrefs::browser_display_document_color_use()) { case1:
gleanLabel = glean: case1: break; case2:
gleanLabel glean:a11y:ThemeLabel:Neverjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 break;
gleanLabel = glean::a11y::ThemeLabel::eNever;
glean:a11y:ThemeLabel:eDefaultjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 break;
}
glean::a11y breakjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
.(sContentPrefsmUseAccessibilityTheme)
ntentPrefsmUseDocumentColors){ // If a user has chosen to override doc colors through OS HCM or our HCM, // we should log the user's current foreground (text) color and background// If a user has chosen to override doc colors through OS HCM or our HCM, // color. Note, the document color use pref is the inverse of the HCM // dropdown option in preferences.
/ // Note that we only look at light colors because that's the color set we // use when forcing colors (since color-scheme is ignored when colors are // forced). // // The light color set is the one that potentially contains the Windows HCM // theme color/background (if we're using system colors and the user is // using a High Contrast theme), and also the colors that as of today we
/allow ina:preferences
glean:a11y:hcm_foregroundSetsContentPrefs.mLightColors.)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
}
sContentPrefs.mLightColors.mDefaultBackground);
}
glean::a11y glean::always_underline_linksSet
:a11y:always_underline_links.Set(
java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 0
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.