mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 6a294c17e175 (bug 911889)
This commit is contained in:
parent
423fc6d37a
commit
41cda193ab
@ -3057,7 +3057,7 @@ nsDisplayOpacity::BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager,
|
||||
const ContainerParameters& aContainerParameters) {
|
||||
if (mFrame->StyleDisplay()->mOpacity == 0 && mFrame->GetContent() &&
|
||||
!nsLayoutUtils::HasAnimations(mFrame->GetContent(), eCSSProperty_opacity)) {
|
||||
!nsLayoutUtils::HasAnimationsForCompositor(mFrame->GetContent(), eCSSProperty_opacity)) {
|
||||
return nullptr;
|
||||
}
|
||||
nsRefPtr<Layer> container = aManager->GetLayerBuilder()->
|
||||
|
@ -251,9 +251,9 @@ TextAlignTrueEnabledPrefChangeCallback(const char* aPrefName, void* aClosure)
|
||||
|
||||
template <class AnimationsOrTransitions>
|
||||
static AnimationsOrTransitions*
|
||||
HasAnimationOrTransitionForCompositor(nsIContent* aContent,
|
||||
nsIAtom* aAnimationProperty,
|
||||
nsCSSProperty aProperty)
|
||||
HasAnimationOrTransition(nsIContent* aContent,
|
||||
nsIAtom* aAnimationProperty,
|
||||
nsCSSProperty aProperty)
|
||||
{
|
||||
AnimationsOrTransitions* animations =
|
||||
static_cast<AnimationsOrTransitions*>(aContent->GetProperty(aAnimationProperty));
|
||||
@ -275,40 +275,12 @@ nsLayoutUtils::HasAnimationsForCompositor(nsIContent* aContent,
|
||||
{
|
||||
if (!aContent->MayHaveAnimations())
|
||||
return false;
|
||||
return HasAnimationOrTransitionForCompositor<ElementAnimations>
|
||||
(aContent, nsGkAtoms::animationsProperty, aProperty) ||
|
||||
HasAnimationOrTransitionForCompositor<ElementTransitions>
|
||||
(aContent, nsGkAtoms::transitionsProperty, aProperty);
|
||||
}
|
||||
|
||||
template <class AnimationsOrTransitions>
|
||||
static AnimationsOrTransitions*
|
||||
HasAnimationOrTransition(nsIContent* aContent,
|
||||
nsIAtom* aAnimationProperty,
|
||||
nsCSSProperty aProperty)
|
||||
{
|
||||
AnimationsOrTransitions* animations =
|
||||
static_cast<AnimationsOrTransitions*>(aContent->GetProperty(aAnimationProperty));
|
||||
if (animations) {
|
||||
bool propertyMatches = animations->HasAnimationOfProperty(aProperty);
|
||||
if (propertyMatches) {
|
||||
return animations;
|
||||
}
|
||||
if (HasAnimationOrTransition<ElementAnimations>
|
||||
(aContent, nsGkAtoms::animationsProperty, aProperty)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool
|
||||
nsLayoutUtils::HasAnimations(nsIContent* aContent,
|
||||
nsCSSProperty aProperty)
|
||||
{
|
||||
if (!aContent->MayHaveAnimations())
|
||||
return false;
|
||||
return HasAnimationOrTransition<ElementAnimations>
|
||||
(aContent, nsGkAtoms::animationsProperty, aProperty) ||
|
||||
HasAnimationOrTransition<ElementTransitions>
|
||||
(aContent, nsGkAtoms::transitionsProperty, aProperty);
|
||||
return HasAnimationOrTransition<ElementTransitions>
|
||||
(aContent, nsGkAtoms::transitionsProperty, aProperty);
|
||||
}
|
||||
|
||||
static gfxSize
|
||||
@ -351,7 +323,7 @@ gfxSize
|
||||
nsLayoutUtils::GetMaximumAnimatedScale(nsIContent* aContent)
|
||||
{
|
||||
gfxSize result;
|
||||
ElementAnimations* animations = HasAnimationOrTransitionForCompositor<ElementAnimations>
|
||||
ElementAnimations* animations = HasAnimationOrTransition<ElementAnimations>
|
||||
(aContent, nsGkAtoms::animationsProperty, eCSSProperty_transform);
|
||||
if (animations) {
|
||||
for (uint32_t animIdx = animations->mAnimations.Length(); animIdx-- != 0; ) {
|
||||
@ -374,7 +346,7 @@ nsLayoutUtils::GetMaximumAnimatedScale(nsIContent* aContent)
|
||||
}
|
||||
}
|
||||
}
|
||||
ElementTransitions* transitions = HasAnimationOrTransitionForCompositor<ElementTransitions>
|
||||
ElementTransitions* transitions = HasAnimationOrTransition<ElementTransitions>
|
||||
(aContent, nsGkAtoms::transitionsProperty, eCSSProperty_transform);
|
||||
if (transitions) {
|
||||
for (uint32_t i = 0, i_end = transitions->mPropertyTransitions.Length();
|
||||
|
@ -1632,12 +1632,6 @@ public:
|
||||
static bool HasAnimationsForCompositor(nsIContent* aContent,
|
||||
nsCSSProperty aProperty);
|
||||
|
||||
/**
|
||||
* Returns true if the content node has animations or transitions for the
|
||||
* property.
|
||||
*/
|
||||
static bool HasAnimations(nsIContent* aContent, nsCSSProperty aProperty);
|
||||
|
||||
/**
|
||||
* Checks if off-main-thread animations are enabled.
|
||||
*/
|
||||
|
@ -1794,7 +1794,8 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
||||
// need to have display items built for them.
|
||||
if (disp->mOpacity == 0.0 && aBuilder->IsForPainting() &&
|
||||
!aBuilder->WillComputePluginGeometry() &&
|
||||
!nsLayoutUtils::HasAnimations(mContent, eCSSProperty_opacity)) {
|
||||
!nsLayoutUtils::HasAnimationsForCompositor(mContent,
|
||||
eCSSProperty_opacity)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user