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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 case CSSValueWebkitPictograph: | 136 case CSSValueWebkitPictograph: |
137 return FontDescription::PictographFamily; | 137 return FontDescription::PictographFamily; |
138 default: | 138 default: |
139 return FontDescription::NoFamily; | 139 return FontDescription::NoFamily; |
140 } | 140 } |
141 } | 141 } |
142 | 142 |
143 static bool convertFontFamilyName(StyleResolverState& state, CSSValue& value, | 143 static bool convertFontFamilyName(StyleResolverState& state, CSSValue& value, |
144 FontDescription::GenericFamilyType& genericFamily, AtomicString& familyName) | 144 FontDescription::GenericFamilyType& genericFamily, AtomicString& familyName) |
145 { | 145 { |
146 if (value.isCustomIdentValue()) { | 146 if (value.isFontFamilyValue()) { |
147 genericFamily = FontDescription::NoFamily; | 147 genericFamily = FontDescription::NoFamily; |
148 familyName = AtomicString(toCSSCustomIdentValue(value).value()); | 148 familyName = AtomicString(toCSSFontFamilyValue(value).value()); |
149 } else if (state.document().settings()) { | 149 } else if (state.document().settings()) { |
150 genericFamily = convertGenericFamily(toCSSPrimitiveValue(value).getValue
ID()); | 150 genericFamily = convertGenericFamily(toCSSPrimitiveValue(value).getValue
ID()); |
151 familyName = state.fontBuilder().genericFontFamilyName(genericFamily); | 151 familyName = state.fontBuilder().genericFontFamilyName(genericFamily); |
152 } | 152 } |
153 | 153 |
154 return !familyName.isEmpty(); | 154 return !familyName.isEmpty(); |
155 } | 155 } |
156 | 156 |
157 FontDescription::FamilyDescription StyleBuilderConverter::convertFontFamily(Styl
eResolverState& state, const CSSValue& value) | 157 FontDescription::FamilyDescription StyleBuilderConverter::convertFontFamily(Styl
eResolverState& state, const CSSValue& value) |
158 { | 158 { |
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 | 968 |
969 PassRefPtr<StylePath> StyleBuilderConverter::convertPathOrNone(StyleResolverStat
e& state, const CSSValue& value) | 969 PassRefPtr<StylePath> StyleBuilderConverter::convertPathOrNone(StyleResolverStat
e& state, const CSSValue& value) |
970 { | 970 { |
971 if (value.isPathValue()) | 971 if (value.isPathValue()) |
972 return toCSSPathValue(value).stylePath(); | 972 return toCSSPathValue(value).stylePath(); |
973 ASSERT(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); | 973 ASSERT(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() =
= CSSValueNone); |
974 return nullptr; | 974 return nullptr; |
975 } | 975 } |
976 | 976 |
977 } // namespace blink | 977 } // namespace blink |
OLD | NEW |