Bug 1643794 [wpt PR 24017] - Pass the PreferredColorScheme to SVGImage, a=testonly
authorAlison Maher <almaher@microsoft.com>
Wed, 10 Jun 2020 11:34:46 +0000
changeset 535416 e1c18500c68d2fdfd8d861a1ffcf649ae3cceff8
parent 535415 89f6b15eb8e041d198fdfd3b9fdd5a42f653a15c
child 535417 318f8f1d6831f13bbef62260fc1fd9cc07d36870
push id118854
push userwptsync@mozilla.com
push dateFri, 12 Jun 2020 09:24:54 +0000
treeherderautoland@989aaabe4f66 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1643794, 24017, 2079192, 1090464, 1090660, 2230909, 776160
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1643794 [wpt PR 24017] - Pass the PreferredColorScheme to SVGImage, a=testonly Automatic update from web-platform-tests Pass the PreferredColorScheme to SVGImage As a result of http://crrev.com/c/2079192, the PreferredColorScheme is stored and accessed through WebSettings instead of WebThemeEngine. With this change, SVGImage no longer can retrieve the correct PreferredColorScheme needed to respond to the prefers-color-scheme media query as it had before. To fix this, pass the PreferredColorScheme from Settings to SVGImage via SVGImage::DataChange(). Bug: 1090464,1090660 Change-Id: I0aacd08930fad21f55c9dfa8dd1b8f747912237d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2230909 Commit-Queue: Alison Maher <almaher@microsoft.com> Reviewed-by: Fredrik Söderquist <fs@opera.com> Reviewed-by: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#776160} -- wpt-commits: e1c4ef0d88579a56897b211b0391d5e5e24d57fd wpt-pr: 24017
testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/support/prefers-color-scheme.svg
testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/svg-as-image.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/support/prefers-color-scheme.svg
@@ -0,0 +1,10 @@
+<svg xmlns="http://www.w3.org/2000/svg" width='100px' height='100px'>
+  <style>
+    @media (prefers-color-scheme: dark) {
+      rect {
+        fill: green;
+      }
+    }
+  </style>
+  <rect fill='blue' width='100px' height='100px' />
+</svg>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/svg-as-image.html
@@ -0,0 +1,7 @@
+<!doctype html>
+<head>
+  <title>prefers-color-scheme inside an SVG image</title>
+  <link rel="help" href="https://www.w3.org/TR/mediaqueries-5/#descdef-media-prefers-color-scheme">
+  <link rel="match" href="../../../css-layout-api/green-square-ref.html">
+</head>
+<img src='support/prefers-color-scheme.svg'>