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 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1096 for (size_t i = 0; i < length; ++i) { | 1096 for (size_t i = 0; i < length; ++i) { |
1097 array->append(convertLength(state, toCSSPrimitiveValue(dashes.item(i)))); | 1097 array->append(convertLength(state, toCSSPrimitiveValue(dashes.item(i)))); |
1098 } | 1098 } |
1099 | 1099 |
1100 return array.release(); | 1100 return array.release(); |
1101 } | 1101 } |
1102 | 1102 |
1103 StyleColor StyleBuilderConverter::convertStyleColor(StyleResolverState& state, | 1103 StyleColor StyleBuilderConverter::convertStyleColor(StyleResolverState& state, |
1104 const CSSValue& value, | 1104 const CSSValue& value, |
1105 bool forVisitedLink) { | 1105 bool forVisitedLink) { |
1106 if (value.isIdentifierValue() && | 1106 if (value.isIdentifierValue()) { |
1107 toCSSIdentifierValue(value).getValueID() == CSSValueCurrentcolor) | 1107 if (toCSSIdentifierValue(value).getValueID() == CSSValueCurrentcolor) |
1108 return StyleColor::currentColor(); | 1108 return StyleColor::currentColor(); |
| 1109 if (toCSSIdentifierValue(value).getValueID() == CSSValueAuto) |
| 1110 return StyleColor::autoColor(); |
| 1111 } |
1109 return state.document().textLinkColors().colorFromCSSValue(value, Color(), | 1112 return state.document().textLinkColors().colorFromCSSValue(value, Color(), |
1110 forVisitedLink); | 1113 forVisitedLink); |
1111 } | 1114 } |
1112 | 1115 |
1113 float StyleBuilderConverter::convertTextStrokeWidth(StyleResolverState& state, | 1116 float StyleBuilderConverter::convertTextStrokeWidth(StyleResolverState& state, |
1114 const CSSValue& value) { | 1117 const CSSValue& value) { |
1115 if (value.isIdentifierValue() && toCSSIdentifierValue(value).getValueID()) { | 1118 if (value.isIdentifierValue() && toCSSIdentifierValue(value).getValueID()) { |
1116 float multiplier = convertLineWidth<float>(state, value); | 1119 float multiplier = convertLineWidth<float>(state, value); |
1117 return CSSPrimitiveValue::create(multiplier / 48, | 1120 return CSSPrimitiveValue::create(multiplier / 48, |
1118 CSSPrimitiveValue::UnitType::Ems) | 1121 CSSPrimitiveValue::UnitType::Ems) |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1290 // Instead of the actual zoom, use 1 to avoid potential rounding errors | 1293 // Instead of the actual zoom, use 1 to avoid potential rounding errors |
1291 Length length = primitiveValue.convertToLength( | 1294 Length length = primitiveValue.convertToLength( |
1292 state.cssToLengthConversionData().copyWithAdjustedZoom(1)); | 1295 state.cssToLengthConversionData().copyWithAdjustedZoom(1)); |
1293 return *CSSPrimitiveValue::create(length, 1); | 1296 return *CSSPrimitiveValue::create(length, 1); |
1294 } | 1297 } |
1295 } | 1298 } |
1296 return value; | 1299 return value; |
1297 } | 1300 } |
1298 | 1301 |
1299 } // namespace blink | 1302 } // namespace blink |
OLD | NEW |