haikuwebkit/LayoutTests/css-dark-mode/color-scheme-css-parse-expe...

5 lines
50 B
Plaintext
Raw Permalink Normal View History

Add experimental support for a `supported-color-schemes` CSS property. https://bugs.webkit.org/show_bug.cgi?id=191319 rdar://problem/45852261 Reviewed by Dean Jackson. Source/WebCore: Tests: css-dark-mode/parse-supported-color-schemes.html css-dark-mode/supported-color-schemes-css.html * WebCore.xcodeproj/project.pbxproj: * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): * css/CSSProperties.json: * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::updateSupportedColorSchemes): (WebCore::StyleBuilderConverter::convertSupportedColorSchemes): * css/StyleResolver.cpp: (WebCore::StyleResolver::colorFromPrimitiveValue const): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeSupportedColorSchemes): (WebCore::CSSPropertyParser::parseSingleValue): * dom/Document.cpp: (WebCore::Document::resetLinkColor): (WebCore::Document::resetVisitedLinkColor): (WebCore::Document::resetActiveLinkColor): (WebCore::Document::processSupportedColorSchemes): (WebCore::Document::useDarkAppearance const): (WebCore::Document::styleColorOptions const): * dom/Document.h: * editing/cocoa/WebContentReaderCocoa.mm: (WebCore::createFragment): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal): * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::paint): * page/FrameView.cpp: (WebCore::FrameView::useDarkAppearance const): (WebCore::FrameView::paintScrollCorner): * platform/mac/DragImageMac.mm: (WebCore::createDragImageForLink): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintBoxDecorations): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintPlatformDocumentMarker): * rendering/RenderBox.cpp: (WebCore::RenderBox::paintRootBoxFillLayers): (WebCore::RenderBox::paintBackground): * rendering/RenderElement.cpp: (WebCore::RenderElement::selectionColor const): (WebCore::RenderElement::selectionBackgroundColor const): (WebCore::RenderElement::paintFocusRing): * rendering/RenderImage.cpp: (WebCore::RenderImage::paintAreaElementFocusRing): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintContents): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::paintContents): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintItemForeground): (WebCore::RenderListBox::paintItemBackground): * rendering/RenderObject.cpp: (WebCore::RenderObject::useDarkAppearance const): (WebCore::RenderObject::styleColorOptions const): * rendering/RenderObject.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintBackgroundsBehindCell): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): * rendering/RenderTheme.h: (WebCore::RenderTheme::usingDarkAppearance const): Deleted. * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::documentViewFor const): (WebCore::RenderThemeMac::adjustMenuListStyle const): (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary): (WebCore::RenderThemeMac::paintSliderThumb): (WebCore::RenderThemeMac::usingDarkAppearance const): Deleted. * rendering/style/RenderStyle.h: (WebCore::RenderStyle::supportedColorSchemes const): (WebCore::RenderStyle::setSupportedColorSchemes): (WebCore::RenderStyle::initialSupportedColorSchemes): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleRareInheritedData::operator== const): * rendering/style/StyleRareInheritedData.h: * rendering/style/StyleSupportedColorSchemes.h: Added. (WebCore::StyleSupportedColorSchemes::StyleSupportedColorSchemes): (WebCore::StyleSupportedColorSchemes::operator== const): (WebCore::StyleSupportedColorSchemes::operator!= const): (WebCore::StyleSupportedColorSchemes::isAuto const): (WebCore::StyleSupportedColorSchemes::isOnly const): (WebCore::StyleSupportedColorSchemes::colorSchemes const): (WebCore::StyleSupportedColorSchemes::add): (WebCore::StyleSupportedColorSchemes::contains const): (WebCore::StyleSupportedColorSchemes::setAllowsTransformations): (WebCore::StyleSupportedColorSchemes::allowsTransformations const): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::draw): Source/WebKit: * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: (WebKit::InjectedBundleRangeHandle::renderedImage): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRect): LayoutTests: * css-dark-mode/parse-supported-color-schemes-expected.txt: Added. * css-dark-mode/parse-supported-color-schemes.html: Added. * css-dark-mode/supported-color-schemes-css-expected.txt: Added. * css-dark-mode/supported-color-schemes-css.html: Added. Canonical link: https://commits.webkit.org/206220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-08 21:57:40 +00:00
PASS Test valid values
PASS Test invalid values
Add experimental support for a `supported-color-schemes` CSS property. https://bugs.webkit.org/show_bug.cgi?id=191319 rdar://problem/45852261 Reviewed by Dean Jackson. Source/WebCore: Tests: css-dark-mode/parse-supported-color-schemes.html css-dark-mode/supported-color-schemes-css.html * WebCore.xcodeproj/project.pbxproj: * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): * css/CSSProperties.json: * css/CSSValueKeywords.in: * css/StyleBuilderConverter.h: (WebCore::StyleBuilderConverter::updateSupportedColorSchemes): (WebCore::StyleBuilderConverter::convertSupportedColorSchemes): * css/StyleResolver.cpp: (WebCore::StyleResolver::colorFromPrimitiveValue const): * css/parser/CSSPropertyParser.cpp: (WebCore::consumeSupportedColorSchemes): (WebCore::CSSPropertyParser::parseSingleValue): * dom/Document.cpp: (WebCore::Document::resetLinkColor): (WebCore::Document::resetVisitedLinkColor): (WebCore::Document::resetActiveLinkColor): (WebCore::Document::processSupportedColorSchemes): (WebCore::Document::useDarkAppearance const): (WebCore::Document::styleColorOptions const): * dom/Document.h: * editing/cocoa/WebContentReaderCocoa.mm: (WebCore::createFragment): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal): * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::paint): * page/FrameView.cpp: (WebCore::FrameView::useDarkAppearance const): (WebCore::FrameView::paintScrollCorner): * platform/mac/DragImageMac.mm: (WebCore::createDragImageForLink): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintBoxDecorations): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintPlatformDocumentMarker): * rendering/RenderBox.cpp: (WebCore::RenderBox::paintRootBoxFillLayers): (WebCore::RenderBox::paintBackground): * rendering/RenderElement.cpp: (WebCore::RenderElement::selectionColor const): (WebCore::RenderElement::selectionBackgroundColor const): (WebCore::RenderElement::paintFocusRing): * rendering/RenderImage.cpp: (WebCore::RenderImage::paintAreaElementFocusRing): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintContents): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::paintContents): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintItemForeground): (WebCore::RenderListBox::paintItemBackground): * rendering/RenderObject.cpp: (WebCore::RenderObject::useDarkAppearance const): (WebCore::RenderObject::styleColorOptions const): * rendering/RenderObject.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintBackgroundsBehindCell): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): * rendering/RenderTheme.h: (WebCore::RenderTheme::usingDarkAppearance const): Deleted. * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::documentViewFor const): (WebCore::RenderThemeMac::adjustMenuListStyle const): (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary): (WebCore::RenderThemeMac::paintSliderThumb): (WebCore::RenderThemeMac::usingDarkAppearance const): Deleted. * rendering/style/RenderStyle.h: (WebCore::RenderStyle::supportedColorSchemes const): (WebCore::RenderStyle::setSupportedColorSchemes): (WebCore::RenderStyle::initialSupportedColorSchemes): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleRareInheritedData::operator== const): * rendering/style/StyleRareInheritedData.h: * rendering/style/StyleSupportedColorSchemes.h: Added. (WebCore::StyleSupportedColorSchemes::StyleSupportedColorSchemes): (WebCore::StyleSupportedColorSchemes::operator== const): (WebCore::StyleSupportedColorSchemes::operator!= const): (WebCore::StyleSupportedColorSchemes::isAuto const): (WebCore::StyleSupportedColorSchemes::isOnly const): (WebCore::StyleSupportedColorSchemes::colorSchemes const): (WebCore::StyleSupportedColorSchemes::add): (WebCore::StyleSupportedColorSchemes::contains const): (WebCore::StyleSupportedColorSchemes::setAllowsTransformations): (WebCore::StyleSupportedColorSchemes::allowsTransformations const): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::draw): Source/WebKit: * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: (WebKit::InjectedBundleRangeHandle::renderedImage): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRect): LayoutTests: * css-dark-mode/parse-supported-color-schemes-expected.txt: Added. * css-dark-mode/parse-supported-color-schemes.html: Added. * css-dark-mode/supported-color-schemes-css-expected.txt: Added. * css-dark-mode/supported-color-schemes-css.html: Added. Canonical link: https://commits.webkit.org/206220@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-11-08 21:57:40 +00:00