Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp

Issue 2558053002: Add CSS support for font-variation-settings (Closed)
Patch Set: DCHECK corrected, newline removed. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp b/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp
index 79ce1e42e1a9487c6bf9e351aa61ee157ea576ae..c0317c8c8115721ac83150593dd4849553a608e1 100644
--- a/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp
@@ -182,10 +182,15 @@ void FontBuilder::setFontSmoothing(FontSmoothingMode foontSmoothingMode) {
void FontBuilder::setFeatureSettings(PassRefPtr<FontFeatureSettings> settings) {
set(PropertySetFlag::FeatureSettings);
-
m_fontDescription.setFeatureSettings(std::move(settings));
}
+void FontBuilder::setVariationSettings(
+ PassRefPtr<FontVariationSettings> settings) {
+ set(PropertySetFlag::VariationSettings);
+ m_fontDescription.setVariationSettings(std::move(settings));
+}
+
void FontBuilder::setFamilyDescription(
FontDescription& fontDescription,
const FontDescription::FamilyDescription& familyDescription) {
@@ -380,6 +385,8 @@ void FontBuilder::createFont(FontSelector* fontSelector, ComputedStyle& style) {
description.setVariantLigatures(m_fontDescription.getVariantLigatures());
if (isSet(PropertySetFlag::VariantNumeric))
description.setVariantNumeric(m_fontDescription.variantNumeric());
+ if (isSet(PropertySetFlag::VariationSettings))
+ description.setVariationSettings(m_fontDescription.variationSettings());
if (isSet(PropertySetFlag::TextRendering))
description.setTextRendering(m_fontDescription.textRendering());
if (isSet(PropertySetFlag::Kerning))

Powered by Google App Engine
This is Rietveld 408576698