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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp

Issue 2388623002: Replace internal uses of BlinkMacSystemFont on Mac with system-ui (Closed)
Patch Set: Rebase Created 4 years, 2 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: third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
index 175f0722c128dd66583525fb1d5ce29b6d605f4c..6935b778e4469d82bdbe8b0e87c2641366782e4c 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
@@ -46,9 +46,11 @@
#include "core/css/CSSValuePair.h"
#include "core/css/resolver/FilterOperationResolver.h"
#include "core/frame/LocalFrame.h"
+#include "core/frame/UseCounter.h"
#include "core/style/ClipPathOperation.h"
#include "core/style/TextSizeAdjust.h"
#include "core/svg/SVGURIReference.h"
+#include "platform/fonts/FontCache.h"
#include "platform/transforms/RotateTransformOperation.h"
#include "platform/transforms/ScaleTransformOperation.h"
#include "platform/transforms/TranslateTransformOperation.h"
@@ -188,6 +190,12 @@ static bool convertFontFamilyName(
if (value.isFontFamilyValue()) {
genericFamily = FontDescription::NoFamily;
familyName = AtomicString(toCSSFontFamilyValue(value).value());
+#if OS(MACOSX)
+ if (familyName == FontCache::legacySystemFontFamily()) {
+ UseCounter::count(state.document(), UseCounter::BlinkMacSystemFont);
+ familyName = FontFamilyNames::system_ui;
+ }
+#endif
} else if (state.document().settings()) {
genericFamily =
convertGenericFamily(toCSSIdentifierValue(value).getValueID());

Powered by Google App Engine
This is Rietveld 408576698