| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
| 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| (...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 if (baselineShift == BS_LENGTH) | 935 if (baselineShift == BS_LENGTH) |
| 936 svgStyle.setBaselineShiftValue(parentSvgStyle.baselineShiftValue()); | 936 svgStyle.setBaselineShiftValue(parentSvgStyle.baselineShiftValue()); |
| 937 } | 937 } |
| 938 | 938 |
| 939 void StyleBuilderFunctions::applyValueCSSPropertyBaselineShift(StyleResolverStat
e& state, CSSValue* value) | 939 void StyleBuilderFunctions::applyValueCSSPropertyBaselineShift(StyleResolverStat
e& state, CSSValue* value) |
| 940 { | 940 { |
| 941 SVGLayoutStyle& svgStyle = state.style()->accessSVGStyle(); | 941 SVGLayoutStyle& svgStyle = state.style()->accessSVGStyle(); |
| 942 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 942 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 943 if (!primitiveValue->isValueID()) { | 943 if (!primitiveValue->isValueID()) { |
| 944 svgStyle.setBaselineShift(BS_LENGTH); | 944 svgStyle.setBaselineShift(BS_LENGTH); |
| 945 svgStyle.setBaselineShiftValue(SVGLength::fromCSSPrimitiveValue(primitiv
eValue)); | 945 svgStyle.setBaselineShiftValue(StyleBuilderConverter::convertLength(stat
e, primitiveValue)); |
| 946 return; | 946 return; |
| 947 } | 947 } |
| 948 switch (primitiveValue->getValueID()) { | 948 switch (primitiveValue->getValueID()) { |
| 949 case CSSValueBaseline: | 949 case CSSValueBaseline: |
| 950 svgStyle.setBaselineShift(BS_BASELINE); | 950 svgStyle.setBaselineShift(BS_LENGTH); |
| 951 svgStyle.setBaselineShiftValue(Length(Fixed)); |
| 951 return; | 952 return; |
| 952 case CSSValueSub: | 953 case CSSValueSub: |
| 953 svgStyle.setBaselineShift(BS_SUB); | 954 svgStyle.setBaselineShift(BS_SUB); |
| 954 return; | 955 return; |
| 955 case CSSValueSuper: | 956 case CSSValueSuper: |
| 956 svgStyle.setBaselineShift(BS_SUPER); | 957 svgStyle.setBaselineShift(BS_SUPER); |
| 957 return; | 958 return; |
| 958 default: | 959 default: |
| 959 ASSERT_NOT_REACHED(); | 960 ASSERT_NOT_REACHED(); |
| 960 } | 961 } |
| 961 } | 962 } |
| 962 | 963 |
| 963 } // namespace blink | 964 } // namespace blink |
| OLD | NEW |