зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1575806 - Cleanup a bit preference-stylesheet-related code. r=heycam
Some of it was dead code, another was inlining a not very useful function (and in one case redundant, since EnsureInitialized() happened right after Refresh()). Differential Revision: https://phabricator.services.mozilla.com/D43042 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
495df615e7
Коммит
a3278b6dad
|
@ -331,15 +331,6 @@ bool nsPresContext::IsChrome() const {
|
||||||
return Document()->IsInChromeDocShell();
|
return Document()->IsInChromeDocShell();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool nsPresContext::IsChromeOriginImage() const {
|
|
||||||
return Document()->IsBeingUsedAsImage() &&
|
|
||||||
Document()->IsDocumentURISchemeChrome();
|
|
||||||
}
|
|
||||||
|
|
||||||
void nsPresContext::GetDocumentColorPreferences() {
|
|
||||||
PreferenceSheet::EnsureInitialized();
|
|
||||||
}
|
|
||||||
|
|
||||||
void nsPresContext::GetUserPreferences() {
|
void nsPresContext::GetUserPreferences() {
|
||||||
if (!GetPresShell()) {
|
if (!GetPresShell()) {
|
||||||
// No presshell means nothing to do here. We'll do this when we
|
// No presshell means nothing to do here. We'll do this when we
|
||||||
|
@ -350,8 +341,7 @@ void nsPresContext::GetUserPreferences() {
|
||||||
mAutoQualityMinFontSizePixelsPref =
|
mAutoQualityMinFontSizePixelsPref =
|
||||||
Preferences::GetInt("browser.display.auto_quality_min_font_size");
|
Preferences::GetInt("browser.display.auto_quality_min_font_size");
|
||||||
|
|
||||||
// * document colors
|
PreferenceSheet::EnsureInitialized();
|
||||||
GetDocumentColorPreferences();
|
|
||||||
|
|
||||||
mSendAfterPaintToContent = Preferences::GetBool(
|
mSendAfterPaintToContent = Preferences::GetBool(
|
||||||
"dom.send_after_paint_to_content", mSendAfterPaintToContent);
|
"dom.send_after_paint_to_content", mSendAfterPaintToContent);
|
||||||
|
@ -1336,12 +1326,10 @@ void nsPresContext::SysColorChangedInternal() {
|
||||||
// Invalidate cached '-moz-windows-accent-color-applies' media query:
|
// Invalidate cached '-moz-windows-accent-color-applies' media query:
|
||||||
RefreshSystemMetrics();
|
RefreshSystemMetrics();
|
||||||
|
|
||||||
|
// Reset default background and foreground colors for the document since they
|
||||||
|
// may be using system colors
|
||||||
PreferenceSheet::Refresh();
|
PreferenceSheet::Refresh();
|
||||||
|
|
||||||
// Reset default background and foreground colors for the document since
|
|
||||||
// they may be using system colors
|
|
||||||
GetDocumentColorPreferences();
|
|
||||||
|
|
||||||
// The system color values are computed to colors in the style data,
|
// The system color values are computed to colors in the style data,
|
||||||
// so normal style data comparison is sufficient here.
|
// so normal style data comparison is sufficient here.
|
||||||
RebuildAllStyleData(nsChangeHint(0), RestyleHint{0});
|
RebuildAllStyleData(nsChangeHint(0), RestyleHint{0});
|
||||||
|
|
|
@ -806,7 +806,6 @@ class nsPresContext : public nsISupports,
|
||||||
|
|
||||||
// Is this presentation in a chrome docshell?
|
// Is this presentation in a chrome docshell?
|
||||||
bool IsChrome() const;
|
bool IsChrome() const;
|
||||||
bool IsChromeOriginImage() const;
|
|
||||||
|
|
||||||
// Public API for native theme code to get style internals.
|
// Public API for native theme code to get style internals.
|
||||||
bool HasAuthorSpecifiedRules(const nsIFrame* aFrame,
|
bool HasAuthorSpecifiedRules(const nsIFrame* aFrame,
|
||||||
|
@ -1041,7 +1040,6 @@ class nsPresContext : public nsISupports,
|
||||||
void SetImgAnimations(nsIContent* aParent, uint16_t aMode);
|
void SetImgAnimations(nsIContent* aParent, uint16_t aMode);
|
||||||
void SetSMILAnimations(mozilla::dom::Document* aDoc, uint16_t aNewMode,
|
void SetSMILAnimations(mozilla::dom::Document* aDoc, uint16_t aNewMode,
|
||||||
uint16_t aOldMode);
|
uint16_t aOldMode);
|
||||||
void GetDocumentColorPreferences();
|
|
||||||
|
|
||||||
void PreferenceChanged(const char* aPrefName);
|
void PreferenceChanged(const char* aPrefName);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче