mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
9bf9d338f9
When display style is changed from 'none' to other in animation-only restyle we need to resolve descendant elements' style that were in the display:none subtree. Three possible ways to resolve the descendant elements' style; 1) Traversing unstyled elements in animation-only restyle We can't simply traverse unstyled elements in the animation-only restyle since when we decided to traverse the unstyled elements we don't know yet the elements will be initially styled or are in display:none subtree. It will result that the new elements are styled in animation-only restyle, it's undesirable. 2) Creating a SequentialTask and resolve the descendants' style with ServoStyleSet::StyleNewSubtree() We can't resolve the descendants' styles with ServoStyleSet::StyleNewSubtree() in SequentialTask since at the moment we are still in servo traversal (i.e. sInServoTraversal is true). That means AutoSetInServoTraversal fails in PrepareAndTraverseSubtree(). 3) Creating a SequentialTask and set restyle subtree hint and defer descendants' restyle in a subsequent normal traversal Note that, when we process throttled animations flush, we don't process normal traversal so the descendants will not be traversed until normal restyle happens but it will not be a big problem since it's really rare that user clicks display animation element just at the right moment when display property changes from none to other. Also, if it will be really a problem, we should process *only* transform animations on the compositor, it's ideally right thing to do. Display property never runs on the compositor. This patch takes the third approach. MozReview-Commit-ID: Krxa3kkdIq4 --HG-- extra : rebase_source : 33e9db953f21168c76716329568191625bd15896 |
||
---|---|---|
.. | ||
crashtests | ||
test | ||
moz.build | ||
nsISMILAttr.h | ||
nsISMILType.h | ||
nsSMILAnimationController.cpp | ||
nsSMILAnimationController.h | ||
nsSMILAnimationFunction.cpp | ||
nsSMILAnimationFunction.h | ||
nsSMILCompositor.cpp | ||
nsSMILCompositor.h | ||
nsSMILCompositorTable.h | ||
nsSMILCSSProperty.cpp | ||
nsSMILCSSProperty.h | ||
nsSMILCSSValueType.cpp | ||
nsSMILCSSValueType.h | ||
nsSMILFloatType.cpp | ||
nsSMILFloatType.h | ||
nsSMILInstanceTime.cpp | ||
nsSMILInstanceTime.h | ||
nsSMILInterval.cpp | ||
nsSMILInterval.h | ||
nsSMILKeySpline.cpp | ||
nsSMILKeySpline.h | ||
nsSMILMilestone.h | ||
nsSMILNullType.cpp | ||
nsSMILNullType.h | ||
nsSMILParserUtils.cpp | ||
nsSMILParserUtils.h | ||
nsSMILRepeatCount.cpp | ||
nsSMILRepeatCount.h | ||
nsSMILSetAnimationFunction.cpp | ||
nsSMILSetAnimationFunction.h | ||
nsSMILTargetIdentifier.h | ||
nsSMILTimeContainer.cpp | ||
nsSMILTimeContainer.h | ||
nsSMILTimedElement.cpp | ||
nsSMILTimedElement.h | ||
nsSMILTimeValue.cpp | ||
nsSMILTimeValue.h | ||
nsSMILTimeValueSpec.cpp | ||
nsSMILTimeValueSpec.h | ||
nsSMILTimeValueSpecParams.h | ||
nsSMILTypes.h | ||
nsSMILValue.cpp | ||
nsSMILValue.h | ||
SMILBoolType.cpp | ||
SMILBoolType.h | ||
SMILEnumType.cpp | ||
SMILEnumType.h | ||
SMILIntegerType.cpp | ||
SMILIntegerType.h | ||
SMILStringType.cpp | ||
SMILStringType.h | ||
TimeEvent.cpp | ||
TimeEvent.h |