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 * * 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 15 matching lines...) Expand all Loading... |
26 | 26 |
27 #ifndef StyleBuilderConverter_h | 27 #ifndef StyleBuilderConverter_h |
28 #define StyleBuilderConverter_h | 28 #define StyleBuilderConverter_h |
29 | 29 |
30 #include "core/css/CSSStringValue.h" | 30 #include "core/css/CSSStringValue.h" |
31 #include "core/css/CSSValue.h" | 31 #include "core/css/CSSValue.h" |
32 #include "core/css/CSSValueList.h" | 32 #include "core/css/CSSValueList.h" |
33 #include "core/css/resolver/StyleResolverState.h" | 33 #include "core/css/resolver/StyleResolverState.h" |
34 #include "core/style/QuotesData.h" | 34 #include "core/style/QuotesData.h" |
35 #include "core/style/ShadowList.h" | 35 #include "core/style/ShadowList.h" |
36 #include "core/style/StyleMotionRotation.h" | 36 #include "core/style/StyleOffsetRotation.h" |
37 #include "core/style/StyleReflection.h" | 37 #include "core/style/StyleReflection.h" |
38 #include "core/style/StyleScrollSnapData.h" | 38 #include "core/style/StyleScrollSnapData.h" |
39 #include "core/style/TransformOrigin.h" | 39 #include "core/style/TransformOrigin.h" |
40 #include "platform/LengthSize.h" | 40 #include "platform/LengthSize.h" |
41 #include "platform/fonts/FontDescription.h" | 41 #include "platform/fonts/FontDescription.h" |
42 #include "platform/text/TabSize.h" | 42 #include "platform/text/TabSize.h" |
43 #include "platform/transforms/Rotation.h" | 43 #include "platform/transforms/Rotation.h" |
44 #include "wtf/Allocator.h" | 44 #include "wtf/Allocator.h" |
45 | 45 |
46 namespace blink { | 46 namespace blink { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 static Vector<GridTrackSize> convertGridTrackSizeList(StyleResolverState&, c
onst CSSValue&); | 80 static Vector<GridTrackSize> convertGridTrackSizeList(StyleResolverState&, c
onst CSSValue&); |
81 template <typename T> static T convertLineWidth(StyleResolverState&, const C
SSValue&); | 81 template <typename T> static T convertLineWidth(StyleResolverState&, const C
SSValue&); |
82 static Length convertLength(const StyleResolverState&, const CSSValue&); | 82 static Length convertLength(const StyleResolverState&, const CSSValue&); |
83 static UnzoomedLength convertUnzoomedLength(const StyleResolverState&, const
CSSValue&); | 83 static UnzoomedLength convertUnzoomedLength(const StyleResolverState&, const
CSSValue&); |
84 static Length convertLengthOrAuto(const StyleResolverState&, const CSSValue&
); | 84 static Length convertLengthOrAuto(const StyleResolverState&, const CSSValue&
); |
85 static Length convertLengthSizing(StyleResolverState&, const CSSValue&); | 85 static Length convertLengthSizing(StyleResolverState&, const CSSValue&); |
86 static Length convertLengthMaxSizing(StyleResolverState&, const CSSValue&); | 86 static Length convertLengthMaxSizing(StyleResolverState&, const CSSValue&); |
87 static TabSize convertLengthOrTabSpaces(StyleResolverState&, const CSSValue&
); | 87 static TabSize convertLengthOrTabSpaces(StyleResolverState&, const CSSValue&
); |
88 static Length convertLineHeight(StyleResolverState&, const CSSValue&); | 88 static Length convertLineHeight(StyleResolverState&, const CSSValue&); |
89 static float convertNumberOrPercentage(StyleResolverState&, const CSSValue&)
; | 89 static float convertNumberOrPercentage(StyleResolverState&, const CSSValue&)
; |
90 static StyleMotionRotation convertMotionRotation(StyleResolverState&, const
CSSValue&); | 90 static StyleOffsetRotation convertOffsetRotation(StyleResolverState&, const
CSSValue&); |
91 static LengthPoint convertPosition(StyleResolverState&, const CSSValue&); | 91 static LengthPoint convertPosition(StyleResolverState&, const CSSValue&); |
92 static float convertPerspective(StyleResolverState&, const CSSValue&); | 92 static float convertPerspective(StyleResolverState&, const CSSValue&); |
93 static Length convertQuirkyLength(StyleResolverState&, const CSSValue&); | 93 static Length convertQuirkyLength(StyleResolverState&, const CSSValue&); |
94 static PassRefPtr<QuotesData> convertQuotes(StyleResolverState&, const CSSVa
lue&); | 94 static PassRefPtr<QuotesData> convertQuotes(StyleResolverState&, const CSSVa
lue&); |
95 static LengthSize convertRadius(StyleResolverState&, const CSSValue&); | 95 static LengthSize convertRadius(StyleResolverState&, const CSSValue&); |
96 static EPaintOrder convertPaintOrder(StyleResolverState&, const CSSValue&); | 96 static EPaintOrder convertPaintOrder(StyleResolverState&, const CSSValue&); |
97 static PassRefPtr<ShadowList> convertShadow(StyleResolverState&, const CSSVa
lue&); | 97 static PassRefPtr<ShadowList> convertShadow(StyleResolverState&, const CSSVa
lue&); |
98 static ShapeValue* convertShapeValue(StyleResolverState&, const CSSValue&); | 98 static ShapeValue* convertShapeValue(StyleResolverState&, const CSSValue&); |
99 static float convertSpacing(StyleResolverState&, const CSSValue&); | 99 static float convertSpacing(StyleResolverState&, const CSSValue&); |
100 template <CSSValueID IdForNone> static AtomicString convertString(StyleResol
verState&, const CSSValue&); | 100 template <CSSValueID IdForNone> static AtomicString convertString(StyleResol
verState&, const CSSValue&); |
(...skipping 10 matching lines...) Expand all Loading... |
111 static void convertOrderedNamedGridLinesMapToNamedGridLinesMap(const Ordered
NamedGridLines&, NamedGridLinesMap&); | 111 static void convertOrderedNamedGridLinesMapToNamedGridLinesMap(const Ordered
NamedGridLines&, NamedGridLinesMap&); |
112 | 112 |
113 static ScrollSnapPoints convertSnapPoints(StyleResolverState&, const CSSValu
e&); | 113 static ScrollSnapPoints convertSnapPoints(StyleResolverState&, const CSSValu
e&); |
114 static Vector<LengthPoint> convertSnapCoordinates(StyleResolverState&, const
CSSValue&); | 114 static Vector<LengthPoint> convertSnapCoordinates(StyleResolverState&, const
CSSValue&); |
115 static LengthPoint convertSnapDestination(StyleResolverState&, const CSSValu
e&); | 115 static LengthPoint convertSnapDestination(StyleResolverState&, const CSSValu
e&); |
116 static PassRefPtr<TranslateTransformOperation> convertTranslate(StyleResolve
rState&, const CSSValue&); | 116 static PassRefPtr<TranslateTransformOperation> convertTranslate(StyleResolve
rState&, const CSSValue&); |
117 static PassRefPtr<RotateTransformOperation> convertRotate(StyleResolverState
&, const CSSValue&); | 117 static PassRefPtr<RotateTransformOperation> convertRotate(StyleResolverState
&, const CSSValue&); |
118 static PassRefPtr<ScaleTransformOperation> convertScale(StyleResolverState&,
const CSSValue&); | 118 static PassRefPtr<ScaleTransformOperation> convertScale(StyleResolverState&,
const CSSValue&); |
119 static RespectImageOrientationEnum convertImageOrientation(StyleResolverStat
e&, const CSSValue&); | 119 static RespectImageOrientationEnum convertImageOrientation(StyleResolverStat
e&, const CSSValue&); |
120 static PassRefPtr<StylePath> convertPathOrNone(StyleResolverState&, const CS
SValue&); | 120 static PassRefPtr<StylePath> convertPathOrNone(StyleResolverState&, const CS
SValue&); |
121 static StyleMotionRotation convertMotionRotation(const CSSValue&); | 121 static StyleOffsetRotation convertOffsetRotation(const CSSValue&); |
122 template <CSSValueID cssValueFor0, CSSValueID cssValueFor100> static Length
convertPositionLength(StyleResolverState&, const CSSValue&); | 122 template <CSSValueID cssValueFor0, CSSValueID cssValueFor100> static Length
convertPositionLength(StyleResolverState&, const CSSValue&); |
123 static Rotation convertRotation(const CSSValue&); | 123 static Rotation convertRotation(const CSSValue&); |
124 | 124 |
125 static const CSSValue& convertRegisteredPropertyValue(const StyleResolverSta
te&, const CSSValue&); | 125 static const CSSValue& convertRegisteredPropertyValue(const StyleResolverSta
te&, const CSSValue&); |
126 }; | 126 }; |
127 | 127 |
128 template <typename T> | 128 template <typename T> |
129 T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, const
CSSValue& value) | 129 T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, const
CSSValue& value) |
130 { | 130 { |
131 return toCSSPrimitiveValue(value).computeLength<T>(state.cssToLengthConversi
onData()); | 131 return toCSSPrimitiveValue(value).computeLength<T>(state.cssToLengthConversi
onData()); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 { | 173 { |
174 if (value.isStringValue()) | 174 if (value.isStringValue()) |
175 return AtomicString(toCSSStringValue(value).value()); | 175 return AtomicString(toCSSStringValue(value).value()); |
176 ASSERT(toCSSPrimitiveValue(value).getValueID() == IdForNone); | 176 ASSERT(toCSSPrimitiveValue(value).getValueID() == IdForNone); |
177 return nullAtom; | 177 return nullAtom; |
178 } | 178 } |
179 | 179 |
180 } // namespace blink | 180 } // namespace blink |
181 | 181 |
182 #endif | 182 #endif |
OLD | NEW |