Unreviewed, rolling out r202945.
authorryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jul 2016 16:42:20 +0000 (16:42 +0000)
committerryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jul 2016 16:42:20 +0000 (16:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=159565

The test for this change is failing on all platforms.
(Requested by ryanhaddad on #webkit).

Reverted changeset:

"[Font Loading] The callback passed to document.fonts.ready
should always be called"
https://bugs.webkit.org/show_bug.cgi?id=158884
http://trac.webkit.org/changeset/202945

Patch by Commit Queue <commit-queue@webkit.org> on 2016-07-08

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

LayoutTests/ChangeLog
LayoutTests/fast/text/font-face-set-ready-fire-expected.txt [deleted file]
LayoutTests/fast/text/font-face-set-ready-fire.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/css/FontFaceSet.cpp
Source/WebCore/css/FontFaceSet.h

index 91e6ce4..7196410 100644 (file)
@@ -1,3 +1,18 @@
+2016-07-08  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r202945.
+        https://bugs.webkit.org/show_bug.cgi?id=159565
+
+        The test for this change is failing on all platforms.
+        (Requested by ryanhaddad on #webkit).
+
+        Reverted changeset:
+
+        "[Font Loading] The callback passed to document.fonts.ready
+        should always be called"
+        https://bugs.webkit.org/show_bug.cgi?id=158884
+        http://trac.webkit.org/changeset/202945
+
 2016-07-08  Keith Miller  <keith_miller@apple.com>
 
         TypedArrays need more isNeutered checks.
diff --git a/LayoutTests/fast/text/font-face-set-ready-fire-expected.txt b/LayoutTests/fast/text/font-face-set-ready-fire-expected.txt
deleted file mode 100644 (file)
index 7702048..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-This test makes sure that document.fonts.ready always triggers its promise when there are no loads.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS document.fonts.status is "loaded"
-PASS document.fonts.status is "loading"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/text/font-face-set-ready-fire.html b/LayoutTests/fast/text/font-face-set-ready-fire.html
deleted file mode 100644 (file)
index c3c07a0..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../resources/js-test-pre.js"></script>
-<script>
-self.jsTestIsAsync = true;
-description("This test makes sure that document.fonts.ready always triggers its promise when there are no loads.")
-
-var counter = 0;
-function bumpCounter() {
-    counter = counter + 1;
-    if (counter == 4)
-        finishJSTest();
-}
-function failure() {
-    testFailed("Promise should not fail.");
-}
-
-document.fonts.ready.then(bumpCounter);
-window.addEventListener("DOMContentLoaded", function() {
-    document.fonts.ready.then(bumpCounter, failure);
-});
-window.addEventListener("load", function() {
-    document.fonts.ready.then(bumpCounter, failure);
-});
-shouldBeEqualToString("document.fonts.status", "loaded");
-document.fonts.add(new FontFace("WebFont", "url('../../resources/Ahem.ttf') format('truetype')", {}));
-document.fonts.load("14px WebFont").then(bumpCounter, failure);
-shouldBeEqualToString("document.fonts.status", "loading");
-</script>
-</head>
-<body>
-<script src="../../resources/js-test-post.js"></script>
-</body>
-</html>
index 47581a7..b9022e8 100644 (file)
@@ -1,3 +1,18 @@
+2016-07-08  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r202945.
+        https://bugs.webkit.org/show_bug.cgi?id=159565
+
+        The test for this change is failing on all platforms.
+        (Requested by ryanhaddad on #webkit).
+
+        Reverted changeset:
+
+        "[Font Loading] The callback passed to document.fonts.ready
+        should always be called"
+        https://bugs.webkit.org/show_bug.cgi?id=158884
+        http://trac.webkit.org/changeset/202945
+
 2016-07-08  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
 
         ExecState should be passed by reference in JS bindings generator for custom constructors
index 0d55dd7..e50a3af 100644 (file)
@@ -197,7 +197,6 @@ bool FontFaceSet::canSuspendForDocumentSuspension() const
 void FontFaceSet::startedLoading()
 {
     // FIXME: Fire a "loading" event asynchronously.
-    m_isReady = false;
 }
 
 void FontFaceSet::completedLoading()
index ac27480..89ad08d 100644 (file)
@@ -111,7 +111,7 @@ private:
     Ref<CSSFontFaceSet> m_backing;
     HashMap<RefPtr<CSSFontFace>, Vector<Ref<PendingPromise>>> m_pendingPromises;
     Optional<ReadyPromise> m_promise;
-    bool m_isReady { true };
+    bool m_isReady { false };
 };
 
 }