Backed out 2 changesets (bug 1494062) for failing at /tests/gfx/tests/crashtests/1494062.html on a CLOSED TREE

Backed out changeset 50f859a24037 (bug 1494062)
Backed out changeset 23b890a3fc78 (bug 1494062)
This commit is contained in:
Gurzau Raul 2019-01-17 23:07:36 +02:00
Родитель 3be4c71d8e
Коммит 90dd635403
3 изменённых файлов: 20 добавлений и 56 удалений

Просмотреть файл

@ -324,9 +324,6 @@ struct DIGroup {
// The current bounds of the blob image, relative to
// the top-left of the mLayerBounds.
IntRect mImageBounds;
// mImageBounds clipped to the container/parent of the
// current item being processed.
IntRect mClippedImageBounds;
Maybe<wr::BlobImageKey> mKey;
std::vector<RefPtr<SourceSurface>> mExternalSurfaces;
std::vector<RefPtr<ScaledFont>> mFonts;
@ -394,9 +391,8 @@ struct DIGroup {
LayoutDeviceIntPoint offset = RoundedToInt(bounds.TopLeft());
GP("\n");
GP("CGC offset %d %d\n", offset.x, offset.y);
GP("clippedImageRect %d %d %d %d\n", mClippedImageBounds.x,
mClippedImageBounds.y, mClippedImageBounds.width,
mClippedImageBounds.height);
GP("imageRect %d %d %d %d\n", mImageBounds.x, mImageBounds.y,
mImageBounds.width, mImageBounds.height);
/*if (aItem->IsReused() && aData->mGeometry) {
return;
}*/
@ -417,7 +413,7 @@ struct DIGroup {
IntRect transformedRect =
ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
mLayerBounds.TopLeft());
aData->mRect = transformedRect.Intersect(mClippedImageBounds);
aData->mRect = transformedRect.Intersect(mImageBounds);
GP("CGC %s %d %d %d %d\n", aItem->Name(), clippedBounds.x,
clippedBounds.y, clippedBounds.width, clippedBounds.height);
GP("%d %d, %f %f\n", mLayerBounds.TopLeft().x, mLayerBounds.TopLeft().y,
@ -448,7 +444,7 @@ struct DIGroup {
IntRect transformedRect =
ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
mLayerBounds.TopLeft());
aData->mRect = transformedRect.Intersect(mClippedImageBounds);
aData->mRect = transformedRect.Intersect(mImageBounds);
InvalidateRect(aData->mRect);
GP("new rect: %d %d %d %d\n", aData->mRect.x, aData->mRect.y,
aData->mRect.width, aData->mRect.height);
@ -477,7 +473,7 @@ struct DIGroup {
IntRect transformedRect =
ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
mLayerBounds.TopLeft());
aData->mRect = transformedRect.Intersect(mClippedImageBounds);
aData->mRect = transformedRect.Intersect(mImageBounds);
InvalidateRect(aData->mRect);
// CGC invariant broken
@ -509,7 +505,7 @@ struct DIGroup {
ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
mLayerBounds.TopLeft());
InvalidateRect(aData->mRect.Intersect(mImageBounds));
aData->mRect = transformedRect.Intersect(mClippedImageBounds);
aData->mRect = transformedRect.Intersect(mImageBounds);
InvalidateRect(aData->mRect);
GP("ClipChange: %s %d %d %d %d\n", aItem->Name(), aData->mRect.x,
@ -539,7 +535,7 @@ struct DIGroup {
ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
mLayerBounds.TopLeft());
InvalidateRect(aData->mRect.Intersect(mImageBounds));
aData->mRect = transformedRect.Intersect(mClippedImageBounds);
aData->mRect = transformedRect.Intersect(mImageBounds);
InvalidateRect(aData->mRect);
GP("TransformChange: %s %d %d %d %d\n", aItem->Name(), aData->mRect.x,
@ -558,11 +554,11 @@ struct DIGroup {
ToDeviceSpace(clippedBounds, aMatrix,
appUnitsPerDevPixel, mLayerBounds.TopLeft());
InvalidateRect(aData->mRect.Intersect(mImageBounds));
aData->mRect = transformedRect.Intersect(mClippedImageBounds);
aData->mRect = transformedRect.Intersect(mImageBounds);
InvalidateRect(aData->mRect);
GP("UpdateContainerLayerPropertiesAndDetectChange change\n");
} else if (!aData->mImageRect.IsEqualEdges(mClippedImageBounds)) {
// Make sure we update mRect for mClippedImageBounds changes
} else if (!aData->mImageRect.IsEqualEdges(mImageBounds)) {
// Make sure we update mRect for mImageBounds changes
nsRect clippedBounds = clip.ApplyNonRoundedIntersection(
geometry->ComputeInvalidationRegion());
IntRect transformedRect =
@ -571,7 +567,7 @@ struct DIGroup {
// The invalid rect should contain the old rect and the new rect
// but may not because the parent may have been removed.
InvalidateRect(aData->mRect);
aData->mRect = transformedRect.Intersect(mClippedImageBounds);
aData->mRect = transformedRect.Intersect(mImageBounds);
InvalidateRect(aData->mRect);
GP("ContainerLayer image rect bounds change\n");
} else {
@ -581,14 +577,14 @@ struct DIGroup {
IntRect transformedRect =
ToDeviceSpace(clippedBounds, aMatrix,
appUnitsPerDevPixel, mLayerBounds.TopLeft());
auto rect = transformedRect.Intersect(mClippedImageBounds);
auto rect = transformedRect.Intersect(mImageBounds);
GP("Layer NoChange: %s %d %d %d %d\n", aItem->Name(),
aData->mRect.x, aData->mRect.y, aData->mRect.XMost(),
aData->mRect.YMost());
MOZ_RELEASE_ASSERT(rect.IsEqualEdges(aData->mRect));
}
} else if (!aData->mImageRect.IsEqualEdges(mClippedImageBounds)) {
// Make sure we update mRect for mClippedImageBounds changes
} else if (!aData->mImageRect.IsEqualEdges(mImageBounds)) {
// Make sure we update mRect for mImageBounds changes
UniquePtr<nsDisplayItemGeometry> geometry(
aItem->AllocateGeometry(aBuilder));
nsRect clippedBounds = clip.ApplyNonRoundedIntersection(
@ -599,7 +595,7 @@ struct DIGroup {
// The invalid rect should contain the old rect and the new rect
// but may not because the parent may have been removed.
InvalidateRect(aData->mRect);
aData->mRect = transformedRect.Intersect(mClippedImageBounds);
aData->mRect = transformedRect.Intersect(mImageBounds);
InvalidateRect(aData->mRect);
GP("image rect bounds change\n");
} else {
@ -611,7 +607,7 @@ struct DIGroup {
IntRect transformedRect =
ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
mLayerBounds.TopLeft());
auto rect = transformedRect.Intersect(mClippedImageBounds);
auto rect = transformedRect.Intersect(mImageBounds);
GP("NoChange: %s %d %d %d %d\n", aItem->Name(), aData->mRect.x,
aData->mRect.y, aData->mRect.XMost(), aData->mRect.YMost());
MOZ_RELEASE_ASSERT(rect.IsEqualEdges(aData->mRect));
@ -621,7 +617,7 @@ struct DIGroup {
aData->mClip = clip;
aData->mMatrix = aMatrix;
aData->mGroupOffset = mLayerBounds.TopLeft();
aData->mImageRect = mClippedImageBounds;
aData->mImageRect = mImageBounds;
GP("post mInvalidRect: %d %d %d %d\n", mInvalidRect.x, mInvalidRect.y,
mInvalidRect.width, mInvalidRect.height);
}
@ -1168,8 +1164,6 @@ void Grouper::ConstructGroups(nsDisplayListBuilder* aDisplayListBuilder,
currentGroup->mAppUnitsPerDevPixel;
groupData->mFollowingGroup.mLayerBounds = currentGroup->mLayerBounds;
groupData->mFollowingGroup.mImageBounds = currentGroup->mImageBounds;
groupData->mFollowingGroup.mClippedImageBounds =
currentGroup->mClippedImageBounds;
groupData->mFollowingGroup.mScale = currentGroup->mScale;
groupData->mFollowingGroup.mResidualOffset =
currentGroup->mResidualOffset;
@ -1227,9 +1221,8 @@ void Grouper::ConstructItemInsideInactive(
// Temporarily restrict the image bounds to the bounds of the container so
// that clipped children within the container know about the clip.
IntRect oldClippedImageBounds = aGroup->mClippedImageBounds;
aGroup->mClippedImageBounds =
aGroup->mClippedImageBounds.Intersect(data->mRect);
IntRect oldImageBounds = aGroup->mImageBounds;
aGroup->mImageBounds = aGroup->mImageBounds.Intersect(data->mRect);
if (aItem->GetType() == DisplayItemType::TYPE_FILTER) {
gfx::Size scale(1, 1);
@ -1274,7 +1267,7 @@ void Grouper::ConstructItemInsideInactive(
}
GP("Including %s of %d\n", aItem->Name(), aGroup->mDisplayItems.Count());
aGroup->mClippedImageBounds = oldClippedImageBounds;
aGroup->mImageBounds = oldImageBounds;
}
/* This is just a copy of nsRect::ScaleToOutsidePixels with an offset added in.
@ -1382,7 +1375,6 @@ void WebRenderCommandBuilder::DoGroupingForDisplayList(
group.mAppUnitsPerDevPixel, residualOffset));
group.mImageBounds =
IntRect(0, 0, group.mLayerBounds.width, group.mLayerBounds.height);
group.mClippedImageBounds = group.mImageBounds;
group.mPaintRect =
LayerIntRect::FromUnknownRect(
ScaleToOutsidePixelsOffset(aWrappingItem->GetPaintRect(), scale.width,

Просмотреть файл

@ -1,27 +0,0 @@
<html class="reftest-wait">
<head>
<script type="text/javascript">
window.addEventListener("MozReftestInvalidate", function() {
window.requestAnimationFrame(function() {
var xmlns = "http://www.w3.org/2000/svg";
var circleElm = document.getElementById("green_circle");
circleElm.setAttribute("clip-path", "url(#quarter)");
window.requestAnimationFrame(function() {
document.documentElement.removeAttribute('class');
});
});
});
</script>
</head>
<body>
<svg width="200" height="200" id="root">
<defs>
<clipPath id="quarter">
<rect x="0" y="0" width="50" height="50"/>
</clipPath>
</defs>
<circle cx="50" cy="50" r="40" fill="green" id="green_circle"/>
<rect x="150" y="150" width="10" height="10" fill="red"/>
</svg>
</body>
</html>

Просмотреть файл

@ -181,5 +181,4 @@ load 1513133.html
load 1496194.html
load 1505934-1.html
load 1509123.html
load 1494062.html
load texture-allocator-zero-region.html