[webkit-changes] [WebKit/WebKit] fe5bf1: [Site isolation] Dark mode state needs to be propa...
Said Abou-Hallawa
noreply at github.com
Wed Oct 23 09:16:05 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fe5bf113532e9e7753f2ba2c0856bdd097c82f96
https://github.com/WebKit/WebKit/commit/fe5bf113532e9e7753f2ba2c0856bdd097c82f96
Author: Said Abou-Hallawa <said at apple.com>
Date: 2024-10-23 (Wed, 23 Oct 2024)
Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/http/tests/site-isolation/iframe-dark-mode-expected.html
A LayoutTests/http/tests/site-isolation/iframe-dark-mode-print-expected.html
A LayoutTests/http/tests/site-isolation/iframe-dark-mode-print.html
A LayoutTests/http/tests/site-isolation/iframe-dark-mode.html
A LayoutTests/http/tests/site-isolation/resources/dark-mode-background.html
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/testing/InternalSettings.cpp
M Source/WebKit/UIProcess/API/C/WKPage.cpp
M Source/WebKit/UIProcess/API/C/WKPagePrivate.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
M Source/WebKitLegacy/mac/WebView/WebView.mm
M Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
M Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
M Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
M Tools/WebKitTestRunner/TestController.cpp
M Tools/WebKitTestRunner/TestController.h
M Tools/WebKitTestRunner/TestInvocation.cpp
Log Message:
-----------
[Site isolation] Dark mode state needs to be propagated to site isolated iframes
https://bugs.webkit.org/show_bug.cgi?id=281805
rdar://122050091
Reviewed by Matt Woodrow.
Make sure the SetUseColorAppearance is sent from the UI Process to all the
WebContent Processes.
If the MainFrame is a RemoteFrame, make Page::useDarkAppearance() return the
current set m_useDarkAppearance instead of returning false. This should be
preceded by checking whether we are printing this Page or not. And if we are
printing the Page, Page::useDarkAppearance() should return false.
But currently the printing for site isolation is broken and printing the main
frame is not propagated to the remote frames.
* LayoutTests/TestExpectations:
* LayoutTests/http/tests/site-isolation/iframe-dark-mode-expected.html: Added.
* LayoutTests/http/tests/site-isolation/iframe-dark-mode-print-expected.html: Added.
* LayoutTests/http/tests/site-isolation/iframe-dark-mode-print.html: Added.
* LayoutTests/http/tests/site-isolation/iframe-dark-mode.html: Added.
* LayoutTests/http/tests/site-isolation/resources/dark-mode-background.html: Added.
* Source/WebCore/page/Page.cpp:
(WebCore::Page::setUseColorAppearance):
(WebCore::Page::useDarkAppearance const):
(WebCore::Page::effectiveAppearanceDidChange): Deleted.
* Source/WebCore/page/Page.h:
* Source/WebCore/testing/InternalSettings.cpp:
(WebCore::InternalSettings::resetToConsistentState):
(WebCore::InternalSettings::setUseDarkAppearance):
(WebCore::InternalSettings::setUseElevatedUserInterfaceLevel):
* Source/WebKit/UIProcess/API/C/WKPage.cpp:
(WKPageSetUseDarkAppearanceForTesting):
* Source/WebKit/UIProcess/API/C/WKPagePrivate.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setUseColorAppearance):
(WebKit::WebPageProxy::setUseDarkAppearanceForTesting):
(WebKit::WebPageProxy::effectiveAppearanceDidChange):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetUseDarkAppearance):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::m_textAnimationController):
(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::setUseColorAppearance):
(WebKit::WebPage::effectiveAppearanceDidChange): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Source/WebKitLegacy/mac/WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _setUseDarkAppearance:useElevatedUserInterfaceLevel:]):
(-[WebView viewDidChangeEffectiveAppearance]):
* Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setUseDarkAppearanceForTesting):
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.h:
* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::setUseDarkAppearanceForTesting):
* Tools/WebKitTestRunner/TestController.h:
* Tools/WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
Canonical link: https://commits.webkit.org/285606@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list