Title: [245647] trunk

Diff

Modified: trunk/LayoutTests/ChangeLog (245646 => 245647)


--- trunk/LayoutTests/ChangeLog	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/LayoutTests/ChangeLog	2019-05-22 21:39:11 UTC (rev 245647)
@@ -1,3 +1,15 @@
+2019-05-22  Ryan Haddad  <ryanhad...@apple.com>
+
+        Unreviewed, rolling out r245598.
+
+        Breaks watchOS build.
+
+        Reverted changeset:
+
+        "font-optical-sizing applies the wrong variation value"
+        https://bugs.webkit.org/show_bug.cgi?id=197528
+        https://trac.webkit.org/changeset/245598
+
 2019-05-22  Antoine Quint  <grao...@apple.com>
 
         [iOS] Compatibility mouse events aren't prevented by calling preventDefault() on pointerdown

Deleted: trunk/LayoutTests/fast/text/variations/optical-sizing-trak-2-expected-mismatch.html (245646 => 245647)


--- trunk/LayoutTests/fast/text/variations/optical-sizing-trak-2-expected-mismatch.html	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/LayoutTests/fast/text/variations/optical-sizing-trak-2-expected-mismatch.html	2019-05-22 21:39:11 UTC (rev 245647)
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<style>
-#target {
-    display: inline-block;
-    font: 10px "PingFang SC";
-    transform: scale(10);
-    transform-origin: left top;
-    text-rendering: optimizeLegibility;
-}
-</style>
-</head>
-<body>
-<span id="target">风雨中中国经济定能壮大</span>
-</body>
-</html>

Deleted: trunk/LayoutTests/fast/text/variations/optical-sizing-trak-2.html (245646 => 245647)


--- trunk/LayoutTests/fast/text/variations/optical-sizing-trak-2.html	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/LayoutTests/fast/text/variations/optical-sizing-trak-2.html	2019-05-22 21:39:11 UTC (rev 245647)
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<style>
-#target {
-    display: inline-block;
-    font: 10px "PingFang SC";
-    transform: scale(10);
-    transform-origin: left top;
-}
-</style>
-</head>
-<body>
-<span id="target">风雨中中国经济定能壮大</span>
-</body>
-</html>

Deleted: trunk/LayoutTests/fast/text/variations/optical-sizing-trak-expected.html (245646 => 245647)


--- trunk/LayoutTests/fast/text/variations/optical-sizing-trak-expected.html	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/LayoutTests/fast/text/variations/optical-sizing-trak-expected.html	2019-05-22 21:39:11 UTC (rev 245647)
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<style>
-#target {
-    display: inline-block;
-    font: 10px "PingFang SC";
-    transform: scale(10);
-    transform-origin: left top;
-    font-optical-sizing: none;
-}
-</style>
-</head>
-<body>
-<p>
-This test makes sure that 'trak' tables are not honored in fonts that don't have 'STAT' tables. The test passes if the text is rendered identically to the expected file, pixel-per-pixel.
-</p>
-<span id="target">风雨中中国经济定能壮大</span>
-</body>
-</html>

Deleted: trunk/LayoutTests/fast/text/variations/optical-sizing-trak.html (245646 => 245647)


--- trunk/LayoutTests/fast/text/variations/optical-sizing-trak.html	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/LayoutTests/fast/text/variations/optical-sizing-trak.html	2019-05-22 21:39:11 UTC (rev 245647)
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<style>
-#target {
-    display: inline-block;
-    font: 10px "PingFang SC";
-    transform: scale(10);
-    transform-origin: left top;
-    font-optical-sizing: auto;
-}
-</style>
-</head>
-<body>
-<p>
-This test makes sure that 'trak' tables are not honored in fonts that don't have 'STAT' tables. The test passes if the text is rendered identically to the expected file, pixel-per-pixel.
-</p>
-<span id="target">风雨中中国经济定能壮大</span>
-</body>
-</html>

Deleted: trunk/LayoutTests/fast/text/variations/optical-sizing-units-2-expected-mismatch.html (245646 => 245647)


--- trunk/LayoutTests/fast/text/variations/optical-sizing-units-2-expected-mismatch.html	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/LayoutTests/fast/text/variations/optical-sizing-units-2-expected-mismatch.html	2019-05-22 21:39:11 UTC (rev 245647)
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style>
-@font-face {
-    font-family: "Amstelvar";
-    src: url("resources/Amstelvar/Amstelvar-Roman-VF104.ttf") format("truetype");
-}
-#target {
-    font: 100px "Amstelvar";
-    font-optical-sizing: auto;
-    font-variation-settings: "opsz" 10;
-}
-</style>
-</head>
-<body>
-<span id="target">Hello, world!</span>
-</body>
-</html>

Deleted: trunk/LayoutTests/fast/text/variations/optical-sizing-units-2.html (245646 => 245647)


--- trunk/LayoutTests/fast/text/variations/optical-sizing-units-2.html	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/LayoutTests/fast/text/variations/optical-sizing-units-2.html	2019-05-22 21:39:11 UTC (rev 245647)
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style>
-@font-face {
-    font-family: "Amstelvar";
-    src: url("resources/Amstelvar/Amstelvar-Roman-VF104.ttf") format("truetype");
-}
-#target {
-    font: 100px "Amstelvar";
-    font-optical-sizing: auto;
-}
-</style>
-</head>
-<body>
-<span id="target">Hello, world!</span>
-</body>
-</html>

Deleted: trunk/LayoutTests/fast/text/variations/optical-sizing-units-expected.html (245646 => 245647)


--- trunk/LayoutTests/fast/text/variations/optical-sizing-units-expected.html	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/LayoutTests/fast/text/variations/optical-sizing-units-expected.html	2019-05-22 21:39:11 UTC (rev 245647)
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style>
-@font-face {
-    font-family: "Amstelvar";
-    src: url("resources/Amstelvar/Amstelvar-Roman-VF104.ttf") format("truetype");
-}
-#target {
-    display: inline-block;
-    font: 10px "Amstelvar";
-    transform: scale(10);
-    transform-origin: left top;
-    font-variation-settings: "opsz" 10;
-}
-</style>
-</head>
-<body>
-<p>This test makes sure that <code>font-optical-sizing: auto</code> applies the correct value to the <code>opsz</code> variation axis. The test passes if the text below matches the expected text, pixel-per-pixel.</p>
-<span id="target">Hello, world!</span>
-</body>
-</html>

Deleted: trunk/LayoutTests/fast/text/variations/optical-sizing-units.html (245646 => 245647)


--- trunk/LayoutTests/fast/text/variations/optical-sizing-units.html	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/LayoutTests/fast/text/variations/optical-sizing-units.html	2019-05-22 21:39:11 UTC (rev 245647)
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style>
-@font-face {
-    font-family: "Amstelvar";
-    src: url("resources/Amstelvar/Amstelvar-Roman-VF104.ttf") format("truetype");
-}
-#target {
-    display: inline-block;
-    font: 10px "Amstelvar";
-    transform: scale(10);
-    transform-origin: left top;
-    font-optical-sizing: auto;
-}
-</style>
-</head>
-<body>
-<p>This test makes sure that <code>font-optical-sizing: auto</code> applies the correct value to the <code>opsz</code> variation axis. The test passes if the text below matches the expected text, pixel-per-pixel.</p>
-<span id="target">Hello, world!</span>
-</body>
-</html>

Modified: trunk/LayoutTests/platform/win/TestExpectations (245646 => 245647)


--- trunk/LayoutTests/platform/win/TestExpectations	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/LayoutTests/platform/win/TestExpectations	2019-05-22 21:39:11 UTC (rev 245647)
@@ -3250,7 +3250,8 @@
 fast/text/system-font-weight.html [ Failure ]
 fast/text/text-combine-shrink-on-color-change.html [ Failure ]
 fast/text/trak-optimizeLegibility.html [ Failure ]
-fast/text/variations [ Failure Pass ImageOnlyFailure ]
+fast/text/variations/advances.html [ Failure ]
+fast/text/variations/getComputedStyle.html [ Failure ]
 fast/text/whitespace/023.html [ Failure ]
 fast/transforms/bounding-rect-zoom.html [ Failure ]
 fast/xsl/xslt-extra-content-at-end.xml [ Failure ]
@@ -3379,6 +3380,8 @@
 fast/text/cursive-zh.html [ ImageOnlyFailure ]
 fast/text/emoji-single-parent-family-2.html [ ImageOnlyFailure ]
 fast/text/emoji-single-parent-family.html [ ImageOnlyFailure ]
+fast/text/variations/exist.html [ ImageOnlyFailure ]
+fast/text/variations/outofbounds.html [ ImageOnlyFailure ]
 http/tests/security/http-0.9/image-on-HTTP-0.9-default-port-page-allowed-ref-test.html [ ImageOnlyFailure ]
 mathml/presentation/non-bmp-operators-stretching.html [ ImageOnlyFailure ]
 security/contentSecurityPolicy/image-with-blob-url-allowed-by-img-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled.html [ ImageOnlyFailure ]
@@ -3553,6 +3556,8 @@
 fast/text/font-weight-parse.html [ Failure ]
 fast/text/softbank-emoji.html [ Failure ]
 fast/text/system-font-fallback-emoji.html [ Failure ]
+fast/text/variations/font-loading-api-parse-ranges.html [ Failure ]
+fast/text/variations/optical-sizing.html [ Failure ]
 fast/text/web-font-load-invisible-during-loading.html [ Failure ]
 fast/url/standard-url.html [ Failure ]
 fast/url/tab-and-newline-stripping.html [ Failure ]
@@ -3618,6 +3623,8 @@
 fast/text/emoji-overlap.html [ ImageOnlyFailure ]
 fast/text/multiple-codeunit-vertical-upright.html [ ImageOnlyFailure ]
 fast/text/simple-line-layout-simple-text-but-complex-font-path.html [ ImageOnlyFailure ]
+fast/text/variations/font-face-format.html [ ImageOnlyFailure ]
+fast/text/variations/font-face-format-woff2.html [ ImageOnlyFailure ]
 imported/blink/scrollbars/avoid-double-scrollbars-when-html-element-is-not-the-renderview.html [ ImageOnlyFailure ]
 imported/w3c/i18n/bidi/bidi-plaintext-011.html [ ImageOnlyFailure ]
 svg/custom/anchor-on-use.svg [ ImageOnlyFailure ]
@@ -3685,6 +3692,7 @@
 http/wpt/entries-api/interfaces.html [ Failure ]
 http/wpt/fetch/response-status-text.html [ Failure ]
 js/dom/builtin-getter-name.html [ Failure ]
+fast/text/variations/font-selection-font-weight.html [ ImageOnlyFailure ]
 fast/forms/file/entries-api/webkitdirectory-open-panel.html [ Skip ]
 
 # Requires WK2 loading support
@@ -3733,6 +3741,9 @@
 # Animated image throttling behaves differently on WK1.
 svg/animations/animated-svg-image-outside-viewport-paused.html [ Skip ]
 
+# This test requires Skia, which isn't available on Windows.
+webkit.org/b/174079 fast/text/variations/skia-postscript-name.html [ ImageOnlyFailure ]
+
 # Beacon is not supported on WK1.
 http/tests/blink/sendbeacon/ [ Skip ]
 http/tests/inspector/network/beacon-type.html [ Skip ]

Modified: trunk/Source/WTF/ChangeLog (245646 => 245647)


--- trunk/Source/WTF/ChangeLog	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/Source/WTF/ChangeLog	2019-05-22 21:39:11 UTC (rev 245647)
@@ -1,3 +1,15 @@
+2019-05-22  Ryan Haddad  <ryanhad...@apple.com>
+
+        Unreviewed, rolling out r245598.
+
+        Breaks watchOS build.
+
+        Reverted changeset:
+
+        "font-optical-sizing applies the wrong variation value"
+        https://bugs.webkit.org/show_bug.cgi?id=197528
+        https://trac.webkit.org/changeset/245598
+
 2019-05-21  Ross Kirsling  <ross.kirsl...@sony.com>
 
         [PlayStation] Don't call fcntl.

Modified: trunk/Source/WTF/wtf/Platform.h (245646 => 245647)


--- trunk/Source/WTF/wtf/Platform.h	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/Source/WTF/wtf/Platform.h	2019-05-22 21:39:11 UTC (rev 245647)
@@ -1555,7 +1555,3 @@
 #define HAVE_AVPLAYER_RESOURCE_CONSERVATION_LEVEL 1
 #endif
 
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000) || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 50000) || (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 120000)
-#define HAVE_CORETEXT_AUTO_OPTICAL_SIZING 1
-#endif
-

Modified: trunk/Source/WebCore/ChangeLog (245646 => 245647)


--- trunk/Source/WebCore/ChangeLog	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/Source/WebCore/ChangeLog	2019-05-22 21:39:11 UTC (rev 245647)
@@ -1,3 +1,15 @@
+2019-05-22  Ryan Haddad  <ryanhad...@apple.com>
+
+        Unreviewed, rolling out r245598.
+
+        Breaks watchOS build.
+
+        Reverted changeset:
+
+        "font-optical-sizing applies the wrong variation value"
+        https://bugs.webkit.org/show_bug.cgi?id=197528
+        https://trac.webkit.org/changeset/245598
+
 2019-05-22  Daniel Bates  <daba...@apple.com>
 
         WebKit does not generate an ESC key event for CMD+.

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (245646 => 245647)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2019-05-22 21:39:11 UTC (rev 245647)
@@ -484,8 +484,6 @@
         auto tables = adoptCF(CTFontCopyAvailableTables(font, kCTFontTableOptionNoOptions));
         if (!tables)
             return;
-        bool foundStat = false;
-        bool foundTrak = false;
         auto size = CFArrayGetCount(tables.get());
         for (CFIndex i = 0; i < size; ++i) {
             // This is so yucky.
@@ -499,7 +497,6 @@
                     variationType = VariationType::TrueTypeGX;
                 break;
             case 'STAT':
-                foundStat = true;
                 variationType = VariationType::OpenType18;
                 break;
             case 'morx':
@@ -510,32 +507,28 @@
             case 'GSUB':
                 openTypeShaping = true;
                 break;
-            case 'trak':
-                foundTrak = true;
-                break;
             }
         }
-        if (foundStat && foundTrak)
-            trackingType = TrackingType::Automatic;
-        else if (foundTrak)
-            trackingType = TrackingType::Manual;
     }
 
-    enum class VariationType : uint8_t { NotVariable, TrueTypeGX, OpenType18, };
+    enum class VariationType {
+        NotVariable,
+        TrueTypeGX,
+        OpenType18
+    };
     VariationType variationType { VariationType::NotVariable };
-    enum class TrackingType : uint8_t { None, Automatic, Manual, };
-    TrackingType trackingType { TrackingType::None };
     bool openTypeShaping { false };
     bool aatShaping { false };
 };
 
-RetainPtr<CTFontRef> preparePlatformFont(CTFontRef originalFont, const FontDescription& fontDescription, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities, bool applyWeightWidthSlopeVariations)
+RetainPtr<CTFontRef> preparePlatformFont(CTFontRef originalFont, const FontDescription& fontDescription, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities, float size, bool applyWeightWidthSlopeVariations)
 {
-    if (!originalFont)
-        return originalFont;
+    bool alwaysAddVariations = false;
 
+    // FIXME: Remove when <rdar://problem/29859207> is fixed
 #if ENABLE(VARIATION_FONTS)
     auto defaultValues = defaultVariationValues(originalFont);
+    alwaysAddVariations = !defaultValues.isEmpty();
 
     auto fontSelectionRequest = fontDescription.fontSelectionRequest();
     auto fontOpticalSizing = fontDescription.opticalSizing();
@@ -542,6 +535,7 @@
     auto fontStyleAxis = fontDescription.fontStyleAxis();
 #else
     UNUSED_PARAM(fontFaceCapabilities);
+    UNUSED_PARAM(size);
     UNUSED_PARAM(applyWeightWidthSlopeVariations);
 #endif
 
@@ -550,20 +544,8 @@
     const auto& variations = fontDescription.variationSettings();
     auto textRenderingMode = fontDescription.textRenderingMode();
 
-    FontType fontType { originalFont };
-
-    bool forceOpticalSizingOn = fontOpticalSizing == FontOpticalSizing::Enabled && fontType.variationType == FontType::VariationType::TrueTypeGX && defaultValues.contains({{'o', 'p', 's', 'z'}});
-    bool forceVariations = defaultValues.contains({{'w', 'g', 'h', 't'}}) || defaultValues.contains({{'w', 'd', 't', 'h'}}) || (fontStyleAxis == FontStyleAxis::ital && defaultValues.contains({{'i', 't', 'a', 'l'}})) || (fontStyleAxis == FontStyleAxis::slnt && defaultValues.contains({{'s', 'l', 'n', 't'}}));
-
-    // We might want to check fontType.trackingType == FontType::TrackingType::Manual here, but in order to maintain compatibility with the rest of the system, we don't.
-    bool noFontFeatureSettings = features.isEmpty();
-    bool noFontVariationSettings = !forceVariations && variations.isEmpty();
-    bool textRenderingModeIsAuto = textRenderingMode == TextRenderingMode::AutoTextRendering;
-    bool variantSettingsIsNormal = variantSettings.isAllNormal();
-    bool dontNeedToApplyOpticalSizing = fontOpticalSizing == FontOpticalSizing::Enabled && !forceOpticalSizingOn;
-    bool fontFaceDoesntSpecifyFeatures = !fontFaceFeatures || fontFaceFeatures->isEmpty();
-    bool fontFaceDoesntSpecifyVariations = !fontFaceVariantSettings || fontFaceVariantSettings->isAllNormal();
-    if (noFontFeatureSettings && noFontVariationSettings && textRenderingModeIsAuto && variantSettingsIsNormal && dontNeedToApplyOpticalSizing && fontFaceDoesntSpecifyFeatures && fontFaceDoesntSpecifyVariations)
+    if (!originalFont || (!features.size() && (!alwaysAddVariations && variations.isEmpty()) && (textRenderingMode == TextRenderingMode::AutoTextRendering) && variantSettings.isAllNormal()
+        && (!fontFaceFeatures || !fontFaceFeatures->size()) && (!fontFaceVariantSettings || fontFaceVariantSettings->isAllNormal())))
         return originalFont;
 
     // This algorithm is described at http://www.w3.org/TR/css3-fonts/#feature-precedence
@@ -598,6 +580,8 @@
     for (auto& newFeature : features)
         featuresToBeApplied.set(newFeature.tag(), newFeature.value());
 
+    FontType fontType(originalFont);
+
 #if ENABLE(VARIATION_FONTS)
     VariationsMap variationsToBeApplied;
 
@@ -635,8 +619,14 @@
             applyVariation({{'s', 'l', 'n', 't'}}, slope);
     }
 
+    if (fontOpticalSizing == FontOpticalSizing::Enabled) {
+        const float pxToPtRatio = 3.0f / 4;
+        applyVariation({{'o', 'p', 's', 'z'}}, size * pxToPtRatio);
+    }
+
     for (auto& newVariation : variations)
         applyVariation(newVariation.tag(), newVariation.value());
+
 #endif // ENABLE(VARIATION_FONTS)
 
     auto attributes = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
@@ -665,20 +655,11 @@
     }
 #endif
 
-    if (forceOpticalSizingOn || textRenderingMode == TextRenderingMode::OptimizeLegibility) {
-#if HAVE(CORETEXT_AUTO_OPTICAL_SIZING)
-        CFDictionaryAddValue(attributes.get(), kCTFontOpticalSizeAttribute, CFSTR("auto"));
-#else
-        auto size = CTFontGetSize(originalFont);
+    if (textRenderingMode == TextRenderingMode::OptimizeLegibility) {
+        CGFloat size = CTFontGetSize(originalFont);
         auto sizeNumber = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberCGFloatType, &size));
         CFDictionaryAddValue(attributes.get(), kCTFontOpticalSizeAttribute, sizeNumber.get());
-#endif
-    } else if (fontOpticalSizing == FontOpticalSizing::Disabled) {
-#if HAVE(CORETEXT_AUTO_OPTICAL_SIZING)
-        CFDictionaryAddValue(attributes.get(), kCTFontOpticalSizeAttribute, CFSTR("none"));
-#endif
     }
-
     auto descriptor = adoptCF(CTFontDescriptorCreateWithAttributes(attributes.get()));
     auto result = adoptCF(CTFontCreateCopyWithAttributes(originalFont, CTFontGetSize(originalFont), nullptr, descriptor.get()));
     return result;
@@ -1242,7 +1223,7 @@
     fontLookup.result = platformFontWithFamilySpecialCase(family, request, size, fontDescription.shouldAllowUserInstalledFonts());
     if (!fontLookup.result)
         fontLookup = platformFontLookupWithFamily(family, request, size, fontDescription.shouldAllowUserInstalledFonts());
-    return preparePlatformFont(fontLookup.result.get(), fontDescription, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities, !fontLookup.createdFromPostScriptName);
+    return preparePlatformFont(fontLookup.result.get(), fontDescription, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities, size, !fontLookup.createdFromPostScriptName);
 }
 
 #if PLATFORM(MAC)
@@ -1393,7 +1374,7 @@
         m_fontNamesRequiringSystemFallbackForPrewarming.add(fullName);
 
     auto result = lookupFallbackFont(platformData.font(), description.weight(), description.locale(), characters, length);
-    result = preparePlatformFont(result.get(), description, nullptr, nullptr, { });
+    result = preparePlatformFont(result.get(), description, nullptr, nullptr, { }, description.computedSize());
 
     if (!result)
         return lastResortFallbackFont(description);

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h (245646 => 245647)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h	2019-05-22 21:39:11 UTC (rev 245647)
@@ -50,7 +50,7 @@
     bool needsSyntheticOblique;
 };
 
-RetainPtr<CTFontRef> preparePlatformFont(CTFontRef, const FontDescription&, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities, bool applyWeightWidthSlopeVariations = true);
+RetainPtr<CTFontRef> preparePlatformFont(CTFontRef, const FontDescription&, const FontFeatureSettings* fontFaceFeatures, const FontVariantSettings* fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities, float size, bool applyWeightWidthSlopeVariations = true);
 SynthesisPair computeNecessarySynthesis(CTFontRef, const FontDescription&, bool isPlatformFont = false);
 RetainPtr<CTFontRef> platformFontWithFamilySpecialCase(const AtomicString& family, FontSelectionRequest, float size, AllowUserInstalledFonts);
 RetainPtr<CTFontRef> platformFontWithFamily(const AtomicString& family, FontSelectionRequest, TextRenderingMode, float size);

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp (245646 => 245647)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp	2019-05-22 21:39:11 UTC (rev 245647)
@@ -108,7 +108,7 @@
             fontForSynthesisComputation = physicalFont;
 #endif
 
-        font = preparePlatformFont(font.get(), fontDescription, nullptr, nullptr, { });
+        font = preparePlatformFont(font.get(), fontDescription, nullptr, nullptr, { }, fontDescription.computedSize());
 
         bool syntheticBold, syntheticOblique;
         std::tie(syntheticBold, syntheticOblique) = computeNecessarySynthesis(fontForSynthesisComputation.get(), fontDescription).boldObliquePair();

Modified: trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp (245646 => 245647)


--- trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp	2019-05-22 21:03:20 UTC (rev 245646)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp	2019-05-22 21:39:11 UTC (rev 245647)
@@ -46,7 +46,7 @@
     FontOrientation orientation = fontDescription.orientation();
     FontWidthVariant widthVariant = fontDescription.widthVariant();
     RetainPtr<CTFontRef> font = adoptCF(CTFontCreateWithFontDescriptor(modifiedFontDescriptor.get(), size, nullptr));
-    font = preparePlatformFont(font.get(), fontDescription, &fontFaceFeatures, &fontFaceVariantSettings, fontFaceCapabilities);
+    font = preparePlatformFont(font.get(), fontDescription, &fontFaceFeatures, &fontFaceVariantSettings, fontFaceCapabilities, fontDescription.computedSize());
     ASSERT(font);
     return FontPlatformData(font.get(), size, bold, italic, orientation, widthVariant, fontDescription.textRenderingMode());
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to