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,
|
LayerManager* aManager,
|
||||||
const ContainerParameters& aContainerParameters) {
|
const ContainerParameters& aContainerParameters) {
|
||||||
if (mFrame->StyleDisplay()->mOpacity == 0 && mFrame->GetContent() &&
|
if (mFrame->StyleDisplay()->mOpacity == 0 && mFrame->GetContent() &&
|
||||||
!nsLayoutUtils::HasAnimations(mFrame->GetContent(), eCSSProperty_opacity)) {
|
!nsLayoutUtils::HasAnimationsForCompositor(mFrame->GetContent(), eCSSProperty_opacity)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
nsRefPtr<Layer> container = aManager->GetLayerBuilder()->
|
nsRefPtr<Layer> container = aManager->GetLayerBuilder()->
|
||||||
|
@ -251,9 +251,9 @@ TextAlignTrueEnabledPrefChangeCallback(const char* aPrefName, void* aClosure)
|
|||||||
|
|
||||||
template <class AnimationsOrTransitions>
|
template <class AnimationsOrTransitions>
|
||||||
static AnimationsOrTransitions*
|
static AnimationsOrTransitions*
|
||||||
HasAnimationOrTransitionForCompositor(nsIContent* aContent,
|
HasAnimationOrTransition(nsIContent* aContent,
|
||||||
nsIAtom* aAnimationProperty,
|
nsIAtom* aAnimationProperty,
|
||||||
nsCSSProperty aProperty)
|
nsCSSProperty aProperty)
|
||||||
{
|
{
|
||||||
AnimationsOrTransitions* animations =
|
AnimationsOrTransitions* animations =
|
||||||
static_cast<AnimationsOrTransitions*>(aContent->GetProperty(aAnimationProperty));
|
static_cast<AnimationsOrTransitions*>(aContent->GetProperty(aAnimationProperty));
|
||||||
@ -275,40 +275,12 @@ nsLayoutUtils::HasAnimationsForCompositor(nsIContent* aContent,
|
|||||||
{
|
{
|
||||||
if (!aContent->MayHaveAnimations())
|
if (!aContent->MayHaveAnimations())
|
||||||
return false;
|
return false;
|
||||||
return HasAnimationOrTransitionForCompositor<ElementAnimations>
|
if (HasAnimationOrTransition<ElementAnimations>
|
||||||
(aContent, nsGkAtoms::animationsProperty, aProperty) ||
|
(aContent, nsGkAtoms::animationsProperty, aProperty)) {
|
||||||
HasAnimationOrTransitionForCompositor<ElementTransitions>
|
return true;
|
||||||
(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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return HasAnimationOrTransition<ElementTransitions>
|
||||||
return nullptr;
|
(aContent, nsGkAtoms::transitionsProperty, aProperty);
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gfxSize
|
static gfxSize
|
||||||
@ -351,7 +323,7 @@ gfxSize
|
|||||||
nsLayoutUtils::GetMaximumAnimatedScale(nsIContent* aContent)
|
nsLayoutUtils::GetMaximumAnimatedScale(nsIContent* aContent)
|
||||||
{
|
{
|
||||||
gfxSize result;
|
gfxSize result;
|
||||||
ElementAnimations* animations = HasAnimationOrTransitionForCompositor<ElementAnimations>
|
ElementAnimations* animations = HasAnimationOrTransition<ElementAnimations>
|
||||||
(aContent, nsGkAtoms::animationsProperty, eCSSProperty_transform);
|
(aContent, nsGkAtoms::animationsProperty, eCSSProperty_transform);
|
||||||
if (animations) {
|
if (animations) {
|
||||||
for (uint32_t animIdx = animations->mAnimations.Length(); animIdx-- != 0; ) {
|
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);
|
(aContent, nsGkAtoms::transitionsProperty, eCSSProperty_transform);
|
||||||
if (transitions) {
|
if (transitions) {
|
||||||
for (uint32_t i = 0, i_end = transitions->mPropertyTransitions.Length();
|
for (uint32_t i = 0, i_end = transitions->mPropertyTransitions.Length();
|
||||||
|
@ -1632,12 +1632,6 @@ public:
|
|||||||
static bool HasAnimationsForCompositor(nsIContent* aContent,
|
static bool HasAnimationsForCompositor(nsIContent* aContent,
|
||||||
nsCSSProperty aProperty);
|
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.
|
* Checks if off-main-thread animations are enabled.
|
||||||
*/
|
*/
|
||||||
|
@ -1794,7 +1794,8 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
|||||||
// need to have display items built for them.
|
// need to have display items built for them.
|
||||||
if (disp->mOpacity == 0.0 && aBuilder->IsForPainting() &&
|
if (disp->mOpacity == 0.0 && aBuilder->IsForPainting() &&
|
||||||
!aBuilder->WillComputePluginGeometry() &&
|
!aBuilder->WillComputePluginGeometry() &&
|
||||||
!nsLayoutUtils::HasAnimations(mContent, eCSSProperty_opacity)) {
|
!nsLayoutUtils::HasAnimationsForCompositor(mContent,
|
||||||
|
eCSSProperty_opacity)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user