| 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 #include "config.h" | 27 #include "config.h" |
| 28 #include "core/css/resolver/StyleBuilderConverter.h" | 28 #include "core/css/resolver/StyleBuilderConverter.h" |
| 29 | 29 |
| 30 #include "core/css/CSSPrimitiveValueMappings.h" | 30 #include "core/css/CSSPrimitiveValueMappings.h" |
| 31 #include "core/css/CSSShadowValue.h" | 31 #include "core/css/CSSShadowValue.h" |
| 32 #include "core/css/Pair.h" | 32 #include "core/css/Pair.h" |
| 33 #include "core/svg/SVGURIReference.h" | 33 #include "core/svg/SVGURIReference.h" |
| 34 | 34 |
| 35 namespace WebCore { | 35 namespace WebCore { |
| 36 | 36 |
| 37 String StyleBuilderConverter::convertFragmentIdentifier(StyleResolverState& stat
e, CSSValue* value) | 37 AtomicString StyleBuilderConverter::convertFragmentIdentifier(StyleResolverState
& state, CSSValue* value) |
| 38 { | 38 { |
| 39 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 39 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 40 if (primitiveValue->isURI()) | 40 if (primitiveValue->isURI()) |
| 41 return SVGURIReference::fragmentIdentifierFromIRIString(primitiveValue->
getStringValue(), state.document()); | 41 return SVGURIReference::fragmentIdentifierFromIRIString(primitiveValue->
getStringValue(), state.document()); |
| 42 return String(); | 42 return nullAtom; |
| 43 } | 43 } |
| 44 | 44 |
| 45 Length StyleBuilderConverter::convertLength(StyleResolverState& state, CSSValue*
value) | 45 Length StyleBuilderConverter::convertLength(StyleResolverState& state, CSSValue*
value) |
| 46 { | 46 { |
| 47 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 47 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 48 Length result = primitiveValue->convertToLength<FixedConversion | PercentCon
version>(state.cssToLengthConversionData()); | 48 Length result = primitiveValue->convertToLength<FixedConversion | PercentCon
version>(state.cssToLengthConversionData()); |
| 49 result.setQuirk(primitiveValue->isQuirkValue()); | 49 result.setQuirk(primitiveValue->isQuirkValue()); |
| 50 return result; | 50 return result; |
| 51 } | 51 } |
| 52 | 52 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 return primitiveValue->computeLength<float>(state.cssToLengthConversionD
ata().copyWithAdjustedZoom(1)); | 163 return primitiveValue->computeLength<float>(state.cssToLengthConversionD
ata().copyWithAdjustedZoom(1)); |
| 164 return primitiveValue->computeLength<float>(state.cssToLengthConversionData(
)); | 164 return primitiveValue->computeLength<float>(state.cssToLengthConversionData(
)); |
| 165 } | 165 } |
| 166 | 166 |
| 167 SVGLength StyleBuilderConverter::convertSVGLength(StyleResolverState&, CSSValue*
value) | 167 SVGLength StyleBuilderConverter::convertSVGLength(StyleResolverState&, CSSValue*
value) |
| 168 { | 168 { |
| 169 return SVGLength::fromCSSPrimitiveValue(toCSSPrimitiveValue(value)); | 169 return SVGLength::fromCSSPrimitiveValue(toCSSPrimitiveValue(value)); |
| 170 } | 170 } |
| 171 | 171 |
| 172 } // namespace WebCore | 172 } // namespace WebCore |
| OLD | NEW |