Bug 21490 - Optimize keyframe style sheet changes by avoiding styleSheetChanged()
Summary: Optimize keyframe style sheet changes by avoiding styleSheetChanged()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Chris Marrin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-08 17:16 PDT by Chris Marrin
Modified: 2008-10-14 14:31 PDT (History)
3 users (show)

See Also:


Attachments
Patch, including LayoutTest file (6.55 KB, patch)
2008-10-08 17:19 PDT, Chris Marrin
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Marrin 2008-10-08 17:16:23 PDT
Back before I changed the way keyframe style was resolved (https://bugs.webkit.org/show_bug.cgi?id=20995), I needed to call styleSheetChanged() after deleting or inserting keyframe rules so the keyframe style could be recomputed. But this caused ALL style to be recomputed, which was really expensive and also required a complete redraw of the page.

After the change it is no longer necessary to do the styleSheetChanged() call because RenderStyles are created as needed when the animation is started. removing this call will significantly improve performance of adding or removing keyframes.
Comment 1 Chris Marrin 2008-10-08 17:19:00 PDT
Created attachment 24209 [details]
Patch, including LayoutTest file
Comment 2 Darin Adler 2008-10-11 13:22:27 PDT
Comment on attachment 24209 [details]
Patch, including LayoutTest file

r=me
Comment 3 Adam Barth 2008-10-14 01:42:24 PDT
Will land.
Comment 4 Adam Barth 2008-10-14 03:01:31 PDT
My Mac Mini died in the middle of testing this patch.  I'm going to take it into the store tomorrow.
Comment 5 Simon Fraser (smfr) 2008-10-14 11:21:57 PDT
We'll land this
Comment 6 Chris Marrin 2008-10-14 14:31:55 PDT
Sending        LayoutTests/ChangeLog
Adding         LayoutTests/css3/change-keyframes-expected.txt
Adding         LayoutTests/css3/change-keyframes.html
Sending        WebCore/ChangeLog
Sending        WebCore/css/WebKitCSSKeyframesRule.cpp
Transmitting file data .....
Committed revision 37592.