OLD | NEW |
(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 bool LengthPropertyFunctions::getPixelsForKeyword(CSSPropertyID property, CSSVal
ueID valueID, double& result) |
| 21 { |
| 22 ASSERT(property == CSSPropertyLeft); |
| 23 return false; |
| 24 } |
| 25 |
| 26 bool LengthPropertyFunctions::getLength(CSSPropertyID property, const ComputedSt
yle& style, Length& result) |
| 27 { |
| 28 ASSERT(property == CSSPropertyLeft); |
| 29 result = style.left(); |
| 30 return true; |
| 31 } |
| 32 |
| 33 bool LengthPropertyFunctions::getInitialLength(CSSPropertyID property, Length& r
esult) |
| 34 { |
| 35 return getLength(property, *ComputedStyle::initialStyle(), result); |
| 36 } |
| 37 |
| 38 } // namespace blink |
OLD | NEW |