Diff
Modified: trunk/LayoutTests/ChangeLog (292244 => 292245)
--- trunk/LayoutTests/ChangeLog 2022-04-02 00:25:06 UTC (rev 292244)
+++ trunk/LayoutTests/ChangeLog 2022-04-02 00:41:55 UTC (rev 292245)
@@ -1,3 +1,17 @@
+2022-04-01 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r292072.
+ https://bugs.webkit.org/show_bug.cgi?id=238690
+
+ Caused webAPIStatistics test failures
+
+ Reverted changeset:
+
+ "[Cocoa] Automatically relayout the page when new fonts are
+ installed"
+ https://bugs.webkit.org/show_bug.cgi?id=238483
+ https://commits.webkit.org/r292072
+
2022-04-01 Matteo Flores <[email protected]>
REGRESSION(r290822?): [ wk1 ] storage/websql/change-version.html is a flaky timeout
Modified: trunk/LayoutTests/TestExpectations (292244 => 292245)
--- trunk/LayoutTests/TestExpectations 2022-04-02 00:25:06 UTC (rev 292244)
+++ trunk/LayoutTests/TestExpectations 2022-04-02 00:41:55 UTC (rev 292245)
@@ -5207,6 +5207,3 @@
# Only certain ports have WebGPU implementations.
http/tests/webgpu [ Failure ImageOnlyFailure Pass Timeout ]
-
-# Only some ports automatically relayout if a font is installed while the page is open
-fast/text/install-font-style-recalc.html [ Failure ]
Deleted: trunk/LayoutTests/fast/text/install-font-style-recalc-expected.txt (292244 => 292245)
--- trunk/LayoutTests/fast/text/install-font-style-recalc-expected.txt 2022-04-02 00:25:06 UTC (rev 292244)
+++ trunk/LayoutTests/fast/text/install-font-style-recalc-expected.txt 2022-04-02 00:41:55 UTC (rev 292245)
@@ -1,11 +0,0 @@
-This test makes sure that installing a font causes a style recalc. The test only runs in DumpRenderTree/WebKitTestRunner. It passes if the text above is rendered as black boxes (aka in Ahem).
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS target.offsetWidth became 200
-PASS The font was used.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-rrrr
Deleted: trunk/LayoutTests/fast/text/install-font-style-recalc.html (292244 => 292245)
--- trunk/LayoutTests/fast/text/install-font-style-recalc.html 2022-04-02 00:25:06 UTC (rev 292244)
+++ trunk/LayoutTests/fast/text/install-font-style-recalc.html 2022-04-02 00:41:55 UTC (rev 292245)
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src=""
-</head>
-<body>
-<span id="target" style="font: 50px 'Helvetica2';">rrrr</span>
-<script>
-description("This test makes sure that installing a font causes a style recalc. The test only runs in DumpRenderTree/WebKitTestRunner. It passes if the text above is rendered as black boxes (aka in Ahem).");
-window.jsTestIsAsync = true;
-let target = document.getElementById("target");
-target.offsetWidth; // Force a font lookup
-if (window.testRunner)
- testRunner.installFakeHelvetica("Helvetica2-400");
-shouldBecomeEqual("target.offsetWidth", "200", function() {
- testPassed("The font was used.");
- finishJSTest();
-});
-</script>
-</body>
-</html>
Modified: trunk/LayoutTests/platform/ios/TestExpectations (292244 => 292245)
--- trunk/LayoutTests/platform/ios/TestExpectations 2022-04-02 00:25:06 UTC (rev 292244)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2022-04-02 00:41:55 UTC (rev 292245)
@@ -3563,5 +3563,3 @@
# iOS has a WebGPU implementation.
http/tests/webgpu [ Pass ]
-
-fast/text/install-font-style-recalc.html [ Pass ]
Modified: trunk/Source/WebCore/ChangeLog (292244 => 292245)
--- trunk/Source/WebCore/ChangeLog 2022-04-02 00:25:06 UTC (rev 292244)
+++ trunk/Source/WebCore/ChangeLog 2022-04-02 00:41:55 UTC (rev 292245)
@@ -1,3 +1,17 @@
+2022-04-01 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r292072.
+ https://bugs.webkit.org/show_bug.cgi?id=238690
+
+ Caused webAPIStatistics test failures
+
+ Reverted changeset:
+
+ "[Cocoa] Automatically relayout the page when new fonts are
+ installed"
+ https://bugs.webkit.org/show_bug.cgi?id=238483
+ https://commits.webkit.org/r292072
+
2022-04-01 Diego Pino Garcia <[email protected]>
Unreviewed, fix non-unified build after r292208
Modified: trunk/Source/WebCore/page/Page.cpp (292244 => 292245)
--- trunk/Source/WebCore/page/Page.cpp 2022-04-02 00:25:06 UTC (rev 292244)
+++ trunk/Source/WebCore/page/Page.cpp 2022-04-02 00:41:55 UTC (rev 292245)
@@ -390,16 +390,6 @@
if (m_lowPowerModeNotifier->isLowPowerModeEnabled())
m_throttlingReasons.add(ThrottlingReason::LowPowerMode);
-
- static bool fontCacheInvalidationCallbackRegistered = false;
- if (!fontCacheInvalidationCallbackRegistered) {
- FontCache::registerFontCacheInvalidationCallback([] {
- forEachPage([](auto& page) {
- page.setNeedsRecalcStyleInAllFrames();
- });
- });
- fontCacheInvalidationCallbackRegistered = true;
- }
}
Page::~Page()
Modified: trunk/Source/WebCore/platform/graphics/FontCache.cpp (292244 => 292245)
--- trunk/Source/WebCore/platform/graphics/FontCache.cpp 2022-04-02 00:25:06 UTC (rev 292244)
+++ trunk/Source/WebCore/platform/graphics/FontCache.cpp 2022-04-02 00:41:55 UTC (rev 292245)
@@ -489,17 +489,6 @@
purgeInactiveFontData();
}
-static Function<void()>& fontCacheInvalidationCallback()
-{
- static NeverDestroyed<Function<void()>> callback;
- return callback.get();
-}
-
-void FontCache::registerFontCacheInvalidationCallback(Function<void()>&& callback)
-{
- fontCacheInvalidationCallback() = WTFMove(callback);
-}
-
void FontCache::invalidateAllFontCaches()
{
ASSERT(isMainThread());
@@ -506,9 +495,6 @@
// FIXME: Invalidate FontCaches in workers too.
FontCache::forCurrentThread().invalidate();
-
- if (fontCacheInvalidationCallback())
- fontCacheInvalidationCallback()();
}
#if !PLATFORM(COCOA)
Modified: trunk/Source/WebCore/platform/graphics/FontCache.h (292244 => 292245)
--- trunk/Source/WebCore/platform/graphics/FontCache.h 2022-04-02 00:25:06 UTC (rev 292244)
+++ trunk/Source/WebCore/platform/graphics/FontCache.h 2022-04-02 00:41:55 UTC (rev 292245)
@@ -328,7 +328,6 @@
unsigned short generation() const { return m_generation; }
WEBCORE_EXPORT void invalidate();
- static void registerFontCacheInvalidationCallback(Function<void()>&&);
WEBCORE_EXPORT static void invalidateAllFontCaches();
WEBCORE_EXPORT size_t fontCount();