зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1186061 patch 2 - Disable compositor thread animation of transforms when backface-visibility is hidden. r=mattwoodrow
We don't currently have a mechanism for rerendering when the front/back flips, so we should disable running such animations on the compositor thread for now until we do. Bug 1186204 covers reenabling. The reftest fails without the patch (showing a blue almost-square rectangle), and passes with the patch. The use of reftest-no-flush (added in patch 1) is needed to achieve the failure without the patch, because the flushWindow() function in reftest-content.js calls getBoundingClientRect() to flush rendering, which has the side-effect of flushing style updates that have been suppressed on the main thread while we're running an animation off the main thread, which in turn covers up the bug. --HG-- rename : layout/reftests/transform-3d/animate-preserve3d-child.html => layout/reftests/transform-3d/animate-backface-hidden.html
This commit is contained in:
Родитель
ee7c2b0554
Коммит
0f4cba237f
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait reftest-no-flush">
|
||||
<title>Testcase, bug 1186061</title>
|
||||
<style>
|
||||
|
||||
html { overflow: hidden }
|
||||
|
||||
body { padding: 50px }
|
||||
|
||||
@keyframes flip {
|
||||
0%, 85% { transform: rotateX(170deg); }
|
||||
90%, 100% { transform: rotateX(10deg); }
|
||||
}
|
||||
|
||||
#test {
|
||||
background: blue;
|
||||
height: 200px; width: 200px;
|
||||
backface-visibility: hidden;
|
||||
/* use a -99.9s delay to start at 99.9% and then move to 0% */
|
||||
animation: flip 100s -99.9s linear 2;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="test">
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
document.getElementById("test").addEventListener("animationiteration", IterationListener, false);
|
||||
|
||||
function IterationListener(event) {
|
||||
setTimeout(RemoveReftestWait, 0);
|
||||
}
|
||||
|
||||
function RemoveReftestWait() {
|
||||
document.documentElement.classList.remove("reftest-wait");
|
||||
}
|
||||
|
||||
</script>
|
|
@ -65,3 +65,4 @@ fuzzy(3,99) == animate-cube-degrees.html animate-cube-degrees-ref.html # subpixe
|
|||
!= animate-cube-degrees-ref.html animate-cube-degrees-zoom-ref.html
|
||||
fuzzy-if(cocoaWidget,128,9) == animate-preserve3d-parent.html animate-preserve3d-ref.html # intermittently fuzzy on Mac
|
||||
fuzzy-if(cocoaWidget,128,9) == animate-preserve3d-child.html animate-preserve3d-ref.html # intermittently fuzzy on Mac
|
||||
== animate-backface-hidden.html about:blank
|
||||
|
|
|
@ -568,6 +568,18 @@ AnimationCollection::CanAnimatePropertyOnCompositor(
|
|||
}
|
||||
return false;
|
||||
}
|
||||
// Note that testing BackfaceIsHidden() is not a sufficient test for
|
||||
// what we need for animating backface-visibility correctly if we
|
||||
// remove the above test for Preserves3DChildren(); that would require
|
||||
// looking at backface-visibility on descendants as well.
|
||||
if (frame->StyleDisplay()->BackfaceIsHidden()) {
|
||||
if (shouldLog) {
|
||||
nsCString message;
|
||||
message.AppendLiteral("Gecko bug: Async animation of 'backface-visibility: hidden' transforms is not supported. See bug 1186204.");
|
||||
LogAsyncAnimationFailure(message, aElement);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (frame->IsSVGTransformed()) {
|
||||
if (shouldLog) {
|
||||
nsCString message;
|
||||
|
|
Загрузка…
Ссылка в новой задаче