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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user