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

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

Issue 1120003002: [Oilpan] Migrate most classes under core/animations to Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ImageSliceStyleInterpolation_h 5 #ifndef ImageSliceStyleInterpolation_h
6 #define ImageSliceStyleInterpolation_h 6 #define ImageSliceStyleInterpolation_h
7 7
8 #include "core/animation/StyleInterpolation.h" 8 #include "core/animation/StyleInterpolation.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class CSSBorderImageSliceValue; 12 class CSSBorderImageSliceValue;
13 13
14 class ImageSliceStyleInterpolation : public StyleInterpolation { 14 class ImageSliceStyleInterpolation : public StyleInterpolation {
15 public: 15 public:
16 static bool usesDefaultInterpolation(const CSSValue&, const CSSValue&); 16 static bool usesDefaultInterpolation(const CSSValue&, const CSSValue&);
17 static PassRefPtrWillBeRawPtr<ImageSliceStyleInterpolation> maybeCreate(cons t CSSValue&, const CSSValue&, CSSPropertyID); 17 static ImageSliceStyleInterpolation* maybeCreate(const CSSValue&, const CSSV alue&, CSSPropertyID);
18 18
19 void apply(StyleResolverState&) const override; 19 void apply(StyleResolverState&) const override;
20 DECLARE_VIRTUAL_TRACE(); 20 DECLARE_VIRTUAL_TRACE();
21 21
22 // Image slices can have either percentages or numbers: http://dev.w3.org/cs swg/css-backgrounds-3/#the-border-image-slice 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 { 23 struct Metadata {
24 bool isPercentage; 24 bool isPercentage;
25 bool fill; 25 bool fill;
26 bool operator==(const Metadata& o) const { return isPercentage == o.isPe rcentage && fill == o.fill; } 26 bool operator==(const Metadata& o) const { return isPercentage == o.isPe rcentage && fill == o.fill; }
27 }; 27 };
28 28
29 private: 29 private:
30 ImageSliceStyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start , PassOwnPtrWillBeRawPtr<InterpolableValue> end, CSSPropertyID property, Metadat a metadata) 30 ImageSliceStyleInterpolation(InterpolableValue* start, InterpolableValue* en d, CSSPropertyID property, Metadata metadata)
31 : StyleInterpolation(start, end, property) 31 : StyleInterpolation(start, end, property)
32 , m_metadata(metadata) 32 , m_metadata(metadata)
33 { } 33 { }
34 34
35 Metadata m_metadata; 35 Metadata m_metadata;
36 }; 36 };
37 37
38 } // namespace blink 38 } // namespace blink
39 39
40 #endif // ImageSliceStyleInterpolation_h 40 #endif // ImageSliceStyleInterpolation_h
OLDNEW
« no previous file with comments | « Source/core/animation/FilterStyleInterpolationTest.cpp ('k') | Source/core/animation/ImageSliceStyleInterpolation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698