OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLengthSize(const
LengthSize& lengthSize, const ComputedStyle& style) | 172 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLengthSize(const
LengthSize& lengthSize, const ComputedStyle& style) |
173 { | 173 { |
174 return AnimatableLengthSize::create( | 174 return AnimatableLengthSize::create( |
175 createFromLength(lengthSize.width(), style), | 175 createFromLength(lengthSize.width(), style), |
176 createFromLength(lengthSize.height(), style)); | 176 createFromLength(lengthSize.height(), style)); |
177 } | 177 } |
178 | 178 |
179 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromStyleImage(Style
Image* image) | 179 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromStyleImage(Style
Image* image) |
180 { | 180 { |
181 if (image) { | 181 if (image) { |
182 if (RefPtrWillBeRawPtr<CSSValue> cssValue = image->cssValue()) | 182 if (NullableCSSValue cssValue = image->cssValue()) |
183 return AnimatableImage::create(cssValue.release()); | 183 return AnimatableImage::create(*cssValue); |
184 } | 184 } |
185 return AnimatableUnknown::create(CSSValueNone); | 185 return AnimatableUnknown::create(CSSValueNone); |
186 } | 186 } |
187 | 187 |
188 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFillSize(const F
illSize& fillSize, const ComputedStyle& style) | 188 inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFillSize(const F
illSize& fillSize, const ComputedStyle& style) |
189 { | 189 { |
190 switch (fillSize.type) { | 190 switch (fillSize.type) { |
191 case SizeLength: | 191 case SizeLength: |
192 return createFromLengthSize(fillSize.size, style); | 192 return createFromLengthSize(fillSize.size, style); |
193 case Contain: | 193 case Contain: |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 if (style.hasAutoZIndex()) | 589 if (style.hasAutoZIndex()) |
590 return AnimatableUnknown::create(CSSValueAuto); | 590 return AnimatableUnknown::create(CSSValueAuto); |
591 return createFromDouble(style.zIndex()); | 591 return createFromDouble(style.zIndex()); |
592 default: | 592 default: |
593 ASSERT_NOT_REACHED(); | 593 ASSERT_NOT_REACHED(); |
594 return nullptr; | 594 return nullptr; |
595 } | 595 } |
596 } | 596 } |
597 | 597 |
598 } // namespace blink | 598 } // namespace blink |
OLD | NEW |