OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/css/resolver/FontBuilder.h" | 5 #include "core/css/resolver/FontBuilder.h" |
6 | 6 |
7 #include "core/css/CSSFontSelector.h" | 7 #include "core/css/CSSFontSelector.h" |
8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
9 #include "core/dom/StyleEngine.h" | 9 #include "core/dom/StyleEngine.h" |
10 #include "core/frame/Settings.h" | 10 #include "core/frame/Settings.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 d.setIsAbsoluteSize(true); | 140 d.setIsAbsoluteSize(true); |
141 d.setKeywordSize(7); | 141 d.setKeywordSize(7); |
142 } | 142 } |
143 static void fontSizeValue(FontBuilder& b) | 143 static void fontSizeValue(FontBuilder& b) |
144 { | 144 { |
145 b.setSize(FontDescription::Size(20.0f, 0, false)); | 145 b.setSize(FontDescription::Size(20.0f, 0, false)); |
146 } | 146 } |
147 | 147 |
148 static void fontScriptBase(FontDescription& d) | 148 static void fontScriptBase(FontDescription& d) |
149 { | 149 { |
150 d.setLocale("no"); | 150 d.setLocale(LayoutLocale::get("no")); |
151 } | 151 } |
152 static void fontScriptValue(FontBuilder& b) | 152 static void fontScriptValue(FontBuilder& b) |
153 { | 153 { |
154 b.setLocale("se"); | 154 b.setLocale(LayoutLocale::get("se")); |
155 } | 155 } |
156 | 156 |
157 INSTANTIATE_TEST_CASE_P(AllFields, FontBuilderAdditiveTest, | 157 INSTANTIATE_TEST_CASE_P(AllFields, FontBuilderAdditiveTest, |
158 ::testing::Values(FunctionPair(fontWeightBase, fontWeightValue), | 158 ::testing::Values(FunctionPair(fontWeightBase, fontWeightValue), |
159 FunctionPair(fontStretchBase, fontStretchValue), | 159 FunctionPair(fontStretchBase, fontStretchValue), |
160 FunctionPair(fontFamilyBase, fontFamilyValue), | 160 FunctionPair(fontFamilyBase, fontFamilyValue), |
161 FunctionPair(fontFeatureSettingsBase, fontFeatureSettingsValue), | 161 FunctionPair(fontFeatureSettingsBase, fontFeatureSettingsValue), |
162 FunctionPair(fontStyleBase, fontStyleValue), | 162 FunctionPair(fontStyleBase, fontStyleValue), |
163 FunctionPair(fontVariantCapsBase, fontVariantCapsValue), | 163 FunctionPair(fontVariantCapsBase, fontVariantCapsValue), |
164 FunctionPair(fontVariantLigaturesBase, fontVariantLigaturesValue), | 164 FunctionPair(fontVariantLigaturesBase, fontVariantLigaturesValue), |
165 FunctionPair(fontVariantNumericBase, fontVariantNumericValue), | 165 FunctionPair(fontVariantNumericBase, fontVariantNumericValue), |
166 FunctionPair(fontTextRenderingBase, fontTextRenderingValue), | 166 FunctionPair(fontTextRenderingBase, fontTextRenderingValue), |
167 FunctionPair(fontKerningBase, fontKerningValue), | 167 FunctionPair(fontKerningBase, fontKerningValue), |
168 FunctionPair(fontFontSmoothingBase, fontFontSmoothingValue), | 168 FunctionPair(fontFontSmoothingBase, fontFontSmoothingValue), |
169 FunctionPair(fontSizeBase, fontSizeValue), | 169 FunctionPair(fontSizeBase, fontSizeValue), |
170 FunctionPair(fontScriptBase, fontScriptValue))); | 170 FunctionPair(fontScriptBase, fontScriptValue))); |
171 | 171 |
172 } // namespace blink | 172 } // namespace blink |
OLD | NEW |