Bug 1436904 - Part 1: Add a static constructor function for display items. r=Bas
This commit is contained in:
@@ -477,8 +477,8 @@ nsButtonFrameRenderer::DisplayButton(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayList* aForeground)
|
||||
{
|
||||
if (mFrame->StyleEffects()->mBoxShadow) {
|
||||
aBackground->AppendToTop(new (aBuilder)
|
||||
nsDisplayButtonBoxShadowOuter(aBuilder, this));
|
||||
aBackground->AppendToTop(
|
||||
MakeDisplayItem<nsDisplayButtonBoxShadowOuter>(aBuilder, this));
|
||||
}
|
||||
|
||||
nsRect buttonRect = mFrame->GetRectRelativeToSelf();
|
||||
@@ -486,14 +486,14 @@ nsButtonFrameRenderer::DisplayButton(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayBackgroundImage::AppendBackgroundItemsToTop(
|
||||
aBuilder, mFrame, buttonRect, aBackground);
|
||||
|
||||
aBackground->AppendToTop(new (aBuilder)
|
||||
nsDisplayButtonBorder(aBuilder, this));
|
||||
aBackground->AppendToTop(
|
||||
MakeDisplayItem<nsDisplayButtonBorder>(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 (mInnerFocusStyle && mInnerFocusStyle->StyleBorder()->HasBorder()) {
|
||||
aForeground->AppendToTop(new (aBuilder)
|
||||
nsDisplayButtonForeground(aBuilder, this));
|
||||
aForeground->AppendToTop(
|
||||
MakeDisplayItem<nsDisplayButtonForeground>(aBuilder, this));
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user