зеркало из https://github.com/mozilla/gecko-dev.git
Bug 852489. Part 1: Don't create nsDisplayButtonForegrounds for buttons that aren't focused. r=mats
--HG-- extra : rebase_source : 93ad60be2d64345fee5bbdd4553b11b5d8341d18
This commit is contained in:
Родитель
93b24607f7
Коммит
7d45bea65b
|
@ -185,11 +185,18 @@ nsButtonFrameRenderer::DisplayButton(nsDisplayListBuilder* aBuilder,
|
|||
nsDisplayButtonBoxShadowOuter(aBuilder, this));
|
||||
}
|
||||
|
||||
// Almost all buttons draw some kind of background so there's not much
|
||||
// point in checking whether we should create this item.
|
||||
aBackground->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayButtonBorderBackground(aBuilder, this));
|
||||
|
||||
aForeground->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayButtonForeground(aBuilder, this));
|
||||
// Only display focus rings if we actually have them. Since at most one
|
||||
// button would normally display a focus ring, most buttons won't have them.
|
||||
if ((mOuterFocusStyle && mOuterFocusStyle->StyleBorder()->HasBorder()) ||
|
||||
(mInnerFocusStyle && mInnerFocusStyle->StyleBorder()->HasBorder())) {
|
||||
aForeground->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayButtonForeground(aBuilder, this));
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче