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

Unified Diff: Source/core/css/resolver/FontBuilder.h

Issue 602373003: Make style building for 'font-family' less custom. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Init genericFamily in all cases. Created 6 years, 3 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
« no previous file with comments | « Source/core/css/CSSProperties.in ('k') | Source/core/css/resolver/FontBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/FontBuilder.h
diff --git a/Source/core/css/resolver/FontBuilder.h b/Source/core/css/resolver/FontBuilder.h
index 4b4d2a5a51af8fc12d7c9f1553cd95b234172639..fb747d5c55daf02a001575016835567b17cf5482 100644
--- a/Source/core/css/resolver/FontBuilder.h
+++ b/Source/core/css/resolver/FontBuilder.h
@@ -53,13 +53,14 @@ public:
void inheritFrom(const FontDescription&);
void fromSystemFont(CSSValueID, float effectiveZoom);
- void setFontFamilyInitial();
- void setFontFamilyInherit(const FontDescription&);
- void setFontFamilyValue(CSSValue*);
+ FontFamily standardFontFamily() const;
+ AtomicString standardFontFamilyName() const;
+ AtomicString genericFontFamilyName(FontDescription::GenericFamilyType) const;
void setWeight(FontWeight);
void setSize(const FontDescription::Size&);
void setStretch(FontStretch);
+ void setFamilyDescription(const FontDescription::FamilyDescription&);
void setFeatureSettings(PassRefPtr<FontFeatureSettings>);
void setScript(const String& locale);
void setStyle(FontStyle);
@@ -79,8 +80,9 @@ public:
// FIXME: This is only used by an ASSERT in StyleResolver. Remove?
bool fontDirty() const { return m_fontDirty; }
+ static FontDescription::FamilyDescription initialFamilyDescription() { return FontDescription::FamilyDescription(initialGenericFamily()); }
static FontFeatureSettings* initialFeatureSettings() { return nullptr; }
- static FontDescription::GenericFamilyType initialGenericFamily() { return FontDescription::NoFamily; }
+ static FontDescription::GenericFamilyType initialGenericFamily() { return FontDescription::StandardFamily; }
static FontDescription::Size initialSize() { return FontDescription::Size(FontSize::initialKeywordSize(), 0.0f, false); }
static TextRenderingMode initialTextRendering() { return AutoTextRendering; }
static FontVariant initialVariant() { return FontVariantNormal; }
@@ -95,7 +97,7 @@ public:
private:
- // FIXME: "size" arg should be first for consistency with other similar functions.
+ void setFamilyDescription(FontDescription&, const FontDescription::FamilyDescription&);
void setSize(FontDescription&, const FontDescription::Size&);
void checkForOrientationChange(RenderStyle*);
// This function fixes up the default font size if it detects that the current generic font family has changed. -dwh
« no previous file with comments | « Source/core/css/CSSProperties.in ('k') | Source/core/css/resolver/FontBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698