[webkit-changes] [WebKit/WebKit] f99fba: Add way to check whether iframe's owner element ma...
Basuke Suzuki
noreply at github.com
Fri Jan 31 10:20:56 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f99fba6f4b88b7538876ecc2d490efc81eeebdb7
https://github.com/WebKit/WebKit/commit/f99fba6f4b88b7538876ecc2d490efc81eeebdb7
Author: Basuke Suzuki <basuke at apple.com>
Date: 2025-01-31 (Fri, 31 Jan 2025)
Changed paths:
A LayoutTests/http/tests/iframe-monitor/dark-mode-expected.txt
A LayoutTests/http/tests/iframe-monitor/dark-mode.html
M LayoutTests/http/tests/iframe-monitor/resources/monitor-setup.js
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/page/LocalFrame.cpp
M Source/WebCore/rendering/style/RenderStyleConstants.h
Log Message:
-----------
Add way to check whether iframe's owner element may follow dark appearance
https://bugs.webkit.org/show_bug.cgi?id=286713
rdar://143827621
Reviewed by Aditya Keerthi.
Need to detect iframe element in main document may respond to dark appearance in CSS or document’s meta tag.
Add `Document::resolvedColorScheme(RenderStyle*) const` to get the element's color scheme to check which scheme
is ready to be used for the element.
* LayoutTests/http/tests/iframe-monitor/dark-mode-expected.txt: Added.
* LayoutTests/http/tests/iframe-monitor/dark-mode.html: Added.
* LayoutTests/http/tests/iframe-monitor/resources/monitor-setup.js:
(async waitUntilUnload):
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::resolvedColorScheme const):
(WebCore::Document::useDarkAppearance const):
* Source/WebCore/dom/Document.h:
* Source/WebCore/page/LocalFrame.cpp:
(WebCore::generateResourceMonitorErrorHTML):
(WebCore::LocalFrame::showResourceMonitoringError):
* Source/WebCore/rendering/style/RenderStyleConstants.h:
Canonical link: https://commits.webkit.org/289613@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