haikuwebkit/LayoutTests/css-dark-mode/color-scheme-meta-expected.txt

26 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

Add <meta name="supported-color-schemes"> to control what color schemes the page supports https://bugs.webkit.org/show_bug.cgi?id=190526 rdar://problem/45230140 Reviewed by Dean Jackson. Source/WebCore: Test: css-dark-mode/supported-color-schemes.html * dom/Document.cpp: (WebCore::isColorSchemeSeparator): Added. (WebCore::processColorSchemes): Added. (WebCore::Document::processSupportedColorSchemes): Added. (WebCore::Document::useDarkAppearance const): Take system appearance and document's suppoerted color shcemes into account. * dom/Document.h: * editing/cocoa/WebContentReaderCocoa.mm: (WebCore::createFragment): Update use of LocalDefaultSystemAppearance. * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::process): Added supported-color-schemes behind runtime feature check. * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::paint): Update use of LocalDefaultSystemAppearance. * platform/mac/DragImageMac.mm: (WebCore::createDragImageForLink): Update use of LocalDefaultSystemAppearance. * platform/mac/LocalDefaultSystemAppearance.h: * platform/mac/LocalDefaultSystemAppearance.mm: (WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance): Drop the need for useSystemAppearance. This is accounted for in Document::useDarkAppearance. * platform/mac/ThemeMac.mm: (WebCore::ThemeMac::paint): Update use of LocalDefaultSystemAppearance. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintContents): Update use of LocalDefaultSystemAppearance. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::paintContents): Update use of LocalDefaultSystemAppearance. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): Use document instead of page. * rendering/RenderThemeCocoa.mm: (WebCore::RenderThemeCocoa::drawLineForDocumentMarker): Update use of LocalDefaultSystemAppearance. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::documentViewFor const): Update use of LocalDefaultSystemAppearance. (WebCore::RenderThemeMac::platformActiveSelectionBackgroundColor const): Ditto. (WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor const): Ditto. (WebCore::RenderThemeMac::transformSelectionBackgroundColor const): Ditto. (WebCore::RenderThemeMac::supportsSelectionForegroundColors const): Ditto. (WebCore::RenderThemeMac::platformActiveSelectionForegroundColor const): Ditto. (WebCore::RenderThemeMac::platformInactiveSelectionForegroundColor const): Ditto. (WebCore::RenderThemeMac::platformActiveListBoxSelectionBackgroundColor const): Ditto. (WebCore::RenderThemeMac::platformInactiveListBoxSelectionBackgroundColor const): Ditto. (WebCore::RenderThemeMac::platformActiveListBoxSelectionForegroundColor const): Ditto. (WebCore::RenderThemeMac::platformInactiveListBoxSelectionForegroundColor const): Ditto. (WebCore::RenderThemeMac::platformActiveTextSearchHighlightColor const): Ditto. (WebCore::RenderThemeMac::colorCache const): Ditto. (WebCore::RenderThemeMac::systemColor const): Ditto. (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary): Ditto. (WebCore::RenderThemeMac::paintSliderThumb): Ditto. (WebCore::RenderThemeMac::usingDarkAppearance const): No need to limit to macOS here. * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::draw): Update use of LocalDefaultSystemAppearance. Source/WebKit: * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView drawRect:]): Update use of LocalDefaultSystemAppearance. * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: (WebKit::InjectedBundleRangeHandle::renderedImage): Ditto. * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::paintControlForLayerInContext): Ditto. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRect): Ditto. Source/WebKitLegacy/mac: * WebCoreSupport/WebEditorClient.mm: (_WebCreateFragment): Update use of LocalDefaultSystemAppearance. LayoutTests: * css-dark-mode/supported-color-schemes-expected.txt: Added. * css-dark-mode/supported-color-schemes.html: Added. Canonical link: https://commits.webkit.org/205575@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 21:53:55 +00:00
PASS Element colors are correct in light color scheme with only light color scheme
PASS Dark color scheme enabled
PASS Element colors are correct in dark color scheme with only light color scheme
PASS Light color scheme enabled
PASS Color schemes changed to light and dark
PASS Element colors are correct in light color scheme with light and dark color scheme
PASS Dark color scheme enabled 2
PASS Element colors are correct in dark color scheme with light and dark color scheme
PASS Light color scheme enabled 2
PASS Color schemes changed to dark
PASS Element colors are correct in light color scheme with only dark color scheme
PASS Dark color scheme enabled 3
PASS Element colors are correct in dark color scheme with only dark color scheme
PASS Color schemes changed to light and a bogus value
PASS Element colors are correct in dark color scheme with only light color scheme 2
PASS Color schemes changed to empty value
PASS Element colors are correct in dark color scheme with implicit light color scheme
PASS Color schemes changed to light,dark
PASS Element colors are in light color scheme since comma is not an allowed seperator
PASS Color schemes changed to foo\vdark
PASS Element colors are in light color scheme since vertical tab is not an allowed seperator
PASS Color schemes changed to a bogus value and dark
PASS Element colors are correct in dark color scheme with dark color scheme
Add <meta name="supported-color-schemes"> to control what color schemes the page supports https://bugs.webkit.org/show_bug.cgi?id=190526 rdar://problem/45230140 Reviewed by Dean Jackson. Source/WebCore: Test: css-dark-mode/supported-color-schemes.html * dom/Document.cpp: (WebCore::isColorSchemeSeparator): Added. (WebCore::processColorSchemes): Added. (WebCore::Document::processSupportedColorSchemes): Added. (WebCore::Document::useDarkAppearance const): Take system appearance and document's suppoerted color shcemes into account. * dom/Document.h: * editing/cocoa/WebContentReaderCocoa.mm: (WebCore::createFragment): Update use of LocalDefaultSystemAppearance. * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::process): Added supported-color-schemes behind runtime feature check. * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::paint): Update use of LocalDefaultSystemAppearance. * platform/mac/DragImageMac.mm: (WebCore::createDragImageForLink): Update use of LocalDefaultSystemAppearance. * platform/mac/LocalDefaultSystemAppearance.h: * platform/mac/LocalDefaultSystemAppearance.mm: (WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance): Drop the need for useSystemAppearance. This is accounted for in Document::useDarkAppearance. * platform/mac/ThemeMac.mm: (WebCore::ThemeMac::paint): Update use of LocalDefaultSystemAppearance. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintContents): Update use of LocalDefaultSystemAppearance. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::paintContents): Update use of LocalDefaultSystemAppearance. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): Use document instead of page. * rendering/RenderThemeCocoa.mm: (WebCore::RenderThemeCocoa::drawLineForDocumentMarker): Update use of LocalDefaultSystemAppearance. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::documentViewFor const): Update use of LocalDefaultSystemAppearance. (WebCore::RenderThemeMac::platformActiveSelectionBackgroundColor const): Ditto. (WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor const): Ditto. (WebCore::RenderThemeMac::transformSelectionBackgroundColor const): Ditto. (WebCore::RenderThemeMac::supportsSelectionForegroundColors const): Ditto. (WebCore::RenderThemeMac::platformActiveSelectionForegroundColor const): Ditto. (WebCore::RenderThemeMac::platformInactiveSelectionForegroundColor const): Ditto. (WebCore::RenderThemeMac::platformActiveListBoxSelectionBackgroundColor const): Ditto. (WebCore::RenderThemeMac::platformInactiveListBoxSelectionBackgroundColor const): Ditto. (WebCore::RenderThemeMac::platformActiveListBoxSelectionForegroundColor const): Ditto. (WebCore::RenderThemeMac::platformInactiveListBoxSelectionForegroundColor const): Ditto. (WebCore::RenderThemeMac::platformActiveTextSearchHighlightColor const): Ditto. (WebCore::RenderThemeMac::colorCache const): Ditto. (WebCore::RenderThemeMac::systemColor const): Ditto. (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary): Ditto. (WebCore::RenderThemeMac::paintSliderThumb): Ditto. (WebCore::RenderThemeMac::usingDarkAppearance const): No need to limit to macOS here. * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::draw): Update use of LocalDefaultSystemAppearance. Source/WebKit: * UIProcess/mac/WKPrintingView.mm: (-[WKPrintingView drawRect:]): Update use of LocalDefaultSystemAppearance. * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: (WebKit::InjectedBundleRangeHandle::renderedImage): Ditto. * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::paintControlForLayerInContext): Ditto. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRect): Ditto. Source/WebKitLegacy/mac: * WebCoreSupport/WebEditorClient.mm: (_WebCreateFragment): Update use of LocalDefaultSystemAppearance. LayoutTests: * css-dark-mode/supported-color-schemes-expected.txt: Added. * css-dark-mode/supported-color-schemes.html: Added. Canonical link: https://commits.webkit.org/205575@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-10-16 21:53:55 +00:00