Backed out 3 changesets (bug 1426386) for R2 failing in /layout/reftests/position-sticky/transformed-2.html on Windows on a CLOSED TREE

Backed out changeset 4416e585cf77 (bug 1426386)
Backed out changeset 1e675415a7a0 (bug 1426386)
Backed out changeset 5402e62aaa71 (bug 1426386)
This commit is contained in:
Margareta Eliza Balazs 2018-01-16 22:57:00 +02:00
Родитель ffa1a8d425
Коммит 76eb08dabe
10 изменённых файлов: 15 добавлений и 82 удалений

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

@ -22,7 +22,6 @@ StackingContextHelper::StackingContextHelper()
StackingContextHelper::StackingContextHelper(const StackingContextHelper& aParentSC,
wr::DisplayListBuilder& aBuilder,
const nsTArray<wr::WrFilterOp>& aFilters,
const LayoutDeviceRect& aBounds,
const gfx::Matrix4x4* aBoundTransform,
const wr::WrAnimationProperty* aAnimation,
float* aOpacityPtr,
@ -45,7 +44,7 @@ StackingContextHelper::StackingContextHelper(const StackingContextHelper& aParen
mScale = mInheritedTransform.ScaleFactors(true);
}
mBuilder->PushStackingContext(wr::ToLayoutRect(aBounds),
mBuilder->PushStackingContext(wr::LayoutRect(),
aAnimation,
aOpacityPtr,
aTransformPtr,

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

@ -30,7 +30,6 @@ public:
StackingContextHelper(const StackingContextHelper& aParentSC,
wr::DisplayListBuilder& aBuilder,
const nsTArray<wr::WrFilterOp>& aFilters = nsTArray<wr::WrFilterOp>(),
const LayoutDeviceRect& aBounds = LayoutDeviceRect(),
const gfx::Matrix4x4* aBoundTransform = nullptr,
const wr::WrAnimationProperty* aAnimation = nullptr,
float* aOpacityPtr = nullptr,

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

@ -610,8 +610,7 @@ AddAnimationForProperty(nsIFrame* aFrame, const AnimationProperty& aProperty,
static void
AddAnimationsForProperty(nsIFrame* aFrame, nsDisplayListBuilder* aBuilder,
nsDisplayItem* aItem, nsCSSPropertyID aProperty,
AnimationInfo& aAnimationInfo, bool aPending,
bool aIsForWebRender)
AnimationInfo& aAnimationInfo, bool aPending)
{
if (aPending) {
aAnimationInfo.ClearAnimationsForNextTransaction();
@ -668,11 +667,7 @@ AddAnimationsForProperty(nsIFrame* aFrame, nsDisplayListBuilder* aBuilder,
float scaleX = 1.0f;
float scaleY = 1.0f;
bool hasPerspectiveParent = false;
if (aIsForWebRender) {
// leave origin empty, because we are sending it separately on the stacking
// context that we are pushing to WR, and WR will automatically include
// it when picking up the animated transform values
} else if (aItem) {
if (aItem) {
// This branch is for display items to leverage the cache of
// nsDisplayListBuilder.
origin = aItem->ToReferenceFrame();
@ -850,7 +845,7 @@ nsDisplayListBuilder::AddAnimationsAndTransitionsToLayer(Layer* aLayer,
bool pending = !aBuilder;
AnimationInfo& animationInfo = aLayer->GetAnimationInfo();
AddAnimationsForProperty(aFrame, aBuilder, aItem, aProperty,
animationInfo, pending, false);
animationInfo, pending);
animationInfo.TransferMutatedFlagToLayer(aLayer);
}
@ -6673,7 +6668,7 @@ nsDisplayOpacity::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuil
AnimationInfo& animationInfo = animationData->GetAnimationInfo();
AddAnimationsForProperty(Frame(), aDisplayListBuilder,
this, eCSSProperty_opacity,
animationInfo, false, true);
animationInfo, false);
animationInfo.StartPendingAnimations(aManager->GetAnimationReadyTime());
// Note that animationsId can be 0 (uninitialized in AnimationInfo) if there
@ -6699,7 +6694,7 @@ nsDisplayOpacity::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuil
}
nsTArray<mozilla::wr::WrFilterOp> filters;
StackingContextHelper sc(aSc, aBuilder, filters, LayoutDeviceRect(), nullptr,
StackingContextHelper sc(aSc, aBuilder, filters, nullptr,
animationsId ? &prop : nullptr,
opacityForSC);
@ -6753,9 +6748,8 @@ nsDisplayBlendMode::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBu
nsDisplayListBuilder* aDisplayListBuilder)
{
nsTArray<mozilla::wr::WrFilterOp> filters;
StackingContextHelper sc(aSc, aBuilder, filters, LayoutDeviceRect(), nullptr,
0, nullptr, nullptr, nullptr,
nsCSSRendering::GetGFXBlendMode(mBlendMode));
StackingContextHelper sc(aSc, aBuilder, filters, nullptr, 0, nullptr, nullptr,
nullptr, nsCSSRendering::GetGFXBlendMode(mBlendMode));
return nsDisplayWrapList::CreateWebRenderCommands(aBuilder,aResources, sc,
aManager, aDisplayListBuilder);
@ -7007,7 +7001,7 @@ nsDisplayOwnLayer::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBui
prop.effect_type = wr::WrAnimationType::Transform;
StackingContextHelper sc(aSc, aBuilder, nsTArray<wr::WrFilterOp>(),
LayoutDeviceRect(), nullptr, &prop);
nullptr, &prop);
nsDisplayWrapList::CreateWebRenderCommands(aBuilder, aResources, sc,
aManager, aDisplayListBuilder);
@ -8424,18 +8418,9 @@ nsDisplayTransform::GetTransform() const
}
Matrix4x4
nsDisplayTransform::GetTransformForRendering(LayoutDevicePoint* aOutOrigin)
nsDisplayTransform::GetTransformForRendering()
{
if (!mFrame->HasPerspective() || mTransformGetter || mIsTransformSeparator) {
if (!mTransformGetter && !mIsTransformSeparator && aOutOrigin) {
// If aOutOrigin is provided, put the offset to origin into it, because
// we need to keep it separate for webrender. The combination of
// *aOutOrigin and the returned matrix here should always be equivalent
// to what GetTransform() would have returned.
float scale = mFrame->PresContext()->AppUnitsPerDevPixel();
*aOutOrigin = LayoutDevicePoint::FromAppUnits(ToReferenceFrame(), scale);
return GetResultingTransformMatrix(mFrame, nsPoint(0, 0), scale, INCLUDE_PERSPECTIVE);
}
return GetTransform();
}
MOZ_ASSERT(!mTransformGetter);
@ -8491,14 +8476,7 @@ nsDisplayTransform::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBu
WebRenderLayerManager* aManager,
nsDisplayListBuilder* aDisplayListBuilder)
{
// We want to make sure we don't pollute the transform property in the WR
// stacking context by including the position of this frame (relative to the
// parent reference frame). We need to keep those separate; the position of
// this frame goes into the stacking context bounds while the transform goes
// into the transform.
LayoutDevicePoint position;
Matrix4x4 newTransformMatrix = GetTransformForRendering(&position);
Matrix4x4 newTransformMatrix = GetTransformForRendering();
gfx::Matrix4x4* transformForSC = &newTransformMatrix;
if (newTransformMatrix.IsIdentity()) {
// If the transform is an identity transform, strip it out so that WR
@ -8512,7 +8490,7 @@ nsDisplayTransform::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBu
AnimationInfo& animationInfo = animationData->GetAnimationInfo();
AddAnimationsForProperty(Frame(), aDisplayListBuilder,
this, eCSSProperty_transform,
animationInfo, false, true);
animationInfo, false);
animationInfo.StartPendingAnimations(aManager->GetAnimationReadyTime());
// Note that animationsId can be 0 (uninitialized in AnimationInfo) if there
@ -8546,7 +8524,6 @@ nsDisplayTransform::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBu
StackingContextHelper sc(aSc,
aBuilder,
filters,
LayoutDeviceRect(position, LayoutDeviceSize()),
&newTransformMatrix,
animationsId ? &prop : nullptr,
nullptr,
@ -9171,7 +9148,6 @@ nsDisplayPerspective::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& a
StackingContextHelper sc(aSc,
aBuilder,
filters,
LayoutDeviceRect(),
nullptr,
0,
nullptr,
@ -9946,8 +9922,7 @@ nsDisplayFilter::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuild
}
float opacity = mFrame->StyleEffects()->mOpacity;
StackingContextHelper sc(aSc, aBuilder, wrFilters, LayoutDeviceRect(), nullptr,
0, opacity != 1.0f && mHandleOpacity ? &opacity : nullptr);
StackingContextHelper sc(aSc, aBuilder, wrFilters, nullptr, 0, opacity != 1.0f && mHandleOpacity ? &opacity : nullptr);
nsDisplaySVGEffects::CreateWebRenderCommands(aBuilder, aResources, sc, aManager, aDisplayListBuilder);
return true;

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

@ -6155,7 +6155,7 @@ public:
* nsDisplayPerspective created for that.
*/
const Matrix4x4& GetTransform() const;
Matrix4x4 GetTransformForRendering(mozilla::LayoutDevicePoint* aOutOrigin = nullptr);
Matrix4x4 GetTransformForRendering();
/**
* Return the transform that is aggregation of all transform on the

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

@ -1861,7 +1861,7 @@ pref(layout.css.moz-document.content.enabled,false) == 1035091-2.html 1035091-re
== 1062963-floatmanager-reflow.html 1062963-floatmanager-reflow-ref.html
test-pref(dom.webcomponents.shadowdom.enabled,true) == 1066554-1.html 1066554-1-ref.html
== 1069716-1.html 1069716-1-ref.html
== 1078262-1.html about:blank
fails-if(webrender) == 1078262-1.html about:blank
test-pref(layout.testing.overlay-scrollbars.always-visible,false) == 1081072-1.html 1081072-1-ref.html
== 1081185-1.html 1081185-1-ref.html
== 1097437-1.html 1097437-1-ref.html

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

@ -49,5 +49,3 @@ fuzzy-if(skiaContent,1,22) fuzzy-if(winWidget&&!layersGPUAccelerated,116,1320) f
fuzzy-if(Android,8,630) fuzzy-if(OSX,1,11) fuzzy-if(skiaContent,1,220) fuzzy-if(winWidget&&!layersGPUAccelerated,116,1320) == block-in-inline-3.html block-in-inline-3-ref.html
== block-in-inline-continuations.html block-in-inline-continuations-ref.html
== iframe-1.html iframe-1-ref.html
== transformed-1.html transformed-1-ref.html
fuzzy-if(Android,2,4) == transformed-2.html transformed-2-ref.html

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

@ -1,8 +0,0 @@
<!DOCTYPE html>
<html style="margin: 0">
<body style="margin: 0">
<div style="height: 70px; background-color: blue"></div>
<div style="height: 2000px;">
<div style="margin-top: 50px; width: 100px; height: 100px; background-color: green"></div>
</div>
</html>

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

@ -1,8 +0,0 @@
<!DOCTYPE html>
<html style="margin: 0">
<body style="margin: 0">
<div style="height: 70px; background-color: blue"></div>
<div style="height: 2000px; transform: translateY(50px)">
<div style="position:sticky; top: 70px; width: 100px; height: 100px; background-color: green"></div>
</div>
</html>

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

@ -1,14 +0,0 @@
<!DOCTYPE html>
<html style="margin: 0" class="reftest-wait">
<body style="margin: 0">
<div style="height: 70px; background-color: blue"></div>
<div style="height: 1950px;">
<div style="margin-top: 100px; width: 100px; height: 100px; background-color: green"></div>
</div>
<script>
addEventListener('load', function() {
document.scrollingElement.scrollTop = 50;
document.documentElement.classList.remove('reftest-wait');
}, false);
</script>
</html>

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

@ -1,8 +0,0 @@
<!DOCTYPE html>
<html style="margin: 0" reftest-async-scroll reftest-async-scroll-y="50">
<body style="margin: 0">
<div style="height: 70px; background-color: blue"></div>
<div style="height: 2000px; transform: translateY(50px)">
<div style="position:sticky; top: 70px; width: 100px; height: 100px; background-color: green"></div>
</div>
</html>