Test font-variant-* and font-feature-settings on Yosemite and Mavericks
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Oct 2015 19:00:47 +0000 (19:00 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Oct 2015 19:00:47 +0000 (19:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=149778

Reviewed by Simon Fraser.

Source/WebCore:

We can simply call the function which enables features on Yosemite and Mavericks.

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::platformFontLookupWithFamily):
(WebCore::fontWithFamily):

LayoutTests:

* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190876 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/css3/font-feature-settings-rendering-expected.html
LayoutTests/css3/font-feature-settings-rendering.html
LayoutTests/platform/mac-wk1/TestExpectations
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp

index 6b34071..01fbe15 100644 (file)
@@ -1,3 +1,13 @@
+2015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Test font-variant-* and font-feature-settings on Yosemite and Mavericks
+        https://bugs.webkit.org/show_bug.cgi?id=149778
+
+        Reviewed by Simon Fraser.
+
+        * platform/mac-wk1/TestExpectations:
+        * platform/mac/TestExpectations:
+
 2015-10-12  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Unreviewed test gardening after r190800.
index 7668f2d..0793671 100644 (file)
@@ -16,6 +16,8 @@
 This tests that font features are able to be turned on and off as desired. It uses a special font
 designed specifically for this purpose. The test passes if you see a sequence of alternating check
 marks and X below.
+<div style="font-family: FontWithFeaturesOTF;">AB</div>
+<div style="font-family: FontWithFeaturesTTF;">AB</div>
 <div><span style="font-family: FontFeaturesTestOTF;">BA</span>
 <span style="font-family: FontFeaturesTestOTF;">BA</span>
 <span style="font-family: FontFeaturesTestOTF;">BA</span>
index 9199a32..b1151c3 100644 (file)
@@ -16,6 +16,8 @@
 This tests that font features are able to be turned on and off as desired. It uses a special font
 designed specifically for this purpose. The test passes if you see a sequence of alternating check
 marks and X below.
+<div style="font-family: FontFeaturesTestOTF;">AB</div>
+<div style="font-family: FontFeaturesTestTTF;">AB</div>
 <div id="insertionPoint"></div>
 <div id="insertionPoint2"></div>
 <div id="insertionPoint3"></div>
index 65e7949..ea1171d 100644 (file)
@@ -161,4 +161,4 @@ imported/blink/svg/hittest/rect-miterlimit.html [ Pass Timeout ]
 [ Release ] imported/blink/svg/custom/marker-layout-invalidation.html [ Pass Timeout ]
 [ Release ] imported/blink/fast/css/crash-corner-present.html [ Pass Timeout ]
 [ Release ] imported/blink/compositing/layer-creation/iframe-clip-removed.html [ Pass Timeout ]
-[ Debug ] imported/blink/compositing/video/video-controls-layer-creation-squashing.html [ Pass ImageOnlyFailure ]
\ No newline at end of file
+[ Debug ] imported/blink/compositing/video/video-controls-layer-creation-squashing.html [ Pass ImageOnlyFailure ]
index 218c79d..b0afa12 100644 (file)
@@ -258,8 +258,9 @@ compositing/rtl/rtl-iframe-relative.html [ Skip ]
 # ENABLE(DRAGGABLE_REGION) is disabled
 fast/css/draggable-region-parser.html
 
-webkit.org/b/149246 [ Mavericks Yosemite ] css3/font-feature-settings-rendering.html [ ImageOnlyFailure ]
-webkit.org/b/149246 [ Mavericks Yosemite ] css3/font-variant-all.html [ ImageOnlyFailure ]
+# Font features are not implemented on Mavericks.
+webkit.org/b/149246 [ Mavericks ] css3/font-feature-settings-rendering.html [ ImageOnlyFailure ]
+webkit.org/b/149246 [ Mavericks ] css3/font-variant-all.html [ ImageOnlyFailure ]
 
 # This feature is disabled on Mavericks.
 [ Mavericks ] http/tests/navigation/page-cache-pending-image-load.html [ Skip ]
index 7bbc5cb..644a9ca 100644 (file)
@@ -1,3 +1,16 @@
+2015-10-12  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Test font-variant-* and font-feature-settings on Yosemite and Mavericks
+        https://bugs.webkit.org/show_bug.cgi?id=149778
+
+        Reviewed by Simon Fraser.
+
+        We can simply call the function which enables features on Yosemite and Mavericks.
+
+        * platform/graphics/cocoa/FontCacheCoreText.cpp:
+        (WebCore::platformFontLookupWithFamily):
+        (WebCore::fontWithFamily):
+
 2015-10-09  Anders Carlsson  <andersca@apple.com>
 
         Don't allow plug-ins to override image types for <embed> elements
index 9c6db2b..b7cecf4 100644 (file)
@@ -595,14 +595,13 @@ void FontCache::setFontWhitelist(const Vector<String>& inputWhitelist)
 }
 
 #if ENABLE(PLATFORM_FONT_LOOKUP)
-static RetainPtr<CTFontRef> platformFontLookupWithFamily(const AtomicString& family, CTFontSymbolicTraits requestedTraits, FontWeight weight, const FontFeatureSettings& featureSettings, const FontVariantSettings& variantSettings, TextRenderingMode textRenderingMode, float size)
+static RetainPtr<CTFontRef> platformFontLookupWithFamily(const AtomicString& family, CTFontSymbolicTraits requestedTraits, FontWeight weight, float size)
 {
     const auto& whitelist = fontWhitelist();
     if (whitelist.size() && !whitelist.contains(family))
         return nullptr;
 
-    auto foundFont = adoptCF(CTFontCreateForCSS(family.string().createCFString().get(), toCoreTextFontWeight(weight), requestedTraits, size));
-    return preparePlatformFont(foundFont.get(), textRenderingMode, featureSettings, variantSettings);
+    return adoptCF(CTFontCreateForCSS(family.string().createCFString().get(), toCoreTextFontWeight(weight), requestedTraits, size));
 }
 #endif
 
@@ -613,12 +612,13 @@ static RetainPtr<CTFontRef> fontWithFamily(const AtomicString& family, CTFontSym
     if (auto specialCase = platformFontWithFamilySpecialCase(family, weight, desiredTraits, size))
         return specialCase;
 #if ENABLE(PLATFORM_FONT_LOOKUP)
-    return platformFontLookupWithFamily(family, desiredTraits, weight, featureSettings, variantSettings, textRenderingMode, size);
+    RetainPtr<CTFontRef> foundFont = platformFontLookupWithFamily(family, desiredTraits, weight, size);
 #else
     UNUSED_PARAM(featureSettings);
     UNUSED_PARAM(variantSettings);
-    return platformFontWithFamily(family, desiredTraits, weight, textRenderingMode, size);
+    RetainPtr<CTFontRef> foundFont = platformFontWithFamily(family, desiredTraits, weight, textRenderingMode, size);
 #endif
+    return preparePlatformFont(foundFont.get(), textRenderingMode, featureSettings, variantSettings);
 }
 
 #if PLATFORM(MAC)