Title: [218289] tags/Safari-604.1.26

Diff

Modified: tags/Safari-604.1.26/LayoutTests/ChangeLog (218288 => 218289)


--- tags/Safari-604.1.26/LayoutTests/ChangeLog	2017-06-14 20:12:33 UTC (rev 218288)
+++ tags/Safari-604.1.26/LayoutTests/ChangeLog	2017-06-14 20:12:37 UTC (rev 218289)
@@ -1,19 +1,23 @@
 2017-06-14  Jason Marcell  <jmarc...@apple.com>
 
-        Revert r218161. rdar://problem/21125708
+        Revert r218157. rdar://problem/32554450
 
-    2017-06-14  Claudio Saavedra  <csaave...@igalia.com>
+    2017-06-14  Jason Marcell  <jmarc...@apple.com>
 
-            [WPE] IndexedDB gardening
+            Revert r218161. rdar://problem/21125708
 
-            Unreviewed gardening.
+        2017-06-14  Claudio Saavedra  <csaave...@igalia.com>
 
-            Mark a few expected crashers. We don't use IndexedDB in workers,
-            storage/indexeddb/modern/worker-getall.html is expected to fail.
-            storage/indexeddb/modern/idbkey-array-equality.html is now passing.
+                [WPE] IndexedDB gardening
 
-            * platform/wpe/TestExpectations:
+                Unreviewed gardening.
 
+                Mark a few expected crashers. We don't use IndexedDB in workers,
+                storage/indexeddb/modern/worker-getall.html is expected to fail.
+                storage/indexeddb/modern/idbkey-array-equality.html is now passing.
+
+                * platform/wpe/TestExpectations:
+
 2017-06-14  Claudio Saavedra  <csaave...@igalia.com>
 
         [WPE] Rebaseline imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-requestmediakeysystemaccess.html
@@ -383,18 +387,6 @@
 
         * platform/gtk/TestExpectations:
 
-2017-06-12  Myles C. Maxfield  <mmaxfi...@apple.com>
-
-        @font-face rules with invalid primary fonts never download their secondary fonts
-        https://bugs.webkit.org/show_bug.cgi?id=173138
-        <rdar://problem/32554450>
-
-        Reviewed by Simon Fraser.
-
-        * fast/text/font-fallback-invalid-load-expected.html: Added.
-        * fast/text/font-fallback-invalid-load.html: Added.
-        * fast/text/resources/bogus.svg: Added.
-
 2017-06-12  Daniel Bates  <daba...@apple.com>
 
         Implement W3C Secure Contexts Draft Specification

Deleted: tags/Safari-604.1.26/LayoutTests/fast/text/font-fallback-invalid-load-expected.html (218288 => 218289)


--- tags/Safari-604.1.26/LayoutTests/fast/text/font-fallback-invalid-load-expected.html	2017-06-14 20:12:33 UTC (rev 218288)
+++ tags/Safari-604.1.26/LayoutTests/fast/text/font-fallback-invalid-load-expected.html	2017-06-14 20:12:37 UTC (rev 218289)
@@ -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: tags/Safari-604.1.26/LayoutTests/fast/text/font-fallback-invalid-load.html (218288 => 218289)


--- tags/Safari-604.1.26/LayoutTests/fast/text/font-fallback-invalid-load.html	2017-06-14 20:12:33 UTC (rev 218288)
+++ tags/Safari-604.1.26/LayoutTests/fast/text/font-fallback-invalid-load.html	2017-06-14 20:12:37 UTC (rev 218289)
@@ -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: tags/Safari-604.1.26/LayoutTests/fast/text/resources/bogus.svg (218288 => 218289)


--- tags/Safari-604.1.26/LayoutTests/fast/text/resources/bogus.svg	2017-06-14 20:12:33 UTC (rev 218288)
+++ tags/Safari-604.1.26/LayoutTests/fast/text/resources/bogus.svg	2017-06-14 20:12:37 UTC (rev 218289)
@@ -1 +0,0 @@
-bogus

Modified: tags/Safari-604.1.26/Source/WebCore/ChangeLog (218288 => 218289)


--- tags/Safari-604.1.26/Source/WebCore/ChangeLog	2017-06-14 20:12:33 UTC (rev 218288)
+++ tags/Safari-604.1.26/Source/WebCore/ChangeLog	2017-06-14 20:12:37 UTC (rev 218289)
@@ -1,35 +1,39 @@
 2017-06-14  Jason Marcell  <jmarc...@apple.com>
 
-        Revert r218161. rdar://problem/21125708
+        Revert r218157. rdar://problem/32554450
 
-    2017-06-14  Miguel Gomez  <mago...@igalia.com>
+    2017-06-14  Jason Marcell  <jmarc...@apple.com>
 
-            REGRESSION(r216901): ImageDecoders: rendering of large images is broken since r216901
-            https://bugs.webkit.org/show_bug.cgi?id=172502
+            Revert r218161. rdar://problem/21125708
 
-            Reviewed by Carlos Garcia Campos.
+        2017-06-14  Miguel Gomez  <mago...@igalia.com>
 
-            When using GTK and WPE image decoders, the decoded frames are stored inside a Vector of
-            ImageFrames inside the decoders. These ImageFrames have and ImageBackingStore with the
-            pixels. When a NativeImagePtr is requested, a cairo surface is created from the data
-            in those ImageBackingStores, but the data keeps being owned by the backing stores. Due
-            to this, if the decoder that created the image gets destroyed, the backing stores for
-            the decoded frames get destroyed as well, causing the cairo surfaces that were using
-            that data to contain garbage (and potentially cause a crash).
+                REGRESSION(r216901): ImageDecoders: rendering of large images is broken since r216901
+                https://bugs.webkit.org/show_bug.cgi?id=172502
 
-            To fix this, we change ImageBackingStore so the pixels are stored in a SharedBuffer. The
-            buffer will be reffed everytime a cairo surface is created with it, and the cairo surfaces
-            will unref the buffer when they are destroyed. This way, the pixel data won't be freed
-            while there are cairo surfaces using it.
+                Reviewed by Carlos Garcia Campos.
 
-            No new tests, no behaviour change.
+                When using GTK and WPE image decoders, the decoded frames are stored inside a Vector of
+                ImageFrames inside the decoders. These ImageFrames have and ImageBackingStore with the
+                pixels. When a NativeImagePtr is requested, a cairo surface is created from the data
+                in those ImageBackingStores, but the data keeps being owned by the backing stores. Due
+                to this, if the decoder that created the image gets destroyed, the backing stores for
+                the decoded frames get destroyed as well, causing the cairo surfaces that were using
+                that data to contain garbage (and potentially cause a crash).
 
-            * platform/graphics/ImageBackingStore.h:
-            (WebCore::ImageBackingStore::setSize):
-            (WebCore::ImageBackingStore::ImageBackingStore):
-            * platform/image-decoders/cairo/ImageBackingStoreCairo.cpp:
-            (WebCore::ImageBackingStore::image):
+                To fix this, we change ImageBackingStore so the pixels are stored in a SharedBuffer. The
+                buffer will be reffed everytime a cairo surface is created with it, and the cairo surfaces
+                will unref the buffer when they are destroyed. This way, the pixel data won't be freed
+                while there are cairo surfaces using it.
 
+                No new tests, no behaviour change.
+
+                * platform/graphics/ImageBackingStore.h:
+                (WebCore::ImageBackingStore::setSize):
+                (WebCore::ImageBackingStore::ImageBackingStore):
+                * platform/image-decoders/cairo/ImageBackingStoreCairo.cpp:
+                (WebCore::ImageBackingStore::image):
+
 2017-06-14  Zan Dobersek  <zdober...@igalia.com>
 
         [GStreamer] Align GstBus signal watch priorities with RunLoop dispatches
@@ -598,42 +602,6 @@
         * platform/cf/CoreMediaSoftLink.cpp:
         * platform/cf/CoreMediaSoftLink.h:
 
-2017-06-12  Myles C. Maxfield  <mmaxfi...@apple.com>
-
-        @font-face rules with invalid primary fonts never download their secondary fonts
-        https://bugs.webkit.org/show_bug.cgi?id=173138
-        <rdar://problem/32554450>
-
-        Reviewed by Simon Fraser.
-
-        We have logic in CSSFontAccessor::font() which disallows downloading a CSSFontFace if that CSSFontFace
-        is already in the Succeeded state. However, it was possible for a succeeded CSSFontFace to still fail
-        to create a font. In this situation, we wouldn't be able to use the downloaded font, and we wouldn't
-        try to download the next item in the src: list because the CSSFontFace is succeeded.
-
-        This patch strengthens the meaning of the Succeeded state. Previously, it just meant that the bytes
-        in the file were downloaded successfully. This patch extends this to also mean that the bytes in the
-        file can be successfully interpreted as a font. This way, the CSSFontFace in the example above won't be
-        set to the Succeeded state, so we will continue follow the src: list and download the secondary fonts.
-
-        This has an added benefit that the CSS Font Loading API's promises will be called more appropriately.
-        The transition to the Succeeded state will trigger a resolve of the promise. Now, these promises will
-        only be resolved if the fonts are actually parsed and understood by our text system.
-
-        Test: fast/text/font-fallback-invalid-load.html
-
-        * css/CSSFontFaceSource.cpp:
-        (WebCore::CSSFontFaceSource::fontLoaded): Move to the failed state if we can't understand the font
-        data. This is the crux of this patch.
-        (WebCore::CSSFontFaceSource::font): This function should only be called if we are in the Succeeded
-        state, which means now we know we should always be able to understand the bytes of the file. Therefore,
-        we can change some if statements into ASSERT()s.
-        * loader/cache/CachedSVGFont.cpp:
-        (WebCore::CachedSVGFont::createFont): Ditto.
-        (WebCore::CachedSVGFont::platformDataFromCustomData): Similarly to CSSFontFaceSource::fontLoaded(), this
-        adds another check to our criteria for transitioning into the Succeeded state, which will guarantee that
-        later we will always be able to create the font object.
-
 2017-06-12  Chris Dumez  <cdu...@apple.com>
 
         Add Arabic Kasra to list of blacklisted characters when puny-decoding URL

Modified: tags/Safari-604.1.26/Source/WebCore/css/CSSFontFaceSource.cpp (218288 => 218289)


--- tags/Safari-604.1.26/Source/WebCore/css/CSSFontFaceSource.cpp	2017-06-14 20:12:33 UTC (rev 218288)
+++ tags/Safari-604.1.26/Source/WebCore/css/CSSFontFaceSource.cpp	2017-06-14 20:12:37 UTC (rev 218289)
@@ -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: tags/Safari-604.1.26/Source/WebCore/loader/cache/CachedSVGFont.cpp (218288 => 218289)


--- tags/Safari-604.1.26/Source/WebCore/loader/cache/CachedSVGFont.cpp	2017-06-14 20:12:33 UTC (rev 218288)
+++ tags/Safari-604.1.26/Source/WebCore/loader/cache/CachedSVGFont.cpp	2017-06-14 20:12:37 UTC (rev 218289)
@@ -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()));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to