Bug 20679

Summary: Need to handle the case when 0% or 100% keyframe is omitted
Product: WebKit Reporter: Chris Marrin <cmarrin>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Patch, including LayoutTest file sam: review+

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.

r=me
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