mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 800198 - Make mContainerReferenceFrame the reference frame for the items inside the container, not the container itself. r=roc
This commit is contained in:
parent
773891762c
commit
7c4e5b5701
@ -212,7 +212,7 @@ public:
|
||||
{
|
||||
nsPresContext* presContext = aContainerFrame->PresContext();
|
||||
mAppUnitsPerDevPixel = presContext->AppUnitsPerDevPixel();
|
||||
mContainerReferenceFrame = aContainerItem ? aContainerItem->ReferenceFrame() :
|
||||
mContainerReferenceFrame = aContainerItem ? aContainerItem->ReferenceFrameForChildren() :
|
||||
mBuilder->FindReferenceFrameFor(mContainerFrame);
|
||||
// When AllowResidualTranslation is false, display items will be drawn
|
||||
// scaled with a translation by integer pixels, so we know how the snapping
|
||||
|
@ -1050,6 +1050,11 @@ public:
|
||||
*/
|
||||
const nsIFrame* ReferenceFrame() const { return mReferenceFrame; }
|
||||
|
||||
/**
|
||||
* Returns the reference frame for display item children of this item.
|
||||
*/
|
||||
virtual const nsIFrame* ReferenceFrameForChildren() const { return mReferenceFrame; }
|
||||
|
||||
/**
|
||||
* Checks if this display item (or any children) contains content that might
|
||||
* be rendered with component alpha (e.g. subpixel antialiasing). Returns the
|
||||
@ -2589,6 +2594,16 @@ public:
|
||||
|
||||
virtual uint32_t GetPerFrameKey() MOZ_OVERRIDE { return (mIndex << nsDisplayItem::TYPE_BITS) | nsDisplayItem::GetPerFrameKey(); }
|
||||
|
||||
virtual const nsIFrame* ReferenceFrameForChildren() const MOZ_OVERRIDE {
|
||||
// If we were created using a transform-getter, then we don't
|
||||
// belong to a transformed frame, and aren't a reference frame
|
||||
// for our children.
|
||||
if (!mTransformGetter) {
|
||||
return mFrame;
|
||||
}
|
||||
return nsDisplayItem::ReferenceFrameForChildren();
|
||||
}
|
||||
|
||||
enum {
|
||||
INDEX_MAX = UINT32_MAX >> nsDisplayItem::TYPE_BITS
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user