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

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

Issue 1955723004: Implement font-variant-numeric (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 7 months 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 44cee0b01895d520cdf5d5393250a1bbd2596563..6f8f8266e5d5bd7570f9e78748eb2441d1e7bb54 100644
--- a/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp
@@ -169,6 +169,13 @@ void FontBuilder::setVariantLigatures(const FontDescription::VariantLigatures& l
m_fontDescription.setVariantLigatures(ligatures);
}
+void FontBuilder::setVariantNumeric(const FontVariantNumeric& variantNumeric)
+{
+ set(PropertySetFlag::VariantNumeric);
+
+ m_fontDescription.setVariantNumeric(variantNumeric);
+}
+
void FontBuilder::setTextRendering(TextRenderingMode textRenderingMode)
{
set(PropertySetFlag::TextRendering);
@@ -371,6 +378,8 @@ void FontBuilder::createFont(FontSelector* fontSelector, ComputedStyle& style)
description.setVariantCaps(m_fontDescription.variantCaps());
if (isSet(PropertySetFlag::VariantLigatures))
description.setVariantLigatures(m_fontDescription.getVariantLigatures());
+ if (isSet(PropertySetFlag::VariantNumeric))
+ description.setVariantNumeric(m_fontDescription.variantNumeric());
if (isSet(PropertySetFlag::TextRendering))
description.setTextRendering(m_fontDescription.textRendering());
if (isSet(PropertySetFlag::Kerning))

Powered by Google App Engine
This is Rietveld 408576698