getComputedStyle() should work for animation-related properties.
And CSSPropertyWebkitTransformOrigin.
Created attachment 23452 [details] patch + testcases Also fixes computed style for transform origin
Comment on attachment 23452 [details] patch + testcases should not remove the support for transform origin -x and -y
I'll take this.
Created attachment 25322 [details] Patch, testcases, changelog
Comment on attachment 25322 [details] Patch, testcases, changelog > + case CSSPropertyWebkitAnimationDelay: { > + RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); > + const AnimationList* t = style->animations(); > + if (t) { > + for (size_t i = 0; i < t->size(); ++i) > + list->append(CSSPrimitiveValue::create(t->animation(i)->delay(), CSSPrimitiveValue::CSS_S)); > + } else > + list->append(CSSPrimitiveValue::create(RenderStyle::initialAnimationDelay(), CSSPrimitiveValue::CSS_S)); > + return list.release(); > + } These seem like just enough code that it would be better to have them in separate functions rather than in the giant switch statement. However, that problem would solve itself if we changed this into a table instead of a switch, so I guess it can wait for that. Where does the name "t" come from? > + for (size_t i = 0; i < t->size(); ++i) { > + list->append(CSSPrimitiveValue::create(t->animation(i)->name(), CSSPrimitiveValue::CSS_STRING)); > + } Should be no braces here. > + int prop = t->animation(i)->property(); The type of this local variable, and of the property-related functions in Animation, should be CSSPropertyID, not int. > + propertyValue = CSSPrimitiveValue::create(getPropertyName(static_cast<CSSPropertyID>(prop)), CSSPrimitiveValue::CSS_STRING); Because we don't want typecasts like this one. r=me
r38641 = 541dc7a2b929dcdbb39c15c9c9f683e97f298ab5 (trunk) M WebCore/ChangeLog M WebCore/rendering/style/RenderStyle.h M WebCore/css/CSSComputedStyleDeclaration.cpp M LayoutTests/ChangeLog M LayoutTests/fast/css/computed-style-without-renderer-expected.txt M LayoutTests/fast/css/computed-style-expected.txt A LayoutTests/transforms/computed-style-origin-expected.txt A LayoutTests/transforms/computed-style-origin.html M LayoutTests/svg/css/getComputedStyle-basic-expected.txt A LayoutTests/animations/computed-style.html A LayoutTests/animations/computed-style-expected.txt r38642 = 1a2c678115f23f608ee19472b79a288d0aabd217 (trunk) I just noticed that I missed fixing one of Darin's issues. Follow-up coming.
I filed bug 22389 on cleaning up animation->property(), since doing so with this change would be more invasive.