Index: third_party/WebKit/Source/core/css/FontFace.cpp |
diff --git a/third_party/WebKit/Source/core/css/FontFace.cpp b/third_party/WebKit/Source/core/css/FontFace.cpp |
index 1f64d68d760aefaeb992bd847f4f18df2a8f2214..87adc2963c3d745d6107a673b012b85f7c93e170 100644 |
--- a/third_party/WebKit/Source/core/css/FontFace.cpp |
+++ b/third_party/WebKit/Source/core/css/FontFace.cpp |
@@ -60,6 +60,7 @@ |
#include "core/frame/UseCounter.h" |
#include "platform/FontFamilyNames.h" |
#include "platform/Histogram.h" |
+#include "platform/RuntimeEnabledFeatures.h" |
#include "platform/SharedBuffer.h" |
#include "platform/WebTaskRunner.h" |
@@ -174,6 +175,10 @@ FontFace::FontFace(ExecutionContext* context, |
CSSPropertyFontVariant); |
setPropertyFromString(document, descriptors.featureSettings(), |
CSSPropertyFontFeatureSettings); |
+ if (RuntimeEnabledFeatures::cssFontDisplayEnabled()) { |
+ setPropertyFromString(document, descriptors.display(), |
+ CSSPropertyFontDisplay); |
+ } |
} |
FontFace::~FontFace() {} |
@@ -202,6 +207,10 @@ String FontFace::featureSettings() const { |
return m_featureSettings ? m_featureSettings->cssText() : "normal"; |
} |
+String FontFace::display() const { |
+ return m_display ? m_display->cssText() : "auto"; |
+} |
+ |
void FontFace::setStyle(ExecutionContext* context, |
const String& s, |
ExceptionState& exceptionState) { |
@@ -244,6 +253,13 @@ void FontFace::setFeatureSettings(ExecutionContext* context, |
&exceptionState); |
} |
+void FontFace::setDisplay(ExecutionContext* context, |
+ const String& s, |
+ ExceptionState& exceptionState) { |
+ setPropertyFromString(toDocument(context), s, CSSPropertyFontDisplay, |
+ &exceptionState); |
+} |
+ |
void FontFace::setPropertyFromString(const Document* document, |
const String& s, |
CSSPropertyID propertyID, |