| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 if (reflect_value.Offset()) | 99 if (reflect_value.Offset()) |
| 100 reflection->SetOffset(reflect_value.Offset()->ConvertToLength( | 100 reflection->SetOffset(reflect_value.Offset()->ConvertToLength( |
| 101 state.CssToLengthConversionData())); | 101 state.CssToLengthConversionData())); |
| 102 if (reflect_value.Mask()) { | 102 if (reflect_value.Mask()) { |
| 103 NinePieceImage mask = NinePieceImage::MaskDefaults(); | 103 NinePieceImage mask = NinePieceImage::MaskDefaults(); |
| 104 CSSToStyleMap::MapNinePieceImage(state, CSSPropertyWebkitBoxReflect, | 104 CSSToStyleMap::MapNinePieceImage(state, CSSPropertyWebkitBoxReflect, |
| 105 *reflect_value.Mask(), mask); | 105 *reflect_value.Mask(), mask); |
| 106 reflection->SetMask(mask); | 106 reflection->SetMask(mask); |
| 107 } | 107 } |
| 108 | 108 |
| 109 return reflection.Release(); | 109 return reflection; |
| 110 } | 110 } |
| 111 | 111 |
| 112 Color StyleBuilderConverter::ConvertColor(StyleResolverState& state, | 112 Color StyleBuilderConverter::ConvertColor(StyleResolverState& state, |
| 113 const CSSValue& value, | 113 const CSSValue& value, |
| 114 bool for_visited_link) { | 114 bool for_visited_link) { |
| 115 return state.GetDocument().GetTextLinkColors().ColorFromCSSValue( | 115 return state.GetDocument().GetTextLinkColors().ColorFromCSSValue( |
| 116 value, state.Style()->GetColor(), for_visited_link); | 116 value, state.Style()->GetColor(), for_visited_link); |
| 117 } | 117 } |
| 118 | 118 |
| 119 AtomicString StyleBuilderConverter::ConvertFragmentIdentifier( | 119 AtomicString StyleBuilderConverter::ConvertFragmentIdentifier( |
| (...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 StyleResolverState&, | 1059 StyleResolverState&, |
| 1060 const CSSValue& value) { | 1060 const CSSValue& value) { |
| 1061 if (value.IsValueList()) { | 1061 if (value.IsValueList()) { |
| 1062 const CSSValueList& list = ToCSSValueList(value); | 1062 const CSSValueList& list = ToCSSValueList(value); |
| 1063 RefPtr<QuotesData> quotes = QuotesData::Create(); | 1063 RefPtr<QuotesData> quotes = QuotesData::Create(); |
| 1064 for (size_t i = 0; i < list.length(); i += 2) { | 1064 for (size_t i = 0; i < list.length(); i += 2) { |
| 1065 String start_quote = ToCSSStringValue(list.Item(i)).Value(); | 1065 String start_quote = ToCSSStringValue(list.Item(i)).Value(); |
| 1066 String end_quote = ToCSSStringValue(list.Item(i + 1)).Value(); | 1066 String end_quote = ToCSSStringValue(list.Item(i + 1)).Value(); |
| 1067 quotes->AddPair(std::make_pair(start_quote, end_quote)); | 1067 quotes->AddPair(std::make_pair(start_quote, end_quote)); |
| 1068 } | 1068 } |
| 1069 return quotes.Release(); | 1069 return quotes; |
| 1070 } | 1070 } |
| 1071 DCHECK_EQ(ToCSSIdentifierValue(value).GetValueID(), CSSValueNone); | 1071 DCHECK_EQ(ToCSSIdentifierValue(value).GetValueID(), CSSValueNone); |
| 1072 return QuotesData::Create(); | 1072 return QuotesData::Create(); |
| 1073 } | 1073 } |
| 1074 | 1074 |
| 1075 LengthSize StyleBuilderConverter::ConvertRadius(StyleResolverState& state, | 1075 LengthSize StyleBuilderConverter::ConvertRadius(StyleResolverState& state, |
| 1076 const CSSValue& value) { | 1076 const CSSValue& value) { |
| 1077 const CSSValuePair& pair = ToCSSValuePair(value); | 1077 const CSSValuePair& pair = ToCSSValuePair(value); |
| 1078 Length radius_width = ToCSSPrimitiveValue(pair.First()) | 1078 Length radius_width = ToCSSPrimitiveValue(pair.First()) |
| 1079 .ConvertToLength(state.CssToLengthConversionData()); | 1079 .ConvertToLength(state.CssToLengthConversionData()); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1192 return SVGComputedStyle::InitialStrokeDashArray(); | 1192 return SVGComputedStyle::InitialStrokeDashArray(); |
| 1193 | 1193 |
| 1194 const CSSValueList& dashes = ToCSSValueList(value); | 1194 const CSSValueList& dashes = ToCSSValueList(value); |
| 1195 | 1195 |
| 1196 RefPtr<SVGDashArray> array = SVGDashArray::Create(); | 1196 RefPtr<SVGDashArray> array = SVGDashArray::Create(); |
| 1197 size_t length = dashes.length(); | 1197 size_t length = dashes.length(); |
| 1198 for (size_t i = 0; i < length; ++i) { | 1198 for (size_t i = 0; i < length; ++i) { |
| 1199 array->push_back(ConvertLength(state, ToCSSPrimitiveValue(dashes.Item(i)))); | 1199 array->push_back(ConvertLength(state, ToCSSPrimitiveValue(dashes.Item(i)))); |
| 1200 } | 1200 } |
| 1201 | 1201 |
| 1202 return array.Release(); | 1202 return array; |
| 1203 } | 1203 } |
| 1204 | 1204 |
| 1205 StyleColor StyleBuilderConverter::ConvertStyleColor(StyleResolverState& state, | 1205 StyleColor StyleBuilderConverter::ConvertStyleColor(StyleResolverState& state, |
| 1206 const CSSValue& value, | 1206 const CSSValue& value, |
| 1207 bool for_visited_link) { | 1207 bool for_visited_link) { |
| 1208 if (value.IsIdentifierValue() && | 1208 if (value.IsIdentifierValue() && |
| 1209 ToCSSIdentifierValue(value).GetValueID() == CSSValueCurrentcolor) | 1209 ToCSSIdentifierValue(value).GetValueID() == CSSValueCurrentcolor) |
| 1210 return StyleColor::CurrentColor(); | 1210 return StyleColor::CurrentColor(); |
| 1211 return state.GetDocument().GetTextLinkColors().ColorFromCSSValue( | 1211 return state.GetDocument().GetTextLinkColors().ColorFromCSSValue( |
| 1212 value, Color(), for_visited_link); | 1212 value, Color(), for_visited_link); |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1452 } | 1452 } |
| 1453 | 1453 |
| 1454 const CSSValue& StyleBuilderConverter::ConvertRegisteredPropertyValue( | 1454 const CSSValue& StyleBuilderConverter::ConvertRegisteredPropertyValue( |
| 1455 const StyleResolverState& state, | 1455 const StyleResolverState& state, |
| 1456 const CSSValue& value) { | 1456 const CSSValue& value) { |
| 1457 return ComputeRegisteredPropertyValue(state.CssToLengthConversionData(), | 1457 return ComputeRegisteredPropertyValue(state.CssToLengthConversionData(), |
| 1458 value); | 1458 value); |
| 1459 } | 1459 } |
| 1460 | 1460 |
| 1461 } // namespace blink | 1461 } // namespace blink |
| OLD | NEW |