mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 04:38:02 +00:00
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:
parent
f5ed461347
commit
c4d6031bdc
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user