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

Unified Diff: Source/platform/fonts/FontDescription.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/resolver/StyleBuilderCustom.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/FontDescription.h
diff --git a/Source/platform/fonts/FontDescription.h b/Source/platform/fonts/FontDescription.h
index a453fe245580a4d1edbd1264429b4fdc1e09a726..2bb25d1b79d49d82f75d64f820bdd45e88e2d0b7 100644
--- a/Source/platform/fonts/FontDescription.h
+++ b/Source/platform/fonts/FontDescription.h
@@ -115,7 +115,19 @@ public:
float value;
};
+ struct FamilyDescription {
+ FamilyDescription(GenericFamilyType genericFamily) : genericFamily(genericFamily) { }
+ FamilyDescription(GenericFamilyType genericFamily, const FontFamily& family)
+ : genericFamily(genericFamily)
+ , family(family)
+ {
+ }
+ GenericFamilyType genericFamily;
+ FontFamily family;
+ };
+
const FontFamily& family() const { return m_familyList; }
+ FamilyDescription familyDescription() const { return FamilyDescription(genericFamily(), family()); }
FontFamily& firstFamily() { return m_familyList; }
Size size() const { return Size(m_keywordSize, m_specifiedSize, m_isAbsoluteSize); }
float specifiedSize() const { return m_specifiedSize; }
« no previous file with comments | « Source/core/css/resolver/StyleBuilderCustom.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698