Bug 20679 - Need to handle the case when 0% or 100% keyframe is omitted
Summary: Need to handle the case when 0% or 100% keyframe is omitted
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2008-09-05 17:34 PDT by Chris Marrin
Modified: 2008-09-09 16:40 PDT (History)
2 users (show)

See Also:

Patch, including LayoutTest file (7.90 KB, patch)
2008-09-05 17:36 PDT, Chris Marrin
sam: 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-09-05 17:34:37 PDT
Today we don't handle the omission of the 0% or 100% keyframe well.

I believe the behavior should be that if you omit the 0% keyframe, the value for the properties being animated before the animation came into scope should be used. And if the 100% keyframe is omitted, I think the keyframe with the largest key time should be used.
Comment 1 Chris Marrin 2008-09-05 17:36:55 PDT
Created attachment 23207 [details]
Patch, including LayoutTest file
Comment 2 Sam Weinig 2008-09-09 15:40:58 PDT
Comment on attachment 23207 [details]
Patch, including LayoutTest file

+    if (rule->item(0)->key() != 0 || rule->item(rule->length()-1)->key() != 1)

We usually write rule->item(0)->key() != 0 as just rule->item(0)->key().   You need spaces (rule->length()-1) here between length() and 1.

Comment 3 Dean Jackson 2008-09-09 16:40:17 PDT
Committed r36303
	M	WebCore/ChangeLog
	M	WebCore/css/CSSStyleSelector.cpp
	M	LayoutTests/ChangeLog
	A	LayoutTests/animations/keyframes-to-missing.html
	A	LayoutTests/animations/keyframes-from-missing.html
	A	LayoutTests/animations/keyframes-to-missing-expected.txt
	A	LayoutTests/animations/keyframes-from-missing-expected.txt