Commit 973af522 authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

Invalidate paint when used color-scheme changes.

When color-scheme affects other CSS properties, invalidation diffing
those properties are sufficient. However, some parts of UA rendered UI
elements are painted based on colors not defined in CSS. Invalidate
paint when the used color-scheme value changes so that such elements are
properly repainted on color-scheme changes.

Bug: 929098
Change-Id: Icedafd9fa1d787b4db64e6d698ecfcdc144a4ec7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2150905Reviewed-by: default avatarAnders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#759362}
parent 8ca90332
......@@ -266,6 +266,10 @@
method: "Resize()",
field_dependencies: ["resize"]
},
{
method: "UsedColorScheme()",
field_dependencies: ["color-scheme"]
},
],
predicates_to_test: [
{
......
<!doctype html>
<html class="reftest-wait">
<head>
<title>CSS Color Adjustment Test: Checkbox rendering should change between dark and light schemes</title>
<link rel="help" href="https://drafts.csswg.org/css-color-adjust/#color-scheme-processing">
<link rel="mismatch" href="color-scheme-change-checkbox-notref.html">
<link rel="stylesheet" href="support/assert-preferred-dark.css">
<script src="/common/reftest-wait.js"></script>
</head>
<body>
<input type="checkbox">
</body>
<script>
requestAnimationFrame(() => {
requestAnimationFrame(() => {
document.querySelector("input").style.colorScheme = "dark";
takeScreenshot();
});
});
</script>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment