Title: [293377] branches/safari-613-branch
Revision
293377
Author
repst...@apple.com
Date
2022-04-25 17:03:02 -0700 (Mon, 25 Apr 2022)

Log Message

Cherry-pick r292274. rdar://problem/80544133

    [Cocoa] Automatically relayout the page when new fonts are installed
    https://bugs.webkit.org/show_bug.cgi?id=238483
    <rdar://problem/80544133>

    Reviewed by Chris Dumez.

    Source/WebCore:

    This patch simply calls setNeedsRecalcStyleInAllFrames on every Page when we receive a
    kCTFontManagerRegisteredFontsChangedNotification.

    FontCache::invalidateAllFontCaches() can't do this directly because it's in platform/ and
    therefore isn't allowed to know what Pages are. Instead, this patch takes a process-global
    callback and calls that instead. This callback is set at initialization time.

    Test: fast/text/install-font-style-recalc.html

    * page/Page.cpp:
    (WebCore::m_contentSecurityPolicyModeForExtension):
    (WebCore::Page::firstTimeInitialization):
    * page/Page.h:
    * platform/graphics/FontCache.cpp:
    (WebCore::Function<void):
    (WebCore::FontCache::registerFontCacheInvalidationCallback):
    (WebCore::FontCache::invalidateAllFontCaches):
    * platform/graphics/FontCache.h:

    Tools:

    Make TestRunner::dumpResourceLoadStatistics() clear any currently-recorded statistics.
    This avoids the problem where spurious layouts during the time when the page has been created but
    before the test has begun record irrelevant statistics.

    * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
    (WTR::InjectedBundle::beginTesting):
    (WTR::InjectedBundle::clearResourceLoadStatistics):
    * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
    * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
    (WTR::TestRunner::dumpResourceLoadStatistics):

    LayoutTests:

    * TestExpectations:
    * fast/text/install-font-style-recalc-expected.txt: Added.
    * fast/text/install-font-style-recalc.html: Added.
    * platform/ios-wk2/TestExpectations:
    * platform/mac-wk2/TestExpectations:

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

Modified Paths

Diff

Modified: branches/safari-613-branch/LayoutTests/ChangeLog (293376 => 293377)


--- branches/safari-613-branch/LayoutTests/ChangeLog	2022-04-26 00:02:57 UTC (rev 293376)
+++ branches/safari-613-branch/LayoutTests/ChangeLog	2022-04-26 00:03:02 UTC (rev 293377)
@@ -66,6 +66,74 @@
             * platform/ios-wk2/TestExpectations:
             * platform/mac-wk2/TestExpectations:
 
+2022-04-22  Alan Coon  <alanc...@apple.com>
+
+        Cherry-pick r292274. rdar://problem/80544133
+
+    [Cocoa] Automatically relayout the page when new fonts are installed
+    https://bugs.webkit.org/show_bug.cgi?id=238483
+    <rdar://problem/80544133>
+    
+    Reviewed by Chris Dumez.
+    
+    Source/WebCore:
+    
+    This patch simply calls setNeedsRecalcStyleInAllFrames on every Page when we receive a
+    kCTFontManagerRegisteredFontsChangedNotification.
+    
+    FontCache::invalidateAllFontCaches() can't do this directly because it's in platform/ and
+    therefore isn't allowed to know what Pages are. Instead, this patch takes a process-global
+    callback and calls that instead. This callback is set at initialization time.
+    
+    Test: fast/text/install-font-style-recalc.html
+    
+    * page/Page.cpp:
+    (WebCore::m_contentSecurityPolicyModeForExtension):
+    (WebCore::Page::firstTimeInitialization):
+    * page/Page.h:
+    * platform/graphics/FontCache.cpp:
+    (WebCore::Function<void):
+    (WebCore::FontCache::registerFontCacheInvalidationCallback):
+    (WebCore::FontCache::invalidateAllFontCaches):
+    * platform/graphics/FontCache.h:
+    
+    Tools:
+    
+    Make TestRunner::dumpResourceLoadStatistics() clear any currently-recorded statistics.
+    This avoids the problem where spurious layouts during the time when the page has been created but
+    before the test has begun record irrelevant statistics.
+    
+    * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+    (WTR::InjectedBundle::beginTesting):
+    (WTR::InjectedBundle::clearResourceLoadStatistics):
+    * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+    * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+    (WTR::TestRunner::dumpResourceLoadStatistics):
+    
+    LayoutTests:
+    
+    * TestExpectations:
+    * fast/text/install-font-style-recalc-expected.txt: Added.
+    * fast/text/install-font-style-recalc.html: Added.
+    * platform/ios-wk2/TestExpectations:
+    * platform/mac-wk2/TestExpectations:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-04-02  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+            [Cocoa] Automatically relayout the page when new fonts are installed
+            https://bugs.webkit.org/show_bug.cgi?id=238483
+            <rdar://problem/80544133>
+
+            Reviewed by Chris Dumez.
+
+            * TestExpectations:
+            * fast/text/install-font-style-recalc-expected.txt: Added.
+            * fast/text/install-font-style-recalc.html: Added.
+            * platform/ios-wk2/TestExpectations:
+            * platform/mac-wk2/TestExpectations:
+
 2022-04-22  Russell Epstein  <repst...@apple.com>
 
         Cherry-pick r291724. rdar://problem/91975589

Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (293376 => 293377)


--- branches/safari-613-branch/Source/WebCore/ChangeLog	2022-04-26 00:02:57 UTC (rev 293376)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog	2022-04-26 00:03:02 UTC (rev 293377)
@@ -79,6 +79,87 @@
             (WebCore::FontCache::invalidateAllFontCaches):
             * platform/graphics/FontCache.h:
 
+2022-04-22  Alan Coon  <alanc...@apple.com>
+
+        Cherry-pick r292274. rdar://problem/80544133
+
+    [Cocoa] Automatically relayout the page when new fonts are installed
+    https://bugs.webkit.org/show_bug.cgi?id=238483
+    <rdar://problem/80544133>
+    
+    Reviewed by Chris Dumez.
+    
+    Source/WebCore:
+    
+    This patch simply calls setNeedsRecalcStyleInAllFrames on every Page when we receive a
+    kCTFontManagerRegisteredFontsChangedNotification.
+    
+    FontCache::invalidateAllFontCaches() can't do this directly because it's in platform/ and
+    therefore isn't allowed to know what Pages are. Instead, this patch takes a process-global
+    callback and calls that instead. This callback is set at initialization time.
+    
+    Test: fast/text/install-font-style-recalc.html
+    
+    * page/Page.cpp:
+    (WebCore::m_contentSecurityPolicyModeForExtension):
+    (WebCore::Page::firstTimeInitialization):
+    * page/Page.h:
+    * platform/graphics/FontCache.cpp:
+    (WebCore::Function<void):
+    (WebCore::FontCache::registerFontCacheInvalidationCallback):
+    (WebCore::FontCache::invalidateAllFontCaches):
+    * platform/graphics/FontCache.h:
+    
+    Tools:
+    
+    Make TestRunner::dumpResourceLoadStatistics() clear any currently-recorded statistics.
+    This avoids the problem where spurious layouts during the time when the page has been created but
+    before the test has begun record irrelevant statistics.
+    
+    * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+    (WTR::InjectedBundle::beginTesting):
+    (WTR::InjectedBundle::clearResourceLoadStatistics):
+    * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+    * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+    (WTR::TestRunner::dumpResourceLoadStatistics):
+    
+    LayoutTests:
+    
+    * TestExpectations:
+    * fast/text/install-font-style-recalc-expected.txt: Added.
+    * fast/text/install-font-style-recalc.html: Added.
+    * platform/ios-wk2/TestExpectations:
+    * platform/mac-wk2/TestExpectations:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-04-02  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+            [Cocoa] Automatically relayout the page when new fonts are installed
+            https://bugs.webkit.org/show_bug.cgi?id=238483
+            <rdar://problem/80544133>
+
+            Reviewed by Chris Dumez.
+
+            This patch simply calls setNeedsRecalcStyleInAllFrames on every Page when we receive a
+            kCTFontManagerRegisteredFontsChangedNotification.
+
+            FontCache::invalidateAllFontCaches() can't do this directly because it's in platform/ and
+            therefore isn't allowed to know what Pages are. Instead, this patch takes a process-global
+            callback and calls that instead. This callback is set at initialization time.
+
+            Test: fast/text/install-font-style-recalc.html
+
+            * page/Page.cpp:
+            (WebCore::m_contentSecurityPolicyModeForExtension):
+            (WebCore::Page::firstTimeInitialization):
+            * page/Page.h:
+            * platform/graphics/FontCache.cpp:
+            (WebCore::Function<void):
+            (WebCore::FontCache::registerFontCacheInvalidationCallback):
+            (WebCore::FontCache::invalidateAllFontCaches):
+            * platform/graphics/FontCache.h:
+
 2022-04-22  Russell Epstein  <repst...@apple.com>
 
         Cherry-pick r291589. rdar://problem/90511155

Modified: branches/safari-613-branch/Tools/ChangeLog (293376 => 293377)


--- branches/safari-613-branch/Tools/ChangeLog	2022-04-26 00:02:57 UTC (rev 293376)
+++ branches/safari-613-branch/Tools/ChangeLog	2022-04-26 00:03:02 UTC (rev 293377)
@@ -71,6 +71,79 @@
             * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
             (WTR::TestRunner::dumpResourceLoadStatistics):
 
+2022-04-22  Alan Coon  <alanc...@apple.com>
+
+        Cherry-pick r292274. rdar://problem/80544133
+
+    [Cocoa] Automatically relayout the page when new fonts are installed
+    https://bugs.webkit.org/show_bug.cgi?id=238483
+    <rdar://problem/80544133>
+    
+    Reviewed by Chris Dumez.
+    
+    Source/WebCore:
+    
+    This patch simply calls setNeedsRecalcStyleInAllFrames on every Page when we receive a
+    kCTFontManagerRegisteredFontsChangedNotification.
+    
+    FontCache::invalidateAllFontCaches() can't do this directly because it's in platform/ and
+    therefore isn't allowed to know what Pages are. Instead, this patch takes a process-global
+    callback and calls that instead. This callback is set at initialization time.
+    
+    Test: fast/text/install-font-style-recalc.html
+    
+    * page/Page.cpp:
+    (WebCore::m_contentSecurityPolicyModeForExtension):
+    (WebCore::Page::firstTimeInitialization):
+    * page/Page.h:
+    * platform/graphics/FontCache.cpp:
+    (WebCore::Function<void):
+    (WebCore::FontCache::registerFontCacheInvalidationCallback):
+    (WebCore::FontCache::invalidateAllFontCaches):
+    * platform/graphics/FontCache.h:
+    
+    Tools:
+    
+    Make TestRunner::dumpResourceLoadStatistics() clear any currently-recorded statistics.
+    This avoids the problem where spurious layouts during the time when the page has been created but
+    before the test has begun record irrelevant statistics.
+    
+    * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+    (WTR::InjectedBundle::beginTesting):
+    (WTR::InjectedBundle::clearResourceLoadStatistics):
+    * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+    * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+    (WTR::TestRunner::dumpResourceLoadStatistics):
+    
+    LayoutTests:
+    
+    * TestExpectations:
+    * fast/text/install-font-style-recalc-expected.txt: Added.
+    * fast/text/install-font-style-recalc.html: Added.
+    * platform/ios-wk2/TestExpectations:
+    * platform/mac-wk2/TestExpectations:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-04-02  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+            [Cocoa] Automatically relayout the page when new fonts are installed
+            https://bugs.webkit.org/show_bug.cgi?id=238483
+            <rdar://problem/80544133>
+
+            Reviewed by Chris Dumez.
+
+            Make TestRunner::dumpResourceLoadStatistics() clear any currently-recorded statistics.
+            This avoids the problem where spurious layouts during the time when the page has been created but
+            before the test has begun record irrelevant statistics.
+
+            * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+            (WTR::InjectedBundle::beginTesting):
+            (WTR::InjectedBundle::clearResourceLoadStatistics):
+            * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+            * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+            (WTR::TestRunner::dumpResourceLoadStatistics):
+
 2022-04-22  Russell Epstein  <repst...@apple.com>
 
         Apply patch. rdar://problem/91288849
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to