mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1164813 - Make nsAnimationManager update cached in-effect status even when there is no frame; r=dbaron
This commit is contained in:
parent
0c6a724062
commit
2dee8a57ea
33
layout/style/crashtests/1164813-1.html
Normal file
33
layout/style/crashtests/1164813-1.html
Normal file
@ -0,0 +1,33 @@
|
||||
<!doctype html>
|
||||
<html class="reftest-wait">
|
||||
<style>
|
||||
#parent.hidden {
|
||||
display: none;
|
||||
}
|
||||
.icon {
|
||||
opacity: 0;
|
||||
transition: opacity 0.5s;
|
||||
}
|
||||
.icon.shrink {
|
||||
animation: shrink 1s;
|
||||
}
|
||||
@keyframes shrink {
|
||||
to { transform: scale(0); }
|
||||
}
|
||||
</style>
|
||||
<div id="parent">
|
||||
<div class="icon">Searching</div>
|
||||
</div>
|
||||
<script>
|
||||
var icon = document.querySelector('.icon');
|
||||
getComputedStyle(icon).opacity;
|
||||
icon.style.opacity = 1;
|
||||
icon.classList.add('shrink');
|
||||
setTimeout(function() {
|
||||
document.getElementById('parent').classList.add('hidden');
|
||||
setTimeout(function() {
|
||||
document.documentElement.removeAttribute('class');
|
||||
}, 500);
|
||||
}, 500);
|
||||
</script>
|
||||
</html>
|
@ -117,5 +117,6 @@ load 1161320-1.html
|
||||
pref(dom.animations-api.core.enabled,true) load 1161320-2.html
|
||||
load 1161366-1.html
|
||||
load 1163446-1.html
|
||||
load 1164813-1.html
|
||||
load large_border_image_width.html
|
||||
load border-image-visited-link.html
|
||||
|
@ -246,13 +246,25 @@ nsAnimationManager::MaybeUpdateCascadeResults(AnimationCollection* aCollection)
|
||||
if (anim->IsInEffect() != anim->mInEffectForCascadeResults) {
|
||||
// Update our own cascade results.
|
||||
mozilla::dom::Element* element = aCollection->GetElementToRestyle();
|
||||
bool updatedCascadeResults = false;
|
||||
if (element) {
|
||||
nsIFrame* frame = element->GetPrimaryFrame();
|
||||
if (frame) {
|
||||
UpdateCascadeResults(frame->StyleContext(), aCollection);
|
||||
updatedCascadeResults = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!updatedCascadeResults) {
|
||||
// If we don't have a style context we can't do the work of updating
|
||||
// cascading results but we need to make sure to update
|
||||
// mInEffectForCascadeResults or else we'll keep running this
|
||||
// code every time (potentially leading to infinite recursion due
|
||||
// to the fact that this method both calls and is (indirectly) called
|
||||
// by nsTransitionManager).
|
||||
anim->mInEffectForCascadeResults = anim->IsInEffect();
|
||||
}
|
||||
|
||||
// Notify the transition manager, whose results might depend on ours.
|
||||
mPresContext->TransitionManager()->
|
||||
UpdateCascadeResultsWithAnimations(aCollection);
|
||||
|
Loading…
Reference in New Issue
Block a user