Bug 163452 - 100% CPU on homedepot.com page
Summary: 100% CPU on homedepot.com page
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://www.homedepot.com/p/BrassCraft...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-10-14 09:59 PDT by Antti Koivisto
Modified: 2016-10-15 01:31 PDT (History)
7 users (show)

See Also:


Attachments
patch (7.94 KB, patch)
2016-10-14 10:19 PDT, Antti Koivisto
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2016-10-14 09:59:01 PDT
The site has a keyframe animation on body. Currently this causes animation that invalidates the style of the entire document. Animations should only invalidate the element itself instead of the full subtree.
Comment 1 Antti Koivisto 2016-10-14 09:59:16 PDT
<rdar://problem/28730708>
Comment 2 Antti Koivisto 2016-10-14 10:19:57 PDT
Created attachment 291644 [details]
patch
Comment 3 Simon Fraser (smfr) 2016-10-14 10:23:59 PDT
Comment on attachment 291644 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=291644&action=review

> Source/WebCore/ChangeLog:14
> +        that causes full subtree invalidation. However animation only ever affect individual elements and
> +        the normal style resolution mechanism should be able to deal with things like inheritance as needed.

Is this true if an animation affects a property, and the element's descendants have 'inherit' for that property?
Comment 4 Antti Koivisto 2016-10-14 10:34:47 PDT
> Is this true if an animation affects a property, and the element's
> descendants have 'inherit' for that property?

Yes, of course. We cache the information about use of explicit 'inherit'. Search for hasExplicitlyInheritedProperties too see the mechanism.
Comment 5 Simon Fraser (smfr) 2016-10-14 11:21:56 PDT
Comment on attachment 291644 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=291644&action=review

> LayoutTests/fast/animation/animation-style-update-size.html:7
> +    -webkit-animation: testframes infinite 1s;

No prefix necessary.

> LayoutTests/fast/animation/animation-style-update-size.html:10
> +@-webkit-keyframes testframes {

No prefix necessary.

> LayoutTests/fast/animation/animation-style-update-size.html:20
> +document.querySelector("body").addEventListener("animationiteration", () => {

document.body
Comment 6 Antti Koivisto 2016-10-15 01:31:12 PDT
https://trac.webkit.org/changeset/207372