summaryrefslogtreecommitdiff
path: root/third_party/WebKit/Source/platform/fonts/FontTraits.h
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/WebKit/Source/platform/fonts/FontTraits.h')
-rw-r--r--third_party/WebKit/Source/platform/fonts/FontTraits.h31
1 files changed, 14 insertions, 17 deletions
diff --git a/third_party/WebKit/Source/platform/fonts/FontTraits.h b/third_party/WebKit/Source/platform/fonts/FontTraits.h
index d549a983137f..95f1ffc86a5d 100644
--- a/third_party/WebKit/Source/platform/fonts/FontTraits.h
+++ b/third_party/WebKit/Source/platform/fonts/FontTraits.h
@@ -32,15 +32,15 @@
namespace blink {
enum FontWeight {
- FontWeight100 = 0,
- FontWeight200 = 1,
- FontWeight300 = 2,
- FontWeight400 = 3,
- FontWeight500 = 4,
- FontWeight600 = 5,
- FontWeight700 = 6,
- FontWeight800 = 7,
- FontWeight900 = 8,
+ FontWeight100,
+ FontWeight200,
+ FontWeight300,
+ FontWeight400,
+ FontWeight500,
+ FontWeight600,
+ FontWeight700,
+ FontWeight800,
+ FontWeight900,
FontWeightNormal = FontWeight400,
FontWeightBold = FontWeight700
};
@@ -61,8 +61,7 @@ enum FontStretch {
enum FontStyle {
FontStyleNormal = 0,
- FontStyleOblique = 1,
- FontStyleItalic = 2
+ FontStyleItalic = 1
};
enum FontVariant {
@@ -76,19 +75,17 @@ struct FontTraits {
FontTraits(FontStyle style, FontVariant variant, FontWeight weight, FontStretch stretch)
{
m_traits.m_style = style;
- // TODO(drott): crbug.com/516673 Variant is not relevant for font selection,
- // should be removed here.
m_traits.m_variant = variant;
m_traits.m_weight = weight;
m_traits.m_stretch = stretch;
m_traits.m_filler = 0;
- ASSERT(!(m_bitfield >> 11));
+ ASSERT(!(m_bitfield >> 10));
}
FontTraits(FontTraitsBitfield bitfield)
: m_bitfield(bitfield)
{
ASSERT(!m_traits.m_filler);
- ASSERT(!(m_bitfield >> 11));
+ ASSERT(!(m_bitfield >> 10));
}
FontStyle style() const { return static_cast<FontStyle>(m_traits.m_style); }
FontVariant variant() const { return static_cast<FontVariant>(m_traits.m_variant); }
@@ -98,11 +95,11 @@ struct FontTraits {
union {
struct {
- unsigned m_style : 2;
+ unsigned m_style : 1;
unsigned m_variant : 1;
unsigned m_weight : 4;
unsigned m_stretch : 4;
- unsigned m_filler : 21;
+ unsigned m_filler : 22;
} m_traits;
FontTraitsBitfield m_bitfield;
};