Commit d480483d authored by Alison Maher's avatar Alison Maher Committed by Commit Bot

Web test crash with CSSSystemColorComputeToSelf enabled

virtual/forced-high-contrast-colors/fast/css/forced-colors-mode/forced-colors-mode-13.html
was crashing with CSSSystemColorComputeToSelf enabled. The reason
being that CSSColorInterpolationType::CreateInterpolableColor() didn't
properly handle system colors with the flag enabled.

Bug: 1081945,970285
Change-Id: I83b742ef2675addf9129187eb9cfa7c5faaa8aee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2404109Reviewed-by: default avatarKevin Babbitt <kbabbitt@microsoft.com>
Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Commit-Queue: Alison Maher <almaher@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#806336}
parent 8f298807
...@@ -79,8 +79,8 @@ CSSColorInterpolationType::CreateInterpolableColor(CSSValueID keyword) { ...@@ -79,8 +79,8 @@ CSSColorInterpolationType::CreateInterpolableColor(CSSValueID keyword) {
std::unique_ptr<InterpolableValue> std::unique_ptr<InterpolableValue>
CSSColorInterpolationType::CreateInterpolableColor(const StyleColor& color) { CSSColorInterpolationType::CreateInterpolableColor(const StyleColor& color) {
if (color.IsCurrentColor()) if (!color.IsNumeric())
return CreateInterpolableColorForIndex(kCurrentcolor); return CreateInterpolableColor(color.GetColorKeyword());
return CreateInterpolableColor(color.GetColor()); return CreateInterpolableColor(color.GetColor());
} }
......
...@@ -66,6 +66,10 @@ class CORE_EXPORT StyleColor { ...@@ -66,6 +66,10 @@ class CORE_EXPORT StyleColor {
DCHECK(IsNumeric()); DCHECK(IsNumeric());
return color_; return color_;
} }
CSSValueID GetColorKeyword() const {
DCHECK(!IsNumeric());
return color_keyword_;
}
Color Resolve(Color current_color, WebColorScheme color_scheme) const; Color Resolve(Color current_color, WebColorScheme color_scheme) const;
......
...@@ -5745,8 +5745,6 @@ crbug.com/970285 [ Win ] virtual/forced-high-contrast-colors/* [ Pass ] ...@@ -5745,8 +5745,6 @@ crbug.com/970285 [ Win ] virtual/forced-high-contrast-colors/* [ Pass ]
crbug.com/970285 [ Linux ] virtual/forced-high-contrast-colors/* [ Pass ] crbug.com/970285 [ Linux ] virtual/forced-high-contrast-colors/* [ Pass ]
crbug.com/970285 [ Android ] virtual/forced-high-contrast-colors/* [ Pass ] crbug.com/970285 [ Android ] virtual/forced-high-contrast-colors/* [ Pass ]
crbug.com/1081945 virtual/forced-high-contrast-colors/fast/css/forced-colors-mode/forced-colors-mode-13.html [ Crash ]
# Expected failures for dark mode tests when the corresponding flags # Expected failures for dark mode tests when the corresponding flags
# are not enabled. # are not enabled.
crbug.com/1090660 external/wpt/css/css-color-adjust/rendering/dark-color-scheme/svg-as-image.html [ Skip ] crbug.com/1090660 external/wpt/css/css-color-adjust/rendering/dark-color-scheme/svg-as-image.html [ Skip ]
......
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