Backed out changeset e245d8fe0c6d (bug 1494408) for reftest failure at builds/worker/workspace/build/tests/reftest/tests/layout/reftests/invalidation on a CLOSED TREE

--HG--
extra : amend_source : e40d36a925b0a75570a900dca671f8ff68d273cc
This commit is contained in:
Daniel Varga 2019-01-31 00:30:33 +02:00
parent 07e1eb0f18
commit 26142ed106
3 changed files with 5 additions and 38 deletions

View File

@ -1301,15 +1301,6 @@ void WebRenderCommandBuilder::DoGroupingForDisplayList(
bool snapped;
nsRect groupBounds = aWrappingItem->GetBounds(aDisplayListBuilder, &snapped);
// We don't want to restrict the size of the blob to the building rect of the
// display item, since that will change when we scroll and trigger a resize
// invalidation of the blob (will be fixed by blob recoordination).
// Instead we retrieve the bounds of the overflow clip on the <svg> and use
// that to restrict our size and prevent invisible content from affecting
// our bounds.
if (mClippedGroupBounds) {
groupBounds = groupBounds.Intersect(mClippedGroupBounds.value());
}
DIGroup& group = groupData->mSubGroup;
gfx::Size scale = aSc.GetInheritedScale();
@ -1494,8 +1485,7 @@ bool WebRenderCommandBuilder::ShouldDumpDisplayList(
void WebRenderCommandBuilder::CreateWebRenderCommandsFromDisplayList(
nsDisplayList* aDisplayList, nsDisplayItem* aWrappingItem,
nsDisplayListBuilder* aDisplayListBuilder, const StackingContextHelper& aSc,
wr::DisplayListBuilder& aBuilder, wr::IpcResourceUpdateQueue& aResources,
nsDisplayItem* aOuterItem) {
wr::DisplayListBuilder& aBuilder, wr::IpcResourceUpdateQueue& aResources) {
if (mDoGrouping) {
MOZ_RELEASE_ASSERT(
aWrappingItem,
@ -1605,25 +1595,6 @@ void WebRenderCommandBuilder::CreateWebRenderCommandsFromDisplayList(
// animated geometry root, so we can combine subsequent items of that
// type into the same image.
mContainsSVGGroup = mDoGrouping = true;
if (aOuterItem &&
aOuterItem->GetType() == DisplayItemType::TYPE_TRANSFORM) {
// Inline <svg> should always have an overflow clip, but it gets put
// outside the nsDisplayTransform we create for scaling the svg
// viewport. Converting the clip into inner coordinates lets us
// restrict the size of the blob images and prevents unnecessary
// resizes.
nsDisplayTransform* transform =
static_cast<nsDisplayTransform*>(aOuterItem);
nsRect clippedBounds =
transform->GetClippedBounds(aDisplayListBuilder);
nsRect innerClippedBounds;
DebugOnly<bool> result = transform->UntransformRect(
aDisplayListBuilder, clippedBounds, &innerClippedBounds);
MOZ_ASSERT(result);
mClippedGroupBounds = Some(innerClippedBounds);
}
GP("attempting to enter the grouping code\n");
}

View File

@ -92,11 +92,10 @@ class WebRenderCommandBuilder {
nsDisplayListBuilder* aDisplayListBuilder);
void CreateWebRenderCommandsFromDisplayList(
nsDisplayList* aDisplayList, nsDisplayItem* aWrappingItem,
nsDisplayList* aDisplayList, nsDisplayItem* aOuterItem,
nsDisplayListBuilder* aDisplayListBuilder,
const StackingContextHelper& aSc, wr::DisplayListBuilder& aBuilder,
wr::IpcResourceUpdateQueue& aResources,
nsDisplayItem* aOuterItem = nullptr);
wr::IpcResourceUpdateQueue& aResources);
// aWrappingItem has to be non-null.
void DoGroupingForDisplayList(nsDisplayList* aDisplayList,
@ -202,7 +201,6 @@ class WebRenderCommandBuilder {
// Whether consecutive inactive display items should be grouped into one
// blob image.
bool mDoGrouping;
Maybe<nsRect> mClippedGroupBounds;
// True if we're currently within an opacity:0 container, and only
// plugin and hit test items should be considered.

View File

@ -7893,10 +7893,8 @@ bool nsDisplayTransform::CreateWebRenderCommands(
params,
LayoutDeviceRect(position, LayoutDeviceSize()));
aManager->CommandBuilder().CreateWebRenderCommandsFromDisplayList(
mStoredList.GetChildren(), &mStoredList, aDisplayListBuilder, sc,
aBuilder, aResources, this);
return true;
return mStoredList.CreateWebRenderCommands(aBuilder, aResources, sc, aManager,
aDisplayListBuilder);
}
bool nsDisplayTransform::UpdateScrollData(