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

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

Issue 204963002: Clean up setting font-family: initial value. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/FontBuilder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/FontBuilder.cpp
diff --git a/Source/core/css/resolver/FontBuilder.cpp b/Source/core/css/resolver/FontBuilder.cpp
index ed37edc42c0312e1f6d9e2de831948219f80a514..81936b177ede18ee0554337e0646c0816757efec 100644
--- a/Source/core/css/resolver/FontBuilder.cpp
+++ b/Source/core/css/resolver/FontBuilder.cpp
@@ -139,14 +139,7 @@ void FontBuilder::setFontFamilyInitial()
{
FontDescriptionChangeScope scope(this);
- FontDescription initialDesc = FontDescription();
-
- // We need to adjust the size to account for the generic family change from monospace to non-monospace.
- if (scope.fontDescription().keywordSize() && scope.fontDescription().useFixedDefaultSize())
- scope.fontDescription().setSpecifiedSize(FontSize::fontSizeForKeyword(m_document, CSSValueXxSmall + scope.fontDescription().keywordSize() - 1, false));
- scope.fontDescription().setGenericFamily(initialDesc.genericFamily());
- if (!initialDesc.firstFamily().familyIsEmpty())
- scope.fontDescription().setFamily(initialDesc.firstFamily());
+ scope.fontDescription().setGenericFamily(FontBuilder::initialGenericFamily());
}
void FontBuilder::setFontFamilyInherit(const FontDescription& parentFontDescription)
« no previous file with comments | « Source/core/css/resolver/FontBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698