Diff
Modified: trunk/LayoutTests/ChangeLog (218263 => 218264)
--- trunk/LayoutTests/ChangeLog 2017-06-14 16:37:18 UTC (rev 218263)
+++ trunk/LayoutTests/ChangeLog 2017-06-14 16:40:27 UTC (rev 218264)
@@ -1,3 +1,16 @@
+2017-06-14 Matt Lewis <[email protected]>
+
+ Unreviewed, rolling out r218157.
+
+ This patch caused multiple API failures on iOS Simulator.
+
+ Reverted changeset:
+
+ "@font-face rules with invalid primary fonts never download
+ their secondary fonts"
+ https://bugs.webkit.org/show_bug.cgi?id=173138
+ http://trac.webkit.org/changeset/218157
+
2017-06-14 Chris Dumez <[email protected]>
REGRESSION (r217997): mint.com header renders incorrectly when initially loaded
Deleted: trunk/LayoutTests/fast/text/font-fallback-invalid-load-expected.html (218263 => 218264)
--- trunk/LayoutTests/fast/text/font-fallback-invalid-load-expected.html 2017-06-14 16:37:18 UTC (rev 218263)
+++ trunk/LayoutTests/fast/text/font-fallback-invalid-load-expected.html 2017-06-14 16:40:27 UTC (rev 218264)
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style>
-@font-face {
- font-family: "WebFont";
- src: url("../../resources/Ahem.ttf") format("truetype");
-}
-</style>
-</head>
-<body>
-This test makes sure that an @font-face with an invalid primary font file is rendered. The test passes if you see something other than this text on the page.
-<div style="font: 48px 'WebFont';">Hello</div>
-</body>
-</html>
Deleted: trunk/LayoutTests/fast/text/font-fallback-invalid-load.html (218263 => 218264)
--- trunk/LayoutTests/fast/text/font-fallback-invalid-load.html 2017-06-14 16:37:18 UTC (rev 218263)
+++ trunk/LayoutTests/fast/text/font-fallback-invalid-load.html 2017-06-14 16:40:27 UTC (rev 218264)
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script>
-if (window.testRunner)
- testRunner.waitUntilDone();
-</script>
-<style>
-@font-face {
- font-family: "WebFont";
- src: url("resources/bogus.svg") format("svg"), url("../../resources/Ahem.ttf") format("truetype");
-}
-</style>
-</head>
-<body>
-This test makes sure that an @font-face with an invalid primary font file is rendered. The test passes if you see something other than this text on the page.
-<div style="font: 48px 'WebFont', Helvetica;">Hello</div>
-<div id="error" style="font-size: 48px; color: red;"></div>
-<script>
-// We're waiting for Ahem to be loaded. Unfortunately, the WK API says that the load is complete when the number of concurrent in-flight subresources
-// hits 0, which occurs before we hit our second layout and realize we need to load Ahem. So, without this, the test would complete before Ahem is
-// requested.
-if (window.testRunner) {
- document.fonts.keys().next().value.loaded.then(function() {
- testRunner.notifyDone();
- }, function() {
- document.getElementById("error").textContent = "Error loading font.";
- testRunner.notifyDone();
- });
-}
-</script>
-</body>
-</html>
Deleted: trunk/LayoutTests/fast/text/resources/bogus.svg (218263 => 218264)
--- trunk/LayoutTests/fast/text/resources/bogus.svg 2017-06-14 16:37:18 UTC (rev 218263)
+++ trunk/LayoutTests/fast/text/resources/bogus.svg 2017-06-14 16:40:27 UTC (rev 218264)
@@ -1 +0,0 @@
-bogus
Modified: trunk/Source/WebCore/ChangeLog (218263 => 218264)
--- trunk/Source/WebCore/ChangeLog 2017-06-14 16:37:18 UTC (rev 218263)
+++ trunk/Source/WebCore/ChangeLog 2017-06-14 16:40:27 UTC (rev 218264)
@@ -1,3 +1,16 @@
+2017-06-14 Matt Lewis <[email protected]>
+
+ Unreviewed, rolling out r218157.
+
+ This patch caused multiple API failures on iOS Simulator.
+
+ Reverted changeset:
+
+ "@font-face rules with invalid primary fonts never download
+ their secondary fonts"
+ https://bugs.webkit.org/show_bug.cgi?id=173138
+ http://trac.webkit.org/changeset/218157
+
2017-06-14 Chris Dumez <[email protected]>
REGRESSION (r217997): mint.com header renders incorrectly when initially loaded
Modified: trunk/Source/WebCore/css/CSSFontFaceSource.cpp (218263 => 218264)
--- trunk/Source/WebCore/css/CSSFontFaceSource.cpp 2017-06-14 16:37:18 UTC (rev 218263)
+++ trunk/Source/WebCore/css/CSSFontFaceSource.cpp 2017-06-14 16:40:27 UTC (rev 218264)
@@ -120,7 +120,7 @@
if (m_face.webFontsShouldAlwaysFallBack())
return;
- if (m_font->errorOccurred() || !m_font->ensureCustomFontData(m_familyNameOrURI))
+ if (m_font->errorOccurred())
setStatus(Status::Failure);
else
setStatus(Status::Success);
@@ -193,13 +193,10 @@
}
if (m_font) {
- auto success = m_font->ensureCustomFontData(m_familyNameOrURI);
- ASSERT_UNUSED(success, success);
-
- ASSERT(status() == Status::Success);
- auto result = m_font->createFont(fontDescription, m_familyNameOrURI, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities);
- ASSERT(result);
- return result;
+ if (!m_font->ensureCustomFontData(m_familyNameOrURI))
+ return nullptr;
+
+ return m_font->createFont(fontDescription, m_familyNameOrURI, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities);
}
// In-Document SVG Fonts
Modified: trunk/Source/WebCore/loader/cache/CachedSVGFont.cpp (218263 => 218264)
--- trunk/Source/WebCore/loader/cache/CachedSVGFont.cpp 2017-06-14 16:37:18 UTC (rev 218263)
+++ trunk/Source/WebCore/loader/cache/CachedSVGFont.cpp 2017-06-14 16:40:27 UTC (rev 218264)
@@ -54,8 +54,9 @@
RefPtr<Font> CachedSVGFont::createFont(const FontDescription& fontDescription, const AtomicString& remoteURI, bool syntheticBold, bool syntheticItalic, const FontFeatureSettings& fontFaceFeatures, const FontVariantSettings& fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
{
- ASSERT(firstFontFace(remoteURI));
- return CachedFont::createFont(fontDescription, remoteURI, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities);
+ if (firstFontFace(remoteURI))
+ return CachedFont::createFont(fontDescription, remoteURI, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceVariantSettings, fontFaceCapabilities);
+ return nullptr;
}
FontPlatformData CachedSVGFont::platformDataFromCustomData(const FontDescription& fontDescription, bool bold, bool italic, const FontFeatureSettings& fontFaceFeatures, const FontVariantSettings& fontFaceVariantSettings, FontSelectionSpecifiedCapabilities fontFaceCapabilities)
@@ -85,7 +86,7 @@
m_externalSVGDocument = nullptr;
if (m_externalSVGDocument)
maybeInitializeExternalSVGFontElement(remoteURI);
- if (!m_externalSVGFontElement || !firstFontFace(remoteURI))
+ if (!m_externalSVGFontElement)
return false;
if (auto convertedFont = convertSVGToOTFFont(*m_externalSVGFontElement))
m_convertedFont = SharedBuffer::create(WTFMove(convertedFont.value()));