Bug 1361207 - Changed appropriate calls to nsIFrame::IsThemed() to use overload with nsStyleDisplay* as argument to avoid redundant calls to StyleDisplay() r=dholbert

MozReview-Commit-ID: 65cmxFOgZeN

--HG--
extra : rebase_source : 98b2ce922b2bde9295ab2fb93cad2c3897a087ee
This commit is contained in:
Neerja Pancholi 2017-05-01 18:16:20 -07:00
parent f5ed461347
commit c4d6031bdc
2 changed files with 5 additions and 4 deletions

View File

@ -779,9 +779,10 @@ nsComboboxControlFrame::GetIntrinsicISize(nsRenderingContext* aRenderingContext,
}
// add room for the dropmarker button if there is one
if ((!IsThemed() ||
const nsStyleDisplay* disp = StyleDisplay();
if ((!IsThemed(disp) ||
presContext->GetTheme()->ThemeNeedsComboboxDropmarker()) &&
StyleDisplay()->UsedAppearance() != NS_THEME_NONE) {
disp->UsedAppearance() != NS_THEME_NONE) {
displayISize += scrollbarWidth;
}

View File

@ -258,7 +258,8 @@ nsRangeFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
if (IsThemed()) {
const nsStyleDisplay* disp = StyleDisplay();
if (IsThemed(disp)) {
DisplayBorderBackgroundOutline(aBuilder, aLists);
// Only create items for the thumb. Specifically, we do not want
// the track to paint, since *our* background is used to paint
@ -298,7 +299,6 @@ nsRangeFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
return;
}
const nsStyleDisplay *disp = StyleDisplay();
if (IsThemed(disp) &&
PresContext()->GetTheme()->ThemeDrawsFocusForWidget(disp->UsedAppearance())) {
return; // the native theme displays its own visual indication of focus