Bug 18078

Summary: -webkit-transition- need to animates shorthand properties
Product: WebKit Reporter: Benoit Marchant <marchant>
Component: CSSAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarrin, dino, farukates, marchant, simon.fraser
Priority: P2 Keywords: InRadar
Version: 525.x (Safari 3.1)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
test case showing the issue
none
Initial patch
none
Patch, testcases, changelog hyatt: review+

Description Benoit Marchant 2008-03-25 14:40:42 PDT
currently, shorthands like border:, margin:, padding: etc don't get animated by the new -webkit-transition- feature. They need to as it is extremely common practice to use these for convenience and compact code.
Comment 1 Benoit Marchant 2008-03-25 16:53:38 PDT
Created attachment 20059 [details]
test case showing the issue
Comment 2 Simon Fraser (smfr) 2009-01-04 13:47:15 PST
Created attachment 26417 [details]
Initial patch

Dave, how about this approach? I just make property wrappers for shorthands that contain an array of the individual property wrappers.

This works well, but it will add to the cost of running 'all' transitions.
Comment 3 Simon Fraser (smfr) 2009-01-06 12:04:51 PST
To do:
* Optimize the transition-property "all" case by avoiding shorthand wrappers, since we don't need to compare shorthands then.
* Maybe reuse the ShorthandMap used for computed style.
Comment 4 Simon Fraser (smfr) 2009-01-06 12:06:44 PST
ShorthandMap is actually in CSSMutableStyleDeclaration.
Comment 5 Simon Fraser (smfr) 2009-01-09 17:45:14 PST
<rdar://problem/5823254>
Comment 6 Simon Fraser (smfr) 2009-01-13 10:20:31 PST
Comment on attachment 26417 [details]
Initial patch

Needs more work.
Comment 7 Simon Fraser (smfr) 2009-01-18 12:10:14 PST
Yoink.
Comment 8 Simon Fraser (smfr) 2009-01-18 12:17:43 PST
Created attachment 26835 [details]
Patch, testcases, changelog
Comment 9 Dave Hyatt 2009-01-19 12:58:11 PST
Comment on attachment 26835 [details]
Patch, testcases, changelog

Everything looks fine, but you need to put CSSPropertyLonghand into its own files and add it to all the projects/makefiles please.

I'll give you r=me assuming you are going to do that.
Comment 10 Simon Fraser (smfr) 2009-01-19 14:24:20 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	LayoutTests/ChangeLog
	M	LayoutTests/transitions/transform-op-list-match.html
	M	LayoutTests/transitions/transform-op-list-no-match.html
	M	LayoutTests/transitions/transition-test-helpers.js
	M	LayoutTests/transitions/zero-duration-in-list.html
	M	WebCore/ChangeLog
	M	WebCore/GNUmakefile.am
	M	WebCore/WebCore.pro
	M	WebCore/WebCore.scons
	M	WebCore/WebCore.vcproj/WebCore.vcproj
	M	WebCore/WebCore.xcodeproj/project.pbxproj
	M	WebCore/WebCoreSources.bkl
	M	WebCore/css/CSSMutableStyleDeclaration.cpp
	A	WebCore/css/CSSPropertyLonghand.cpp
	A	WebCore/css/CSSPropertyLonghand.h
	M	WebCore/page/animation/AnimationBase.cpp
	M	WebCore/page/animation/AnimationBase.h
	M	WebCore/page/animation/CompositeAnimation.cpp
Committed r40039

Keeping open to commit test cases (which I left at home).
Comment 11 Simon Fraser (smfr) 2009-01-19 19:31:52 PST
Testcases:
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	LayoutTests/ChangeLog
	A	LayoutTests/transitions/shorthand-border-transitions-expected.txt
	A	LayoutTests/transitions/shorthand-border-transitions.html
	A	LayoutTests/transitions/shorthand-transitions-expected.txt
	A	LayoutTests/transitions/shorthand-transitions.html
Committed r40051