mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1519934 - Remove useless nsDisplayTransform::mNoExtendContext. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D16487 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
f2d26251b3
commit
ad094d75c5
@ -2557,7 +2557,6 @@ static void WrapSeparatorTransform(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayTransform* item = MakeDisplayItem<nsDisplayTransform>(
|
||||
aBuilder, aFrame, aNonParticipants, aBuilder->GetVisibleRect(),
|
||||
Matrix4x4(), aIndex);
|
||||
item->SetNoExtendContext();
|
||||
|
||||
if (*aSeparator == nullptr) {
|
||||
*aSeparator = item;
|
||||
|
@ -7184,7 +7184,6 @@ nsDisplayTransform::nsDisplayTransform(
|
||||
mAnimatedGeometryRootForScrollMetadata(mAnimatedGeometryRoot),
|
||||
mChildrenBuildingRect(aChildrenBuildingRect),
|
||||
mIndex(aIndex),
|
||||
mNoExtendContext(false),
|
||||
mIsTransformSeparator(false),
|
||||
mTransformPreserves3DInited(false),
|
||||
mAllowAsyncAnimation(false) {
|
||||
@ -7248,7 +7247,6 @@ nsDisplayTransform::nsDisplayTransform(nsDisplayListBuilder* aBuilder,
|
||||
mAnimatedGeometryRootForScrollMetadata(mAnimatedGeometryRoot),
|
||||
mChildrenBuildingRect(aChildrenBuildingRect),
|
||||
mIndex(aIndex),
|
||||
mNoExtendContext(false),
|
||||
mIsTransformSeparator(false),
|
||||
mTransformPreserves3DInited(false),
|
||||
mAllowAsyncAnimation(aAllowAsyncAnimation) {
|
||||
@ -7272,7 +7270,6 @@ nsDisplayTransform::nsDisplayTransform(nsDisplayListBuilder* aBuilder,
|
||||
mAnimatedGeometryRootForScrollMetadata(mAnimatedGeometryRoot),
|
||||
mChildrenBuildingRect(aChildrenBuildingRect),
|
||||
mIndex(aIndex),
|
||||
mNoExtendContext(false),
|
||||
mIsTransformSeparator(true),
|
||||
mTransformPreserves3DInited(false),
|
||||
mAllowAsyncAnimation(false) {
|
||||
@ -7873,13 +7870,15 @@ bool nsDisplayTransform::CreateWebRenderCommands(
|
||||
bool animated =
|
||||
ActiveLayerTracker::IsStyleMaybeAnimated(Frame(), eCSSProperty_transform);
|
||||
|
||||
bool preserve3D = mFrame->Extend3DContext() && !mIsTransformSeparator;
|
||||
|
||||
StackingContextHelper sc(
|
||||
aSc, GetActiveScrolledRoot(), mFrame, this, aBuilder, filters,
|
||||
LayoutDeviceRect(position, LayoutDeviceSize()), &newTransformMatrix,
|
||||
animationsId ? &prop : nullptr, nullptr, transformForSC, nullptr,
|
||||
gfx::CompositionOp::OP_OVER, !BackfaceIsHidden(),
|
||||
mFrame->Extend3DContext() && !mNoExtendContext, deferredTransformItem,
|
||||
wr::WrStackingContextClip::None(), animated);
|
||||
preserve3D, deferredTransformItem, wr::WrStackingContextClip::None(),
|
||||
animated);
|
||||
|
||||
return mStoredList.CreateWebRenderCommands(aBuilder, aResources, sc, aManager,
|
||||
aDisplayListBuilder);
|
||||
@ -7932,8 +7931,8 @@ already_AddRefed<Layer> nsDisplayTransform::BuildLayer(
|
||||
}
|
||||
|
||||
// Add the preserve-3d flag for this layer, BuildContainerLayerFor clears all
|
||||
// flags, so we never need to explicitely unset this flag.
|
||||
if (mFrame->Extend3DContext() && !mNoExtendContext) {
|
||||
// flags, so we never need to explicitly unset this flag.
|
||||
if (mFrame->Extend3DContext() && !mIsTransformSeparator) {
|
||||
container->SetContentFlags(container->GetContentFlags() |
|
||||
Layer::CONTENT_EXTEND_3D_CONTEXT);
|
||||
} else {
|
||||
|
@ -6710,10 +6710,6 @@ class nsDisplayTransform : public nsDisplayHitTestInfoItem {
|
||||
|
||||
void WriteDebugInfo(std::stringstream& aStream) override;
|
||||
|
||||
// Force the layer created for this item not to extend 3D context.
|
||||
// See nsIFrame::BuildDisplayListForStackingContext()
|
||||
void SetNoExtendContext() { mNoExtendContext = true; }
|
||||
|
||||
void DoUpdateBoundsPreserves3D(nsDisplayListBuilder* aBuilder) override {
|
||||
MOZ_ASSERT(mFrame->Combines3DTransformWithAncestors() ||
|
||||
IsTransformSeparator());
|
||||
@ -6794,15 +6790,13 @@ class nsDisplayTransform : public nsDisplayHitTestInfoItem {
|
||||
mutable nsRect mBounds;
|
||||
// True for mBounds is valid.
|
||||
mutable bool mHasBounds;
|
||||
// Be forced not to extend 3D context. Since we don't create a
|
||||
// transform item, a container layer, for every frames in a
|
||||
// preserves3d context, the transform items of a child preserves3d
|
||||
// context may extend the parent context not intented if the root of
|
||||
// the child preserves3d context doesn't create a transform item.
|
||||
// With this flags, we force the item not extending 3D context.
|
||||
bool mNoExtendContext;
|
||||
// This item is a separator between 3D rendering contexts, and
|
||||
// mTransform have been presetted by the constructor.
|
||||
// This also forces us not to extend the 3D context. Since we don't create a
|
||||
// transform item, a container layer, for every frame in a preserves3d
|
||||
// context, the transform items of a child preserves3d context may extend the
|
||||
// parent context unintendedly if the root of the child preserves3d context
|
||||
// doesn't create a transform item.
|
||||
bool mIsTransformSeparator;
|
||||
// True if mTransformPreserves3D have been initialized.
|
||||
bool mTransformPreserves3DInited;
|
||||
|
Loading…
Reference in New Issue
Block a user