Bug 18078 - -webkit-transition- need to animates shorthand properties
Summary: -webkit-transition- need to animates shorthand properties
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
Keywords: InRadar
Depends on:
Reported: 2008-03-25 14:40 PDT by Benoit Marchant
Modified: 2009-01-19 19:31 PST (History)
5 users (show)

See Also:

test case showing the issue (4.30 KB, application/xhtml+xml)
2008-03-25 16:53 PDT, Benoit Marchant
no flags Details
Initial patch (21.77 KB, patch)
2009-01-04 13:47 PST, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch, testcases, changelog (39.00 KB, patch)
2009-01-18 12:17 PST, Simon Fraser (smfr)
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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
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
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
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