New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 623911 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
NOT IN USE
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Implement smarter style invalidation for @keyframes additions

Reported by r...@opera.com, Jun 28 2016

Issue description

We currently do a full document style recalc when adding @keyframes rules. Instead we can cause a recalc for elements with active animations and elements which failed to resolve @keyframes in a previous recalc.

 

Comment 1 by suzyh@chromium.org, Jun 28 2016

Cc: alancutter@chromium.org
Components: -Blink>Animation
This affects animations but is not an animations issue directly, so removing Blink>Animation and cc'ing alancutter as our representative instead.
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9c88a15f059aec65af294b8789a27cc377363da6

commit 9c88a15f059aec65af294b8789a27cc377363da6
Author: rune <rune@opera.com>
Date: Thu Jun 30 08:10:17 2016

Optimize style recalc when adding @keyframes.

We only need to recalculate the elements with running animations unless
we tried to find an @keyframes rule and couldn't, for which we fall
back to a full document recalc.

The motivation for doing this is that the current WIP for  issue 567021 
shows that we're still getting full document recalcs due to the
presence of @keyframes rules.

R=dstockwell@chromium.org,alancutter@chromium.org
BUG= 623911 , 567021 

Review-Url: https://codereview.chromium.org/2105743002
Cr-Commit-Position: refs/heads/master@{#403118}

[add] https://crrev.com/9c88a15f059aec65af294b8789a27cc377363da6/third_party/WebKit/LayoutTests/animations/add-keyframes-recalc.html
[modify] https://crrev.com/9c88a15f059aec65af294b8789a27cc377363da6/third_party/WebKit/Source/core/animation/Animation.cpp
[modify] https://crrev.com/9c88a15f059aec65af294b8789a27cc377363da6/third_party/WebKit/Source/core/animation/Animation.h
[modify] https://crrev.com/9c88a15f059aec65af294b8789a27cc377363da6/third_party/WebKit/Source/core/animation/AnimationTimeline.cpp
[modify] https://crrev.com/9c88a15f059aec65af294b8789a27cc377363da6/third_party/WebKit/Source/core/animation/AnimationTimeline.h
[modify] https://crrev.com/9c88a15f059aec65af294b8789a27cc377363da6/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
[modify] https://crrev.com/9c88a15f059aec65af294b8789a27cc377363da6/third_party/WebKit/Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp
[modify] https://crrev.com/9c88a15f059aec65af294b8789a27cc377363da6/third_party/WebKit/Source/core/css/invalidation/StyleSheetInvalidationAnalysis.h
[modify] https://crrev.com/9c88a15f059aec65af294b8789a27cc377363da6/third_party/WebKit/Source/core/dom/StyleEngine.cpp
[modify] https://crrev.com/9c88a15f059aec65af294b8789a27cc377363da6/third_party/WebKit/Source/core/dom/StyleEngine.h

Comment 3 by r...@opera.com, Jun 30 2016

Status: Fixed (was: Started)

Comment 4 by ajha@chromium.org, Jul 7 2016

Cc: ajha@chromium.org
Labels: Needs-Feedback
rune@: Could you please confirm if this can be verified manually from the TE's end. Please provide any sample file to test and verify this if any verification is needed here.

Thank you!

Comment 5 by r...@opera.com, Jul 7 2016

Recording a timeline in inspector when loading anim.html shows a style recalc with a full tree element count 1s after the load. With the fix, that recalc count is 0.

anim.html
575 bytes View Download
Cc: e...@chromium.org kouhei@chromium.org dstockwell@chromium.org rnimmagadda@chromium.org drott@chromium.org kenjibaheux@chromium.org
 Issue 639699  has been merged into this issue.

Sign in to add a comment