| 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 26 matching lines...) Expand all  Loading... | 
| 37 // Note that we assume the parser only allows valid CSSValue types. | 37 // Note that we assume the parser only allows valid CSSValue types. | 
| 38 | 38 | 
| 39 class StyleBuilderConverter { | 39 class StyleBuilderConverter { | 
| 40 public: | 40 public: | 
| 41     template <typename T> static T convertComputedLength(StyleResolverState&, CS
    SValue*); | 41     template <typename T> static T convertComputedLength(StyleResolverState&, CS
    SValue*); | 
| 42     template <typename T> static T convertLineWidth(StyleResolverState&, CSSValu
    e*); | 42     template <typename T> static T convertLineWidth(StyleResolverState&, CSSValu
    e*); | 
| 43     static Length convertLength(StyleResolverState&, CSSValue*); | 43     static Length convertLength(StyleResolverState&, CSSValue*); | 
| 44     static Length convertLengthOrAuto(StyleResolverState&, CSSValue*); | 44     static Length convertLengthOrAuto(StyleResolverState&, CSSValue*); | 
| 45     static Length convertLengthSizing(StyleResolverState&, CSSValue*); | 45     static Length convertLengthSizing(StyleResolverState&, CSSValue*); | 
| 46     static Length convertLengthMaxSizing(StyleResolverState&, CSSValue*); | 46     static Length convertLengthMaxSizing(StyleResolverState&, CSSValue*); | 
|  | 47     static LengthPoint convertLengthPoint(StyleResolverState&, CSSValue*); | 
| 47     static LengthSize convertRadius(StyleResolverState&, CSSValue*); | 48     static LengthSize convertRadius(StyleResolverState&, CSSValue*); | 
| 48     static float convertSpacing(StyleResolverState&, CSSValue*); | 49     static float convertSpacing(StyleResolverState&, CSSValue*); | 
| 49     template <CSSValueID IdForNone> static AtomicString convertString(StyleResol
    verState&, CSSValue*); | 50     template <CSSValueID IdForNone> static AtomicString convertString(StyleResol
    verState&, CSSValue*); | 
| 50 }; | 51 }; | 
| 51 | 52 | 
| 52 template <typename T> | 53 template <typename T> | 
| 53 T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, CSSVal
    ue* value) | 54 T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, CSSVal
    ue* value) | 
| 54 { | 55 { | 
| 55     CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 56     CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 
| 56     float zoom = state.style()->effectiveZoom(); | 57     float zoom = state.style()->effectiveZoom(); | 
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 89 { | 90 { | 
| 90     CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 91     CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 
| 91     if (primitiveValue->getValueID() == IdForNone) | 92     if (primitiveValue->getValueID() == IdForNone) | 
| 92         return nullAtom; | 93         return nullAtom; | 
| 93     return primitiveValue->getStringValue(); | 94     return primitiveValue->getStringValue(); | 
| 94 } | 95 } | 
| 95 | 96 | 
| 96 } // namespace WebCore | 97 } // namespace WebCore | 
| 97 | 98 | 
| 98 #endif | 99 #endif | 
| OLD | NEW | 
|---|