Treat supported-color-schemes as the second highest priority property.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Nov 2018 18:44:25 +0000 (18:44 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Nov 2018 18:44:25 +0000 (18:44 +0000)
commita25232883f2e6f88197fb60cac04cef08a191010
tree2aa9a29bf74ef2ed440e3ee0d8364fc58c665a0b
parent8b03769a0a45928ea1858e6592b625af4ffbec28
Treat supported-color-schemes as the second highest priority property.
https://bugs.webkit.org/show_bug.cgi?id=191556
rdar://problem/46000076

Reviewed by Dean Jackson.

Source/WebCore:

Test: css-dark-mode/supported-color-schemes-priority.html

* css/CSSProperties.json: Make supported-color-schemes high-priority and add a comment.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyMatchedProperties): Manually handle supported-color-schemes
after -webkit-ruby-position, before other properties, so it can affect resolved colors.

LayoutTests:

* css-dark-mode/supported-color-schemes-priority-expected.txt: Added.
* css-dark-mode/supported-color-schemes-priority.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238138 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css-dark-mode/supported-color-schemes-priority-expected.txt [new file with mode: 0644]
LayoutTests/css-dark-mode/supported-color-schemes-priority.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSProperties.json
Source/WebCore/css/StyleResolver.cpp