| 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 #ifndef ImageSliceStyleInterpolation_h |
| 6 #define ImageSliceStyleInterpolation_h |
| 7 |
| 8 #include "core/animation/StyleInterpolation.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 class CSSBorderImageSliceValue; |
| 13 |
| 14 class ImageSliceStyleInterpolation : public StyleInterpolation { |
| 15 public: |
| 16 static bool usesDefaultInterpolation(const CSSValue&, const CSSValue&); |
| 17 static PassRefPtrWillBeRawPtr<ImageSliceStyleInterpolation> maybeCreate(cons
t CSSValue&, const CSSValue&, CSSPropertyID); |
| 18 |
| 19 virtual void apply(StyleResolverState&) const override; |
| 20 DECLARE_VIRTUAL_TRACE(); |
| 21 |
| 22 // Image slices can have either percentages or numbers: http://dev.w3.org/cs
swg/css-backgrounds-3/#the-border-image-slice |
| 23 struct Metadata { |
| 24 bool isPercentage; |
| 25 bool fill; |
| 26 bool operator==(const Metadata& o) const { return isPercentage == o.isPe
rcentage && fill == o.fill; } |
| 27 }; |
| 28 |
| 29 private: |
| 30 ImageSliceStyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start
, PassOwnPtrWillBeRawPtr<InterpolableValue> end, CSSPropertyID property, Metadat
a metadata) |
| 31 : StyleInterpolation(start, end, property) |
| 32 , m_metadata(metadata) |
| 33 { } |
| 34 |
| 35 Metadata m_metadata; |
| 36 }; |
| 37 |
| 38 } // namespace blink |
| 39 |
| 40 #endif // ImageSliceStyleInterpolation_h |
| OLD | NEW |