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

Side by Side Diff: Source/core/css/resolver/StyleBuilderConverter.h

Issue 1158603003: CSS Independent Transform Properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master and explicit applyTransform parameters Created 5 years, 6 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * * Redistributions of source code must retain the above copyright 4 * * Redistributions of source code must retain the above copyright
5 * notice, this list of conditions and the following disclaimer. 5 * notice, this list of conditions and the following disclaimer.
6 * * Redistributions in binary form must reproduce the above 6 * * Redistributions in binary form must reproduce the above
7 * copyright notice, this list of conditions and the following disclaimer 7 * copyright notice, this list of conditions and the following disclaimer
8 * in the documentation and/or other materials provided with the 8 * in the documentation and/or other materials provided with the
9 * distribution. 9 * distribution.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 25 matching lines...) Expand all
36 #include "core/style/StyleReflection.h" 36 #include "core/style/StyleReflection.h"
37 #include "core/style/StyleScrollSnapData.h" 37 #include "core/style/StyleScrollSnapData.h"
38 #include "core/style/TransformOrigin.h" 38 #include "core/style/TransformOrigin.h"
39 #include "platform/LengthSize.h" 39 #include "platform/LengthSize.h"
40 #include "platform/fonts/FontDescription.h" 40 #include "platform/fonts/FontDescription.h"
41 #include "platform/text/TabSize.h" 41 #include "platform/text/TabSize.h"
42 42
43 namespace blink { 43 namespace blink {
44 44
45 // Note that we assume the parser only allows valid CSSValue types. 45 // Note that we assume the parser only allows valid CSSValue types.
46 class RotateTransformOperation;
Timothy Loh 2015/06/19 01:16:45 Probably better above the comment otherwise it rea
soonm 2015/06/19 04:39:52 Moved comment down
47 class TranslateTransformOperation;
48 class ScaleTransformOperation;
46 49
47 class StyleBuilderConverter { 50 class StyleBuilderConverter {
48 public: 51 public:
49 static PassRefPtr<StyleReflection> convertBoxReflect(StyleResolverState&, CS SValue*); 52 static PassRefPtr<StyleReflection> convertBoxReflect(StyleResolverState&, CS SValue*);
50 static AtomicString convertFragmentIdentifier(StyleResolverState&, CSSValue* ); 53 static AtomicString convertFragmentIdentifier(StyleResolverState&, CSSValue* );
51 static Color convertColor(StyleResolverState&, CSSValue*, bool forVisitedLin k = false); 54 static Color convertColor(StyleResolverState&, CSSValue*, bool forVisitedLin k = false);
52 template <typename T> static T convertComputedLength(StyleResolverState&, CS SValue*); 55 template <typename T> static T convertComputedLength(StyleResolverState&, CS SValue*);
53 static LengthBox convertClip(StyleResolverState&, CSSValue*); 56 static LengthBox convertClip(StyleResolverState&, CSSValue*);
54 template <typename T> static T convertFlags(StyleResolverState&, CSSValue*); 57 template <typename T> static T convertFlags(StyleResolverState&, CSSValue*);
55 static FontDescription::FamilyDescription convertFontFamily(StyleResolverSta te&, CSSValue*); 58 static FontDescription::FamilyDescription convertFontFamily(StyleResolverSta te&, CSSValue*);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 static float convertTextStrokeWidth(StyleResolverState&, CSSValue*); 94 static float convertTextStrokeWidth(StyleResolverState&, CSSValue*);
92 static TransformOrigin convertTransformOrigin(StyleResolverState&, CSSValue* ); 95 static TransformOrigin convertTransformOrigin(StyleResolverState&, CSSValue* );
93 96
94 static bool convertGridTrackList(CSSValue*, Vector<GridTrackSize>&, NamedGri dLinesMap&, OrderedNamedGridLines&, StyleResolverState&); 97 static bool convertGridTrackList(CSSValue*, Vector<GridTrackSize>&, NamedGri dLinesMap&, OrderedNamedGridLines&, StyleResolverState&);
95 static void createImplicitNamedGridLinesFromGridArea(const NamedGridAreaMap& , NamedGridLinesMap&, GridTrackSizingDirection); 98 static void createImplicitNamedGridLinesFromGridArea(const NamedGridAreaMap& , NamedGridLinesMap&, GridTrackSizingDirection);
96 static void convertOrderedNamedGridLinesMapToNamedGridLinesMap(const Ordered NamedGridLines&, NamedGridLinesMap&); 99 static void convertOrderedNamedGridLinesMapToNamedGridLinesMap(const Ordered NamedGridLines&, NamedGridLinesMap&);
97 100
98 static ScrollSnapPoints convertSnapPoints(StyleResolverState&, CSSValue*); 101 static ScrollSnapPoints convertSnapPoints(StyleResolverState&, CSSValue*);
99 static Vector<LengthPoint> convertSnapCoordinates(StyleResolverState&, CSSVa lue*); 102 static Vector<LengthPoint> convertSnapCoordinates(StyleResolverState&, CSSVa lue*);
100 static LengthPoint convertSnapDestination(StyleResolverState&, CSSValue*); 103 static LengthPoint convertSnapDestination(StyleResolverState&, CSSValue*);
104 static PassRefPtr<TranslateTransformOperation> convertTranslate(StyleResolve rState&, CSSValue*);
105 static PassRefPtr<RotateTransformOperation> convertRotate(StyleResolverState &, CSSValue*);
106 static PassRefPtr<ScaleTransformOperation> convertScale(StyleResolverState&, CSSValue*);
101 }; 107 };
102 108
103 template <typename T> 109 template <typename T>
104 T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, CSSVal ue* value) 110 T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, CSSVal ue* value)
105 { 111 {
106 return toCSSPrimitiveValue(value)->computeLength<T>(state.cssToLengthConvers ionData()); 112 return toCSSPrimitiveValue(value)->computeLength<T>(state.cssToLengthConvers ionData());
107 } 113 }
108 114
109 template <typename T> 115 template <typename T>
110 T StyleBuilderConverter::convertFlags(StyleResolverState& state, CSSValue* value ) 116 T StyleBuilderConverter::convertFlags(StyleResolverState& state, CSSValue* value )
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 { 154 {
149 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 155 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
150 if (primitiveValue->getValueID() == IdForNone) 156 if (primitiveValue->getValueID() == IdForNone)
151 return nullAtom; 157 return nullAtom;
152 return AtomicString(primitiveValue->getStringValue()); 158 return AtomicString(primitiveValue->getStringValue());
153 } 159 }
154 160
155 } // namespace blink 161 } // namespace blink
156 162
157 #endif 163 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698