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

Unified Diff: Source/core/rendering/RenderThemeChromiumFontProviderLinux.cpp

Issue 205743004: Expand system font values during font property parsing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and fix up unittest use of systemFont() 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
Index: Source/core/rendering/RenderThemeChromiumFontProviderLinux.cpp
diff --git a/Source/core/rendering/RenderThemeChromiumFontProviderLinux.cpp b/Source/core/rendering/RenderThemeChromiumFontProviderLinux.cpp
index b26db49aa1f6277d8d3ddbfa872a8a81856aee77..2da835eb7dc9dec3fcb7c500242c10bac2c19c21 100644
--- a/Source/core/rendering/RenderThemeChromiumFontProviderLinux.cpp
+++ b/Source/core/rendering/RenderThemeChromiumFontProviderLinux.cpp
@@ -41,11 +41,14 @@ void RenderThemeChromiumFontProvider::setDefaultFontSize(int fontSize)
}
// static
-void RenderThemeChromiumFontProvider::systemFont(CSSValueID valueID, FontDescription& fontDescription)
+void RenderThemeChromiumFontProvider::systemFont(CSSValueID systemFontID, FontStyle& fontStyle, FontWeight& fontWeight, float& fontSize, AtomicString& fontFamily)
{
- float fontSize = s_defaultFontSize;
+ fontWeight = FontWeightNormal;
+ fontStyle = FontStyleNormal;
+ fontSize = s_defaultFontSize;
+ fontFamily = defaultGUIFont();
- switch (valueID) {
+ switch (systemFontID) {
case CSSValueWebkitMiniControl:
case CSSValueWebkitSmallControl:
case CSSValueWebkitControl:
@@ -59,13 +62,6 @@ void RenderThemeChromiumFontProvider::systemFont(CSSValueID valueID, FontDescrip
default:
break;
}
-
- fontDescription.firstFamily().setFamily(defaultGUIFont());
- fontDescription.setSpecifiedSize(fontSize);
- fontDescription.setIsAbsoluteSize(true);
- fontDescription.setGenericFamily(FontDescription::NoFamily);
- fontDescription.setWeight(FontWeightNormal);
- fontDescription.setStyle(false);
}
} // namespace WebCore
« no previous file with comments | « Source/core/rendering/RenderThemeChromiumFontProvider.h ('k') | Source/core/rendering/RenderThemeChromiumFontProviderWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698