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