Bug 105035 - Implement CSS computed style value for transition shorthand
: Implement CSS computed style value for transition shorthand
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: CSS
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To: Alexis Menard (darktears)
: WebExposed
Depends on:
Blocks: 93136
  Show dependency treegraph
 
Reported: 2012-12-14 08:48 PST by Alexis Menard (darktears)
Modified: 2013-01-09 10:05 PST (History)
7 users (show)

See Also:


Attachments
Patch (23.39 KB, patch)
2013-01-08 12:48 PST, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff
Patch (23.42 KB, patch)
2013-01-09 06:23 PST, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff
Patch (23.40 KB, patch)
2013-01-09 06:59 PST, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Menard (darktears) 2012-12-14 08:48:26 PST
As today when querying the transition shorthand (prefixed or not) on the computed style it returns nothing.
Comment 1 Alexis Menard (darktears) 2013-01-08 12:48:47 PST
Created attachment 181734 [details]
Patch
Comment 2 Dean Jackson 2013-01-08 13:40:55 PST
Comment on attachment 181734 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=181734&action=review

All good. Just small changes and I'll r+ cq+

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:1051
> +{

I wonder if this should be called createTransitionPropertyValue since it will never be used for animations (yeah, our naming is a bit confusing).

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:1061
> +static PassRefPtr<CSSValue> getAnimationPropertyValue(const AnimationList* animList)

Ditto.

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2490
> +        case CSSPropertyWebkitTransitionProperty:
> +            return getAnimationPropertyValue(style->transitions());

This is where I noticed the confusing name. It's even more strange because style->transitions() returns an AnimationList* :)

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2503
> +                    RefPtr<CSSValueList> spaceList = CSSValueList::createSpaceSeparated();
> +                    spaceList->append(createAnimationPropertyValue(animList->animation(i)));
> +                    spaceList->append(cssValuePool().createValue(animList->animation(i)->duration(), CSSPrimitiveValue::CSS_S));
> +                    spaceList->append(createTimingFunctionValue(animList->animation(i)->timingFunction().get()));
> +                    spaceList->append(cssValuePool().createValue(animList->animation(i)->delay(), CSSPrimitiveValue::CSS_S));
> +                    list->append(spaceList);

I suggest you replace "spaceList" with "list" (like you do below). Also, get a local variable for animList->animation(i) and reuse it through here.

> LayoutTests/transitions/transitions-parsing.html:27
> +
> +

Nit, extra blank line.
Comment 3 Alexis Menard (darktears) 2013-01-09 06:23:57 PST
Created attachment 181912 [details]
Patch
Comment 4 Alexis Menard (darktears) 2013-01-09 06:59:58 PST
Created attachment 181918 [details]
Patch
Comment 5 WebKit Review Bot 2013-01-09 10:05:27 PST
Comment on attachment 181918 [details]
Patch

Clearing flags on attachment: 181918

Committed r139200: <http://trac.webkit.org/changeset/139200>
Comment 6 WebKit Review Bot 2013-01-09 10:05:32 PST
All reviewed patches have been landed.  Closing bug.