| 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 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 } | 864 } |
| 865 | 865 |
| 866 StyleColor StyleBuilderConverter::convertStyleColor(StyleResolverState& state, C
SSValue* value, bool forVisitedLink) | 866 StyleColor StyleBuilderConverter::convertStyleColor(StyleResolverState& state, C
SSValue* value, bool forVisitedLink) |
| 867 { | 867 { |
| 868 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 868 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 869 if (primitiveValue->getValueID() == CSSValueCurrentcolor) | 869 if (primitiveValue->getValueID() == CSSValueCurrentcolor) |
| 870 return StyleColor::currentColor(); | 870 return StyleColor::currentColor(); |
| 871 return state.document().textLinkColors().colorFromPrimitiveValue(primitiveVa
lue, Color(), forVisitedLink); | 871 return state.document().textLinkColors().colorFromPrimitiveValue(primitiveVa
lue, Color(), forVisitedLink); |
| 872 } | 872 } |
| 873 | 873 |
| 874 Color StyleBuilderConverter::convertSVGColor(StyleResolverState& state, CSSValue
* value) | |
| 875 { | |
| 876 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | |
| 877 if (primitiveValue->isRGBColor()) | |
| 878 return primitiveValue->getRGBA32Value(); | |
| 879 ASSERT(primitiveValue->getValueID() == CSSValueCurrentcolor); | |
| 880 return state.style()->color(); | |
| 881 } | |
| 882 | |
| 883 float StyleBuilderConverter::convertTextStrokeWidth(StyleResolverState& state, C
SSValue* value) | 874 float StyleBuilderConverter::convertTextStrokeWidth(StyleResolverState& state, C
SSValue* value) |
| 884 { | 875 { |
| 885 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 876 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 886 if (primitiveValue->getValueID()) { | 877 if (primitiveValue->getValueID()) { |
| 887 float multiplier = convertLineWidth<float>(state, value); | 878 float multiplier = convertLineWidth<float>(state, value); |
| 888 return CSSPrimitiveValue::create(multiplier / 48, CSSPrimitiveValue::CSS
_EMS)->computeLength<float>(state.cssToLengthConversionData()); | 879 return CSSPrimitiveValue::create(multiplier / 48, CSSPrimitiveValue::CSS
_EMS)->computeLength<float>(state.cssToLengthConversionData()); |
| 889 } | 880 } |
| 890 return primitiveValue->computeLength<float>(state.cssToLengthConversionData(
)); | 881 return primitiveValue->computeLength<float>(state.cssToLengthConversionData(
)); |
| 891 } | 882 } |
| 892 | 883 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 double sz = 1; | 972 double sz = 1; |
| 982 if (list.length() >= 2) | 973 if (list.length() >= 2) |
| 983 sy = toCSSPrimitiveValue(list.item(1))->getDoubleValue(); | 974 sy = toCSSPrimitiveValue(list.item(1))->getDoubleValue(); |
| 984 if (list.length() == 3) | 975 if (list.length() == 3) |
| 985 sz = toCSSPrimitiveValue(list.item(2))->getDoubleValue(); | 976 sz = toCSSPrimitiveValue(list.item(2))->getDoubleValue(); |
| 986 | 977 |
| 987 return ScaleTransformOperation::create(sx, sy, sz, TransformOperation::Scale
3D); | 978 return ScaleTransformOperation::create(sx, sy, sz, TransformOperation::Scale
3D); |
| 988 } | 979 } |
| 989 | 980 |
| 990 } // namespace blink | 981 } // namespace blink |
| OLD | NEW |