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

Side by Side Diff: Source/core/animation/ImageSliceStyleInterpolation.h

Issue 995253002: Web Animations: Split image slice interpolation out of LengthBoxStyleInterpolation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: crbug.com/466536 Created 5 years, 9 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 #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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698