Title: [253498] trunk
- Revision
- 253498
- Author
- mmaxfi...@apple.com
- Date
- 2019-12-13 13:46:25 -0800 (Fri, 13 Dec 2019)
Log Message
[watchOS] Apple.com is rendered in Times New Roman
https://bugs.webkit.org/show_bug.cgi?id=205179
<rdar://problem/57233936>
Reviewed by Tim Horton.
Source/WebCore:
We should just make watchOS use the same font lookup attributes as iOS and macOS.
Test: fast/text/smiley-local-font-src.html
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontDatabase::fontForPostScriptName):
LayoutTests:
* fast/text/smiley-local-font-src-expected.html: Added.
* fast/text/smiley-local-font-src.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (253497 => 253498)
--- trunk/LayoutTests/ChangeLog 2019-12-13 21:36:25 UTC (rev 253497)
+++ trunk/LayoutTests/ChangeLog 2019-12-13 21:46:25 UTC (rev 253498)
@@ -1,3 +1,14 @@
+2019-12-13 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ [watchOS] Apple.com is rendered in Times New Roman
+ https://bugs.webkit.org/show_bug.cgi?id=205179
+ <rdar://problem/57233936>
+
+ Reviewed by Tim Horton.
+
+ * fast/text/smiley-local-font-src-expected.html: Added.
+ * fast/text/smiley-local-font-src.html: Added.
+
2019-12-13 Chris Dumez <cdu...@apple.com>
Implement PostMessageOptions for postMessage
Added: trunk/LayoutTests/fast/text/smiley-local-font-src-expected.html (0 => 253498)
--- trunk/LayoutTests/fast/text/smiley-local-font-src-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/smiley-local-font-src-expected.html 2019-12-13 21:46:25 UTC (rev 253498)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+</head>
+<body>
+This test makes sure that '☺︎' doesn't get resolved to a real font. The test passes if there is a black rectangle below.
+<div style="font: 48px 'Ahem';">Test</div>
+</body>
+</html>
Added: trunk/LayoutTests/fast/text/smiley-local-font-src.html (0 => 253498)
--- trunk/LayoutTests/fast/text/smiley-local-font-src.html (rev 0)
+++ trunk/LayoutTests/fast/text/smiley-local-font-src.html 2019-12-13 21:46:25 UTC (rev 253498)
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<style>
+@font-face {
+ font-family: "WebFont";
+ src:local('☺︎'), url("../../resources/Ahem.ttf") format("truetype");
+}
+</style>
+</head>
+<body>
+This test makes sure that '☺︎' doesn't get resolved to a real font. The test passes if there is a black rectangle below.
+<div style="font: 48px 'WebFont', 'Helvetica';">Test</div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (253497 => 253498)
--- trunk/Source/WebCore/ChangeLog 2019-12-13 21:36:25 UTC (rev 253497)
+++ trunk/Source/WebCore/ChangeLog 2019-12-13 21:46:25 UTC (rev 253498)
@@ -1,3 +1,18 @@
+2019-12-13 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ [watchOS] Apple.com is rendered in Times New Roman
+ https://bugs.webkit.org/show_bug.cgi?id=205179
+ <rdar://problem/57233936>
+
+ Reviewed by Tim Horton.
+
+ We should just make watchOS use the same font lookup attributes as iOS and macOS.
+
+ Test: fast/text/smiley-local-font-src.html
+
+ * platform/graphics/cocoa/FontCacheCoreText.cpp:
+ (WebCore::FontDatabase::fontForPostScriptName):
+
2019-12-13 Chris Dumez <cdu...@apple.com>
Implement PostMessageOptions for postMessage
Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (253497 => 253498)
--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp 2019-12-13 21:36:25 UTC (rev 253497)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp 2019-12-13 21:46:25 UTC (rev 253498)
@@ -969,11 +969,7 @@
const auto& folded = FontCascadeDescription::foldedFamilyName(postScriptName);
return m_postScriptNameToFontDescriptors.ensure(folded, [&] {
auto postScriptNameString = folded.createCFString();
-#if (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000) || PLATFORM(MAC)
CFStringRef nameAttribute = kCTFontPostScriptNameAttribute;
-#else
- CFStringRef nameAttribute = kCTFontNameAttribute;
-#endif
auto attributes = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
CFDictionaryAddValue(attributes.get(), kCTFontEnabledAttribute, kCFBooleanTrue);
CFDictionaryAddValue(attributes.get(), nameAttribute, postScriptNameString.get());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes