mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 718521 - Fix bug clipping to rounded rectangles for multiple objects. r=roc
This commit is contained in:
parent
d57453072b
commit
c26c7a3e1c
@ -1410,8 +1410,6 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
||||
continue;
|
||||
}
|
||||
|
||||
aClip.RemoveRoundedCorners();
|
||||
|
||||
// Just use its layer.
|
||||
nsRefPtr<Layer> ownLayer = item->BuildLayer(mBuilder, mManager, mParameters);
|
||||
if (!ownLayer) {
|
||||
@ -1435,10 +1433,13 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
||||
NS_ASSERTION(ownLayer->Manager() == mManager, "Wrong manager");
|
||||
NS_ASSERTION(!ownLayer->HasUserData(&gLayerManagerUserData),
|
||||
"We shouldn't have a FrameLayerBuilder-managed layer here!");
|
||||
NS_ASSERTION(aClip.mHaveClipRect ||
|
||||
aClip.mRoundedClipRects.IsEmpty(),
|
||||
"If we have rounded rects, we must have a clip rect");
|
||||
// It has its own layer. Update that layer's clip and visible rects.
|
||||
if (aClip.mHaveClipRect) {
|
||||
ownLayer->IntersectClipRect(
|
||||
aClip.mClipRect.ScaleToNearestPixels(
|
||||
aClip.NonRoundedIntersection().ScaleToNearestPixels(
|
||||
mParameters.mXScale, mParameters.mYScale, appUnitsPerDevPixel));
|
||||
}
|
||||
ThebesLayerData* data = GetTopThebesLayerData();
|
||||
@ -2364,7 +2365,6 @@ FrameLayerBuilder::Clip::IsRectClippedByRoundedCorner(const nsRect& aRect) const
|
||||
nsRect
|
||||
FrameLayerBuilder::Clip::NonRoundedIntersection() const
|
||||
{
|
||||
NS_ASSERTION(!mRoundedClipRects.IsEmpty(), "no rounded clip rects?");
|
||||
nsRect result = mClipRect;
|
||||
for (PRUint32 i = 0, iEnd = mRoundedClipRects.Length();
|
||||
i < iEnd; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user