OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
3 * | 4 * |
4 * * Redistributions of source code must retain the above copyright | 5 * * Redistributions of source code must retain the above copyright |
5 * notice, this list of conditions and the following disclaimer. | 6 * notice, this list of conditions and the following disclaimer. |
6 * * Redistributions in binary form must reproduce the above | 7 * * Redistributions in binary form must reproduce the above |
7 * copyright notice, this list of conditions and the following disclaimer | 8 * copyright notice, this list of conditions and the following disclaimer |
8 * in the documentation and/or other materials provided with the | 9 * in the documentation and/or other materials provided with the |
9 * distribution. | 10 * distribution. |
10 * * Neither the name of Google Inc. nor the names of its | 11 * * Neither the name of Google Inc. nor the names of its |
11 * contributors may be used to endorse or promote products derived from | 12 * contributors may be used to endorse or promote products derived from |
12 * this software without specific prior written permission. | 13 * this software without specific prior written permission. |
(...skipping 12 matching lines...) Expand all Loading... |
25 */ | 26 */ |
26 | 27 |
27 #ifndef StyleBuilderConverter_h | 28 #ifndef StyleBuilderConverter_h |
28 #define StyleBuilderConverter_h | 29 #define StyleBuilderConverter_h |
29 | 30 |
30 #include "core/css/CSSValue.h" | 31 #include "core/css/CSSValue.h" |
31 #include "core/css/resolver/StyleResolverState.h" | 32 #include "core/css/resolver/StyleResolverState.h" |
32 #include "core/rendering/RenderView.h" | 33 #include "core/rendering/RenderView.h" |
33 #include "core/rendering/style/QuotesData.h" | 34 #include "core/rendering/style/QuotesData.h" |
34 #include "core/rendering/style/ShadowList.h" | 35 #include "core/rendering/style/ShadowList.h" |
| 36 #include "core/rendering/style/StyleNavigationValue.h" |
35 #include "core/rendering/style/StyleReflection.h" | 37 #include "core/rendering/style/StyleReflection.h" |
36 #include "core/svg/SVGLength.h" | 38 #include "core/svg/SVGLength.h" |
37 #include "platform/LengthSize.h" | 39 #include "platform/LengthSize.h" |
38 #include "platform/fonts/FontDescription.h" | 40 #include "platform/fonts/FontDescription.h" |
39 | 41 |
40 namespace blink { | 42 namespace blink { |
41 | 43 |
42 // Note that we assume the parser only allows valid CSSValue types. | 44 // Note that we assume the parser only allows valid CSSValue types. |
43 | 45 |
44 class StyleBuilderConverter { | 46 class StyleBuilderConverter { |
(...skipping 22 matching lines...) Expand all Loading... |
67 static PassRefPtr<QuotesData> convertQuotes(StyleResolverState&, CSSValue*); | 69 static PassRefPtr<QuotesData> convertQuotes(StyleResolverState&, CSSValue*); |
68 static LengthSize convertRadius(StyleResolverState&, CSSValue*); | 70 static LengthSize convertRadius(StyleResolverState&, CSSValue*); |
69 static EPaintOrder convertPaintOrder(StyleResolverState&, CSSValue*); | 71 static EPaintOrder convertPaintOrder(StyleResolverState&, CSSValue*); |
70 static PassRefPtr<ShadowList> convertShadow(StyleResolverState&, CSSValue*); | 72 static PassRefPtr<ShadowList> convertShadow(StyleResolverState&, CSSValue*); |
71 static float convertSpacing(StyleResolverState&, CSSValue*); | 73 static float convertSpacing(StyleResolverState&, CSSValue*); |
72 template <CSSValueID IdForNone> static AtomicString convertString(StyleResol
verState&, CSSValue*); | 74 template <CSSValueID IdForNone> static AtomicString convertString(StyleResol
verState&, CSSValue*); |
73 static PassRefPtr<SVGLengthList> convertStrokeDasharray(StyleResolverState&,
CSSValue*); | 75 static PassRefPtr<SVGLengthList> convertStrokeDasharray(StyleResolverState&,
CSSValue*); |
74 static StyleColor convertStyleColor(StyleResolverState&, CSSValue*, bool for
VisitedLink = false); | 76 static StyleColor convertStyleColor(StyleResolverState&, CSSValue*, bool for
VisitedLink = false); |
75 static Color convertSVGColor(StyleResolverState&, CSSValue*); | 77 static Color convertSVGColor(StyleResolverState&, CSSValue*); |
76 static PassRefPtr<SVGLength> convertSVGLength(StyleResolverState&, CSSValue*
); | 78 static PassRefPtr<SVGLength> convertSVGLength(StyleResolverState&, CSSValue*
); |
| 79 static StyleNavigationValue convertStyleNavigationValue(StyleResolverState&,
CSSValue*); |
77 static float convertTextStrokeWidth(StyleResolverState&, CSSValue*); | 80 static float convertTextStrokeWidth(StyleResolverState&, CSSValue*); |
78 | 81 |
79 static bool convertGridTrackList(CSSValue*, Vector<GridTrackSize>&, NamedGri
dLinesMap&, OrderedNamedGridLines&, StyleResolverState&); | 82 static bool convertGridTrackList(CSSValue*, Vector<GridTrackSize>&, NamedGri
dLinesMap&, OrderedNamedGridLines&, StyleResolverState&); |
80 static void createImplicitNamedGridLinesFromGridArea(const NamedGridAreaMap&
, NamedGridLinesMap&, GridTrackSizingDirection); | 83 static void createImplicitNamedGridLinesFromGridArea(const NamedGridAreaMap&
, NamedGridLinesMap&, GridTrackSizingDirection); |
81 }; | 84 }; |
82 | 85 |
83 template <typename T> | 86 template <typename T> |
84 T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, CSSVal
ue* value) | 87 T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, CSSVal
ue* value) |
85 { | 88 { |
86 return toCSSPrimitiveValue(value)->computeLength<T>(state.cssToLengthConvers
ionData()); | 89 return toCSSPrimitiveValue(value)->computeLength<T>(state.cssToLengthConvers
ionData()); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 { | 129 { |
127 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 130 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
128 if (primitiveValue->getValueID() == IdForNone) | 131 if (primitiveValue->getValueID() == IdForNone) |
129 return nullAtom; | 132 return nullAtom; |
130 return AtomicString(primitiveValue->getStringValue()); | 133 return AtomicString(primitiveValue->getStringValue()); |
131 } | 134 } |
132 | 135 |
133 } // namespace blink | 136 } // namespace blink |
134 | 137 |
135 #endif | 138 #endif |
OLD | NEW |