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

Side by Side Diff: Source/platform/fonts/AlternateFontFamily.h

Issue 64243002: Restore old behavior where "Sans" was used as fallback font (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 3 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
4 * Copyright (C) 2013 Google, Inc. All rights reserved. 4 * Copyright (C) 2013 Google, Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 DEFINE_STATIC_LOCAL(const AtomicString, sansStr, ("Sans", AtomicString::Cons tructFromLiteral)); 110 DEFINE_STATIC_LOCAL(const AtomicString, sansStr, ("Sans", AtomicString::Cons tructFromLiteral));
111 DEFINE_STATIC_LOCAL(const AtomicString, serifStr, ("Serif", AtomicString::Co nstructFromLiteral)); 111 DEFINE_STATIC_LOCAL(const AtomicString, serifStr, ("Serif", AtomicString::Co nstructFromLiteral));
112 DEFINE_STATIC_LOCAL(const AtomicString, monospaceStr, ("Monospace", AtomicSt ring::ConstructFromLiteral)); 112 DEFINE_STATIC_LOCAL(const AtomicString, monospaceStr, ("Monospace", AtomicSt ring::ConstructFromLiteral));
113 113
114 switch (description.genericFamily()) { 114 switch (description.genericFamily()) {
115 case FontDescription::SerifFamily: 115 case FontDescription::SerifFamily:
116 return serifStr; 116 return serifStr;
117 case FontDescription::MonospaceFamily: 117 case FontDescription::MonospaceFamily:
118 return monospaceStr; 118 return monospaceStr;
119 case FontDescription::SansSerifFamily: 119 case FontDescription::SansSerifFamily:
120 default:
120 return sansStr; 121 return sansStr;
121 default:
122 return AtomicString();
123 } 122 }
124 } 123 }
125 124
126 } // namespace WebCore 125 } // namespace WebCore
127 126
128 #endif // AlternateFontFamily_h 127 #endif // AlternateFontFamily_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698