| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 return primitiveValue->cssCalcValue()->toCalcValue(conversionData)->eval
uate(parentSize.value); | 218 return primitiveValue->cssCalcValue()->toCalcValue(conversionData)->eval
uate(parentSize.value); |
| 219 | 219 |
| 220 ASSERT_NOT_REACHED(); | 220 ASSERT_NOT_REACHED(); |
| 221 return 0; | 221 return 0; |
| 222 } | 222 } |
| 223 | 223 |
| 224 FontDescription::Size StyleBuilderConverter::convertFontSize(StyleResolverState&
state, CSSValue* value) | 224 FontDescription::Size StyleBuilderConverter::convertFontSize(StyleResolverState&
state, CSSValue* value) |
| 225 { | 225 { |
| 226 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 226 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 227 | 227 |
| 228 FontDescription::Size parentSize(0, 0.0f, false); | 228 FontDescription::Size parentSize = state.parentFontDescription().size(); |
| 229 | |
| 230 // FIXME: Find out when parentStyle could be 0? | |
| 231 if (state.parentStyle()) | |
| 232 parentSize = state.parentFontDescription().size(); | |
| 233 | 229 |
| 234 if (CSSValueID valueID = primitiveValue->getValueID()) { | 230 if (CSSValueID valueID = primitiveValue->getValueID()) { |
| 235 switch (valueID) { | 231 switch (valueID) { |
| 236 case CSSValueXxSmall: | 232 case CSSValueXxSmall: |
| 237 case CSSValueXSmall: | 233 case CSSValueXSmall: |
| 238 case CSSValueSmall: | 234 case CSSValueSmall: |
| 239 case CSSValueMedium: | 235 case CSSValueMedium: |
| 240 case CSSValueLarge: | 236 case CSSValueLarge: |
| 241 case CSSValueXLarge: | 237 case CSSValueXLarge: |
| 242 case CSSValueXxLarge: | 238 case CSSValueXxLarge: |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 CSSPrimitiveValue* primitiveValueZ = toCSSPrimitiveValue(list->item(2)); | 815 CSSPrimitiveValue* primitiveValueZ = toCSSPrimitiveValue(list->item(2)); |
| 820 | 816 |
| 821 return TransformOrigin( | 817 return TransformOrigin( |
| 822 convertOriginLength<CSSValueLeft, CSSValueRight>(state, primitiveValueX)
, | 818 convertOriginLength<CSSValueLeft, CSSValueRight>(state, primitiveValueX)
, |
| 823 convertOriginLength<CSSValueTop, CSSValueBottom>(state, primitiveValueY)
, | 819 convertOriginLength<CSSValueTop, CSSValueBottom>(state, primitiveValueY)
, |
| 824 StyleBuilderConverter::convertComputedLength<float>(state, primitiveValu
eZ) | 820 StyleBuilderConverter::convertComputedLength<float>(state, primitiveValu
eZ) |
| 825 ); | 821 ); |
| 826 } | 822 } |
| 827 | 823 |
| 828 } // namespace blink | 824 } // namespace blink |
| OLD | NEW |