| 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 17 matching lines...) Expand all Loading... |
| 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/svg/SVGLength.h" | 36 #include "core/svg/SVGLength.h" |
| 37 #include "platform/LengthSize.h" | 37 #include "platform/LengthSize.h" |
| 38 #include "platform/fonts/FontDescription.h" |
| 38 | 39 |
| 39 namespace blink { | 40 namespace blink { |
| 40 | 41 |
| 41 // Note that we assume the parser only allows valid CSSValue types. | 42 // Note that we assume the parser only allows valid CSSValue types. |
| 42 | 43 |
| 43 class StyleBuilderConverter { | 44 class StyleBuilderConverter { |
| 44 public: | 45 public: |
| 45 static PassRefPtr<StyleReflection> convertBoxReflect(StyleResolverState&, CS
SValue*); | 46 static PassRefPtr<StyleReflection> convertBoxReflect(StyleResolverState&, CS
SValue*); |
| 46 static AtomicString convertFragmentIdentifier(StyleResolverState&, CSSValue*
); | 47 static AtomicString convertFragmentIdentifier(StyleResolverState&, CSSValue*
); |
| 47 static Color convertColor(StyleResolverState&, CSSValue*, bool forVisitedLin
k = false); | 48 static Color convertColor(StyleResolverState&, CSSValue*, bool forVisitedLin
k = false); |
| 48 template <typename T> static T convertComputedLength(StyleResolverState&, CS
SValue*); | 49 template <typename T> static T convertComputedLength(StyleResolverState&, CS
SValue*); |
| 49 template <typename T> static T convertFlags(StyleResolverState&, CSSValue*); | 50 template <typename T> static T convertFlags(StyleResolverState&, CSSValue*); |
| 51 static FontDescription::VariantLigatures convertFontVariantLigatures(StyleRe
solverState&, CSSValue*); |
| 50 static EGlyphOrientation convertGlyphOrientation(StyleResolverState&, CSSVal
ue*); | 52 static EGlyphOrientation convertGlyphOrientation(StyleResolverState&, CSSVal
ue*); |
| 51 static GridPosition convertGridPosition(StyleResolverState&, CSSValue*); | 53 static GridPosition convertGridPosition(StyleResolverState&, CSSValue*); |
| 52 static GridTrackSize convertGridTrackSize(StyleResolverState&, CSSValue*); | 54 static GridTrackSize convertGridTrackSize(StyleResolverState&, CSSValue*); |
| 53 template <typename T> static T convertLineWidth(StyleResolverState&, CSSValu
e*); | 55 template <typename T> static T convertLineWidth(StyleResolverState&, CSSValu
e*); |
| 54 static Length convertLength(StyleResolverState&, CSSValue*); | 56 static Length convertLength(StyleResolverState&, CSSValue*); |
| 55 static Length convertLengthOrAuto(StyleResolverState&, CSSValue*); | 57 static Length convertLengthOrAuto(StyleResolverState&, CSSValue*); |
| 56 static Length convertLengthSizing(StyleResolverState&, CSSValue*); | 58 static Length convertLengthSizing(StyleResolverState&, CSSValue*); |
| 57 static Length convertLengthMaxSizing(StyleResolverState&, CSSValue*); | 59 static Length convertLengthMaxSizing(StyleResolverState&, CSSValue*); |
| 58 static LengthPoint convertLengthPoint(StyleResolverState&, CSSValue*); | 60 static LengthPoint convertLengthPoint(StyleResolverState&, CSSValue*); |
| 59 static LineBoxContain convertLineBoxContain(StyleResolverState&, CSSValue*); | 61 static LineBoxContain convertLineBoxContain(StyleResolverState&, CSSValue*); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 { | 121 { |
| 120 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 122 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 121 if (primitiveValue->getValueID() == IdForNone) | 123 if (primitiveValue->getValueID() == IdForNone) |
| 122 return nullAtom; | 124 return nullAtom; |
| 123 return AtomicString(primitiveValue->getStringValue()); | 125 return AtomicString(primitiveValue->getStringValue()); |
| 124 } | 126 } |
| 125 | 127 |
| 126 } // namespace blink | 128 } // namespace blink |
| 127 | 129 |
| 128 #endif | 130 #endif |
| OLD | NEW |