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 16 matching lines...) Expand all Loading... |
27 #ifndef StyleBuilderConverter_h | 27 #ifndef StyleBuilderConverter_h |
28 #define StyleBuilderConverter_h | 28 #define StyleBuilderConverter_h |
29 | 29 |
30 #include "core/css/CSSValue.h" | 30 #include "core/css/CSSValue.h" |
31 #include "core/css/resolver/StyleResolverState.h" | 31 #include "core/css/resolver/StyleResolverState.h" |
32 #include "core/rendering/RenderView.h" | 32 #include "core/rendering/RenderView.h" |
33 #include "core/rendering/style/AspectRatio.h" | 33 #include "core/rendering/style/AspectRatio.h" |
34 #include "core/rendering/style/QuotesData.h" | 34 #include "core/rendering/style/QuotesData.h" |
35 #include "core/rendering/style/ShadowList.h" | 35 #include "core/rendering/style/ShadowList.h" |
36 #include "core/rendering/style/StyleReflection.h" | 36 #include "core/rendering/style/StyleReflection.h" |
| 37 #include "core/rendering/style/TransformOrigin.h" |
37 #include "core/svg/SVGLength.h" | 38 #include "core/svg/SVGLength.h" |
38 #include "platform/LengthSize.h" | 39 #include "platform/LengthSize.h" |
39 #include "platform/fonts/FontDescription.h" | 40 #include "platform/fonts/FontDescription.h" |
40 | 41 |
41 namespace blink { | 42 namespace blink { |
42 | 43 |
43 // Note that we assume the parser only allows valid CSSValue types. | 44 // Note that we assume the parser only allows valid CSSValue types. |
44 | 45 |
45 class StyleBuilderConverter { | 46 class StyleBuilderConverter { |
46 public: | 47 public: |
(...skipping 27 matching lines...) Expand all Loading... |
74 static LengthSize convertRadius(StyleResolverState&, CSSValue*); | 75 static LengthSize convertRadius(StyleResolverState&, CSSValue*); |
75 static EPaintOrder convertPaintOrder(StyleResolverState&, CSSValue*); | 76 static EPaintOrder convertPaintOrder(StyleResolverState&, CSSValue*); |
76 static PassRefPtr<ShadowList> convertShadow(StyleResolverState&, CSSValue*); | 77 static PassRefPtr<ShadowList> convertShadow(StyleResolverState&, CSSValue*); |
77 static float convertSpacing(StyleResolverState&, CSSValue*); | 78 static float convertSpacing(StyleResolverState&, CSSValue*); |
78 template <CSSValueID IdForNone> static AtomicString convertString(StyleResol
verState&, CSSValue*); | 79 template <CSSValueID IdForNone> static AtomicString convertString(StyleResol
verState&, CSSValue*); |
79 static PassRefPtr<SVGLengthList> convertStrokeDasharray(StyleResolverState&,
CSSValue*); | 80 static PassRefPtr<SVGLengthList> convertStrokeDasharray(StyleResolverState&,
CSSValue*); |
80 static StyleColor convertStyleColor(StyleResolverState&, CSSValue*, bool for
VisitedLink = false); | 81 static StyleColor convertStyleColor(StyleResolverState&, CSSValue*, bool for
VisitedLink = false); |
81 static Color convertSVGColor(StyleResolverState&, CSSValue*); | 82 static Color convertSVGColor(StyleResolverState&, CSSValue*); |
82 static PassRefPtr<SVGLength> convertSVGLength(StyleResolverState&, CSSValue*
); | 83 static PassRefPtr<SVGLength> convertSVGLength(StyleResolverState&, CSSValue*
); |
83 static float convertTextStrokeWidth(StyleResolverState&, CSSValue*); | 84 static float convertTextStrokeWidth(StyleResolverState&, CSSValue*); |
| 85 static TransformOrigin convertTransformOrigin(StyleResolverState&, CSSValue*
); |
84 | 86 |
85 static bool convertGridTrackList(CSSValue*, Vector<GridTrackSize>&, NamedGri
dLinesMap&, OrderedNamedGridLines&, StyleResolverState&); | 87 static bool convertGridTrackList(CSSValue*, Vector<GridTrackSize>&, NamedGri
dLinesMap&, OrderedNamedGridLines&, StyleResolverState&); |
86 static void createImplicitNamedGridLinesFromGridArea(const NamedGridAreaMap&
, NamedGridLinesMap&, GridTrackSizingDirection); | 88 static void createImplicitNamedGridLinesFromGridArea(const NamedGridAreaMap&
, NamedGridLinesMap&, GridTrackSizingDirection); |
87 }; | 89 }; |
88 | 90 |
89 template <typename T> | 91 template <typename T> |
90 T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, CSSVal
ue* value) | 92 T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, CSSVal
ue* value) |
91 { | 93 { |
92 return toCSSPrimitiveValue(value)->computeLength<T>(state.cssToLengthConvers
ionData()); | 94 return toCSSPrimitiveValue(value)->computeLength<T>(state.cssToLengthConvers
ionData()); |
93 } | 95 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 { | 136 { |
135 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 137 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
136 if (primitiveValue->getValueID() == IdForNone) | 138 if (primitiveValue->getValueID() == IdForNone) |
137 return nullAtom; | 139 return nullAtom; |
138 return AtomicString(primitiveValue->getStringValue()); | 140 return AtomicString(primitiveValue->getStringValue()); |
139 } | 141 } |
140 | 142 |
141 } // namespace blink | 143 } // namespace blink |
142 | 144 |
143 #endif | 145 #endif |
OLD | NEW |