mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 797295 - Add support for the layer attribute to nsImageBoxFrame. r=roc
This commit is contained in:
parent
be98caba91
commit
479663fd71
@ -8166,6 +8166,16 @@ nsFrame::InitBoxMetrics(bool aClear)
|
||||
metrics->mLastSize.SizeTo(0, 0);
|
||||
}
|
||||
|
||||
void
|
||||
nsIFrame::CreateOwnLayerIfNeeded(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayList* aList)
|
||||
{
|
||||
if (GetContent()->HasAttr(kNameSpaceID_None, nsGkAtoms::layer)) {
|
||||
aList->AppendNewToTop(new (aBuilder)
|
||||
nsDisplayOwnLayer(aBuilder, this, aList));
|
||||
}
|
||||
}
|
||||
|
||||
// Box layout debugging
|
||||
#ifdef DEBUG_REFLOW
|
||||
int32_t gIndent2 = 0;
|
||||
|
@ -2907,6 +2907,8 @@ NS_PTR_TO_INT32(frame->Properties().Get(nsIFrame::ParagraphDepthProperty()))
|
||||
|
||||
bool IsSVGText() const { return mState & NS_FRAME_IS_SVG_TEXT; }
|
||||
|
||||
void CreateOwnLayerIfNeeded(nsDisplayListBuilder* aBuilder, nsDisplayList* aList);
|
||||
|
||||
protected:
|
||||
// Members
|
||||
nsRect mRect;
|
||||
|
@ -304,8 +304,16 @@ nsImageBoxFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
if (!IsVisibleForPainting(aBuilder))
|
||||
return NS_OK;
|
||||
|
||||
return aLists.Content()->AppendNewToTop(
|
||||
|
||||
nsDisplayList list;
|
||||
rv = list.AppendNewToTop(
|
||||
new (aBuilder) nsDisplayXULImage(aBuilder, this));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
CreateOwnLayerIfNeeded(aBuilder, &list);
|
||||
|
||||
aLists.Content()->AppendToTop(&list);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user