Bug 1619664 - Remove nsBox::gTheme. r=dholbert

The boxes can just poke at the prescontext theme like literally everything else.

Differential Revision: https://phabricator.services.mozilla.com/D65161
This commit is contained in:
Emilio Cobos Álvarez
2020-03-03 23:39:07 +00:00
parent 514d6b9db1
commit ab3e2032e5
4 changed files with 21 additions and 37 deletions

View File

@@ -606,9 +606,12 @@ bool nsImageBoxFrame::CanOptimizeToImageLayer() {
imgRequestProxy* nsImageBoxFrame::GetRequestFromStyle() {
const nsStyleDisplay* disp = StyleDisplay();
if (disp->HasAppearance() && nsBox::gTheme &&
nsBox::gTheme->ThemeSupportsWidget(nullptr, this, disp->mAppearance)) {
return nullptr;
if (disp->HasAppearance()) {
nsPresContext* pc = PresContext();
nsITheme* theme = pc->GetTheme();
if (theme && theme->ThemeSupportsWidget(pc, this, disp->mAppearance)) {
return nullptr;
}
}
return StyleList()->GetListStyleImage();