haikuwebkit/LayoutTests/animations/stacking-during-opacity-ani...

2 lines
38 B
Plaintext
Raw Permalink Normal View History

REGRESSION (r208025) GraphicsContext state stack assertions loading webkit.org https://bugs.webkit.org/show_bug.cgi?id=164350 rdar://problem/29053414 Reviewed by Dean Jackson. Source/WebCore: After r208025 it as possible for KeyframeAnimation::animate() to produce a RenderStyle with a non-1 opacity, but without the explicit z-index that triggers stacking context. This confused the RenderLayer paintWithTransparency code, triggering mismsatched GraphicsContext save/restores. This occurred when the runningOrFillingForwards state was mis-computed. keyframeAnim->animate() can spit out a new style when in the StartWaitTimer sometimes, so "!keyframeAnim->waitingToStart() && !keyframeAnim->postActive()" gave the wrong answser. Rather than depend on the super-confusing animation state, use a bool out param from animate() to say when it actually produced a new style, and when true, do the setZIndex(0). Test: animations/stacking-during-opacity-animation.html * page/animation/AnimationBase.h: * page/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimation::blendProperties): Log after blending so the log shows the blended style. * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimation::animate): * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::animate): * page/animation/ImplicitAnimation.h: * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::animate): * page/animation/KeyframeAnimation.h: * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::restore): * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: (PlatformCALayer::drawLayerContents): No functional change, but created scope for the GraphicsContext so that it didn't outlive the CGContextRestoreGState(context). * rendering/RenderLayer.cpp: (WebCore::RenderLayer::beginTransparencyLayers): New assertion that catches the problem earlier. LayoutTests: Test was reduced from webkit.org. * animations/stacking-during-opacity-animation-expected.txt: Added. * animations/stacking-during-opacity-animation.html: Added. Canonical link: https://commits.webkit.org/182073@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-03 00:19:54 +00:00
This test should not crash or assert.