Diff
Modified: trunk/LayoutTests/ChangeLog (281292 => 281293)
--- trunk/LayoutTests/ChangeLog 2021-08-20 03:53:48 UTC (rev 281292)
+++ trunk/LayoutTests/ChangeLog 2021-08-20 04:07:08 UTC (rev 281293)
@@ -1,5 +1,16 @@
2021-08-19 Myles C. Maxfield <[email protected]>
+ [Cocoa] Stop honoring any dot-prefixed font names
+ https://bugs.webkit.org/show_bug.cgi?id=228177
+
+ Reviewed by Sam Weinig.
+
+ * fast/text/font-lookup-dot-prefix-case-sensitive-expected.html: Renamed from LayoutTests/fast/text/font-lookup-dot-prefix-case-sensitive-expected-mismatch.html.
+ * platform/ios/TestExpectations:
+ * platform/mac/TestExpectations:
+
+2021-08-19 Myles C. Maxfield <[email protected]>
+
[Cocoa] Stop treating the system font as a non-variable font
https://bugs.webkit.org/show_bug.cgi?id=228176
Deleted: trunk/LayoutTests/fast/text/font-lookup-dot-prefix-case-sensitive-expected-mismatch.html (281292 => 281293)
--- trunk/LayoutTests/fast/text/font-lookup-dot-prefix-case-sensitive-expected-mismatch.html 2021-08-20 03:53:48 UTC (rev 281292)
+++ trunk/LayoutTests/fast/text/font-lookup-dot-prefix-case-sensitive-expected-mismatch.html 2021-08-20 04:07:08 UTC (rev 281293)
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script>
-if (window.internals) {
- internals.invalidateFontCache();
-</script>
-</head>
-<body>
-<div style="font: 100px 'Times';">Hello</div>
-</body>
-</html>
-
Copied: trunk/LayoutTests/fast/text/font-lookup-dot-prefix-case-sensitive-expected.html (from rev 281292, trunk/LayoutTests/fast/text/font-lookup-dot-prefix-case-sensitive-expected-mismatch.html) (0 => 281293)
--- trunk/LayoutTests/fast/text/font-lookup-dot-prefix-case-sensitive-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/font-lookup-dot-prefix-case-sensitive-expected.html 2021-08-20 04:07:08 UTC (rev 281293)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.internals) {
+ internals.invalidateFontCache();
+</script>
+</head>
+<body>
+<div style="font: 100px 'Times';">Hello</div>
+</body>
+</html>
+
Modified: trunk/LayoutTests/platform/ios/TestExpectations (281292 => 281293)
--- trunk/LayoutTests/platform/ios/TestExpectations 2021-08-20 03:53:48 UTC (rev 281292)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2021-08-20 04:07:08 UTC (rev 281293)
@@ -2623,7 +2623,7 @@
fast/text/accessibility-bold-system-font-2.html [ Pass ]
# This test is specific to Core Text.
-fast/text/font-lookup-dot-prefix-case-sensitive.html [ Pass ]
+fast/text/font-lookup-dot-prefix-case-sensitive.html [ ImageOnlyFailure ]
# Missing support for 521-bit elliptic curves.
crypto/subtle/ec-import-pkcs8-key-export-pkcs8-key-p521.html
Modified: trunk/LayoutTests/platform/mac/TestExpectations (281292 => 281293)
--- trunk/LayoutTests/platform/mac/TestExpectations 2021-08-20 03:53:48 UTC (rev 281292)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2021-08-20 04:07:08 UTC (rev 281293)
@@ -1223,7 +1223,7 @@
webkit.org/b/175193 fast/images/async-image-body-background-image.html [ Pass Timeout ]
# This test is specific to Core Text.
-fast/text/font-lookup-dot-prefix-case-sensitive.html [ Pass ]
+webkit.org/b/228177 [ Mojave Catalina BigSur Monterey ] fast/text/font-lookup-dot-prefix-case-sensitive.html [ ImageOnlyFailure ]
webkit.org/b/173010 [ Debug ] js/slow-stress/Int32Array-alloc-huge.html [ Pass Timeout ]
Modified: trunk/Source/WTF/wtf/spi/darwin/dyldSPI.h (281292 => 281293)
--- trunk/Source/WTF/wtf/spi/darwin/dyldSPI.h 2021-08-20 03:53:48 UTC (rev 281292)
+++ trunk/Source/WTF/wtf/spi/darwin/dyldSPI.h 2021-08-20 04:07:08 UTC (rev 281293)
@@ -69,6 +69,10 @@
#define DYLD_IOS_VERSION_15_0 0x000f0000
#endif
+#ifndef DYLD_IOS_VERSION_16_0
+#define DYLD_IOS_VERSION_16_0 0x00100000
+#endif
+
#ifndef DYLD_MACOSX_VERSION_10_13
#define DYLD_MACOSX_VERSION_10_13 0x000A0D00
#endif
@@ -101,6 +105,10 @@
#define DYLD_MACOSX_VERSION_12_00 0x000c0000
#endif
+#ifndef DYLD_MACOSX_VERSION_13_0
+#define DYLD_MACOSX_VERSION_13_0 0x000d0000
+#endif
+
#else
#define DYLD_IOS_VERSION_3_0 0x00030000
@@ -120,6 +128,7 @@
#define DYLD_IOS_VERSION_14_0 0x000E0000
#define DYLD_IOS_VERSION_14_5 0x000E0500
#define DYLD_IOS_VERSION_15_0 0x000f0000
+#define DYLD_IOS_VERSION_16_0 0x00100000
#define DYLD_MACOSX_VERSION_10_11 0x000A0B00
#define DYLD_MACOSX_VERSION_10_12 0x000A0C00
@@ -131,6 +140,7 @@
#define DYLD_MACOSX_VERSION_10_16 0x000A1000
#define DYLD_MACOSX_VERSION_11_3 0x000B0300
#define DYLD_MACOSX_VERSION_12_00 0x000c0000
+#define DYLD_MACOSX_VERSION_13_0 0x000d0000
#endif
Modified: trunk/Source/WebCore/ChangeLog (281292 => 281293)
--- trunk/Source/WebCore/ChangeLog 2021-08-20 03:53:48 UTC (rev 281292)
+++ trunk/Source/WebCore/ChangeLog 2021-08-20 04:07:08 UTC (rev 281293)
@@ -1,3 +1,21 @@
+2021-08-19 Myles C. Maxfield <[email protected]>
+
+ [Cocoa] Stop honoring any dot-prefixed font names
+ https://bugs.webkit.org/show_bug.cgi?id=228177
+
+ Reviewed by Sam Weinig.
+
+ Dot-prefixed fonts are intentionally unsupported. We should stop supporting them.
+ If authors want to access the various system fonts, they can use system-ui,
+ ui-serif, ui-monospace, or ui-rounded.
+
+ Test: fast/text/font-lookup-dot-prefix-case-sensitive.html
+
+ * platform/cocoa/VersionChecks.h:
+ * platform/graphics/cocoa/FontCacheCoreText.cpp:
+ (WebCore::isDotPrefixedForbiddenFont):
+ (WebCore::platformFontLookupWithFamily):
+
2021-08-19 Alan Bujtas <[email protected]>
[IFC][Integration] The root inlinebox's style is always the IFC's root style
Modified: trunk/Source/WebCore/platform/cocoa/VersionChecks.h (281292 => 281293)
--- trunk/Source/WebCore/platform/cocoa/VersionChecks.h 2021-08-20 03:53:48 UTC (rev 281292)
+++ trunk/Source/WebCore/platform/cocoa/VersionChecks.h 2021-08-20 04:07:08 UTC (rev 281293)
@@ -74,6 +74,7 @@
FirstWithBlankViewOnJSPrompt = DYLD_IOS_VERSION_14_5,
FirstWithApplicationCacheDisabledByDefault = DYLD_IOS_VERSION_15_0,
FirstWithoutExpandoIndexedPropertiesOnWindow = DYLD_IOS_VERSION_15_0,
+ FirstForbiddingDotPrefixedFonts = DYLD_IOS_VERSION_16_0,
#elif PLATFORM(MAC)
FirstWithNetworkCache = DYLD_MACOSX_VERSION_10_11,
FirstWithExceptionsForDuplicateCompletionHandlerCalls = DYLD_MACOSX_VERSION_10_13,
@@ -99,6 +100,7 @@
FirstWithoutClientCertificateLookup = DYLD_MACOSX_VERSION_11_3,
FirstWithApplicationCacheDisabledByDefault = DYLD_MACOSX_VERSION_12_00,
FirstWithoutExpandoIndexedPropertiesOnWindow = DYLD_MACOSX_VERSION_12_00,
+ FirstForbiddingDotPrefixedFonts = DYLD_MACOSX_VERSION_13_0,
#endif
};
Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (281292 => 281293)
--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp 2021-08-20 03:53:48 UTC (rev 281292)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp 2021-08-20 04:07:08 UTC (rev 281293)
@@ -31,6 +31,7 @@
#include "FontFamilySpecificationCoreText.h"
#include "RenderThemeCocoa.h"
#include "SystemFontDatabaseCoreText.h"
+#include "VersionChecks.h"
#include <pal/spi/cf/CoreTextSPI.h>
#include <CoreText/SFNTLayoutTypes.h>
@@ -1107,6 +1108,17 @@
bool createdFromPostScriptName { false };
};
+static bool isDotPrefixedForbiddenFont(const AtomString& family)
+{
+ if (linkedOnOrAfter(SDKVersion::FirstForbiddingDotPrefixedFonts))
+ return family.startsWith('.');
+ return equalLettersIgnoringASCIICase(family, ".applesystemuifontserif")
+ || equalLettersIgnoringASCIICase(family, ".sf ns mono")
+ || equalLettersIgnoringASCIICase(family, ".sf ui mono")
+ || equalLettersIgnoringASCIICase(family, ".sf arabic")
+ || equalLettersIgnoringASCIICase(family, ".applesystemuifontrounded");
+}
+
static FontLookup platformFontLookupWithFamily(const AtomString& family, FontSelectionRequest request, float size, AllowUserInstalledFonts allowUserInstalledFonts)
{
const auto& allowlist = fontAllowlist();
@@ -1113,11 +1125,7 @@
if (!isSystemFont(family.string()) && allowlist.size() && !allowlist.contains(family))
return { nullptr };
- if (equalLettersIgnoringASCIICase(family, ".applesystemuifontserif")
- || equalLettersIgnoringASCIICase(family, ".sf ns mono")
- || equalLettersIgnoringASCIICase(family, ".sf ui mono")
- || equalLettersIgnoringASCIICase(family, ".sf arabic")
- || equalLettersIgnoringASCIICase(family, ".applesystemuifontrounded")) {
+ if (isDotPrefixedForbiddenFont(family)) {
// If you want to use these fonts, use system-ui, ui-serif, ui-monospace, or ui-rounded.
return { nullptr };
}