Bug 121589 - Remove superfluous CSSLinearTimingFunctionValue and use switch on TimingFunction::type() in more places
Summary: Remove superfluous CSSLinearTimingFunctionValue and use switch on TimingFunct...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: BlinkMergeCandidate
Depends on:
Blocks:
 
Reported: 2013-09-18 21:53 PDT by Ryosuke Niwa
Modified: 2013-09-19 15:37 PDT (History)
12 users (show)

See Also:


Attachments
Cleanup (12.24 KB, patch)
2013-09-18 21:54 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Fixed indentation style (10.05 KB, patch)
2013-09-19 14:50 PDT, Ryosuke Niwa
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2013-09-18 21:53:25 PDT
Remove superfluous CSSLinearTimingFunctionValue and use switch on TimingFunction::type() in more places
Comment 1 Ryosuke Niwa 2013-09-18 21:54:56 PDT
Created attachment 212035 [details]
Cleanup
Comment 2 Simon Fraser (smfr) 2013-09-19 14:41:10 PDT
Comment on attachment 212035 [details]
Cleanup

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

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:1253
> +        {
> +            const StepsTimingFunction* stepsTimingFunction = static_cast<const StepsTimingFunction*>(timingFunction);
> +            return CSSStepsTimingFunctionValue::create(stepsTimingFunction->numberOfSteps(), stepsTimingFunction->stepAtStart());
> +        }

This doesn't match our indentation style.

> Source/WebCore/page/animation/AnimationBase.cpp:605
> +        {
> +            const CubicBezierTimingFunction* function = static_cast<const CubicBezierTimingFunction*>(tf);
> +            return solveCubicBezierFunction(function->x1(), function->y1(), function->x2(), function->y2(), fractionalTime, m_animation->duration());
> +        }
> +    case TimingFunction::StepsFunction:
> +        {
> +            const StepsTimingFunction* stepsTimingFunction = static_cast<const StepsTimingFunction*>(tf);
> +            return solveStepsFunction(stepsTimingFunction->numberOfSteps(), stepsTimingFunction->stepAtStart(), fractionalTime);
> +        }

Ditto.
Comment 3 Ryosuke Niwa 2013-09-19 14:50:14 PDT
Created attachment 212102 [details]
Fixed indentation style
Comment 4 Ryosuke Niwa 2013-09-19 15:37:12 PDT
Committed r156125: <http://trac.webkit.org/changeset/156125>