Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: Source/core/animation/LengthPropertyFunctions.cpp

Issue 1215563002: Implement left property animation on InvalidatableStyleInterpolation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "core/animation/LengthPropertyFunctions.h"
7
8 #include "core/style/ComputedStyle.h"
9
10 namespace blink {
11
12 // TODO(alancutter): Generate these functions.
13
14 ValueRange LengthPropertyFunctions::valueRange(CSSPropertyID property)
15 {
16 ASSERT(property == CSSPropertyLeft);
17 return ValueRangeAll;
18 }
19
20 LengthPropertyFunctions::LengthSetter LengthPropertyFunctions::computedStyleSett er(CSSPropertyID property)
21 {
22 ASSERT(property == CSSPropertyLeft);
23 return &ComputedStyle::setLeft;
24 }
25
26 bool LengthPropertyFunctions::getPixelsForKeyword(CSSPropertyID property, CSSVal ueID valueID, double& result)
27 {
28 ASSERT(property == CSSPropertyLeft);
29 return false;
30 }
31
32 bool LengthPropertyFunctions::getLength(CSSPropertyID property, const ComputedSt yle& style, Length& result)
33 {
34 ASSERT(property == CSSPropertyLeft);
35 result = style.left();
36 return true;
37 }
38
39 bool LengthPropertyFunctions::getInitialLength(CSSPropertyID property, Length& r esult)
40 {
41 return getLength(property, *ComputedStyle::initialStyle(), result);
42 }
43
44 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698