This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse the repository at this point in the history
style: Use update() to update declarations from Servo_DeclarationBloc…
…k_SetPropertyToAnimationValue. This method is used when updating the SMIL override style and from Web Animations' Animation.commitStyles method. By using update we accurately return false when no change is made to a declaration block. For SMIL this simply acts as an optimization, meaning we can avoid updating the SMIL override style ub some cases. For Animation.commitStyles, however, this allows us to avoid generating a mutation record. Normally making a redundant change to an attribute *does* generate a mutation record but the style attribute is different. All browsers avoid generating a mutation record for a redundant change to inline style. This is specified in the behavior for setProperty which does not update the style attribute if updated is false.  https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty Differential Revision: https://phabricator.services.mozilla.com/D30871
- Loading branch information
Showing 1 changed file with 8 additions and 0 deletions.