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

Unified Diff: third_party/WebKit/Source/platform/fonts/FontDescription.h

Issue 2392033002: Correcting text baseline for tiny fonts (Closed)
Patch Set: Rebaseline. Created 4 years, 2 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/platform/fonts/FontDescription.h
diff --git a/third_party/WebKit/Source/platform/fonts/FontDescription.h b/third_party/WebKit/Source/platform/fonts/FontDescription.h
index f978716353c93a588268db25bafb8e14e9939f84..e9fb8c7458a963866798c370159be13006684855 100644
--- a/third_party/WebKit/Source/platform/fonts/FontDescription.h
+++ b/third_party/WebKit/Source/platform/fonts/FontDescription.h
@@ -114,6 +114,7 @@ class PLATFORM_EXPORT FontDescription {
m_fields.m_subpixelTextPosition = s_useSubpixelTextPositioning;
m_fields.m_typesettingFeatures = s_defaultTypesettingFeatures;
m_fields.m_variantNumeric = FontVariantNumeric().m_fieldsAsUnsigned;
+ m_fields.m_subpixelAscentDescent = false;
}
bool operator==(const FontDescription&) const;
@@ -320,6 +321,14 @@ class PLATFORM_EXPORT FontDescription {
}
static bool subpixelPositioning() { return s_useSubpixelTextPositioning; }
+ void setSubpixelAscentDescent(bool sp) const {
+ m_fields.m_subpixelAscentDescent = sp;
+ }
+
+ bool subpixelAscentDescent() const {
+ return m_fields.m_subpixelAscentDescent;
+ }
+
static void setDefaultTypesettingFeatures(TypesettingFeatures);
static TypesettingFeatures defaultTypesettingFeatures();
@@ -391,6 +400,7 @@ class PLATFORM_EXPORT FontDescription {
unsigned m_subpixelTextPosition : 1;
unsigned m_typesettingFeatures : 3;
unsigned m_variantNumeric : 8;
+ mutable unsigned m_subpixelAscentDescent : 1;
};
static_assert(sizeof(BitFields) == sizeof(FieldsAsUnsignedType),

Powered by Google App Engine
This is Rietveld 408576698