Commit ca7f8bfa authored by Anders Hartvoll Ruud's avatar Anders Hartvoll Ruud Committed by Commit Bot

[cascade] Correct order for -webkit-mask-image/composite

It's a bit weird, and possibly a bug, but -webkit-mask-composite has no
effect unless a -webkit-mask-image has already been applied. We have one
test that relies on this (referenced), so to make that test happy, always
apply -webkit-mask-image first.

TEST=fast/backgrounds/mask-composite.html
BUG=947004

Change-Id: I7221c9cee568047b393b24af9c28ce13a1db388c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1967183
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Reviewed-by: default avatarRune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#725667}
parent 8433fbbc
......@@ -137,6 +137,10 @@ void StyleCascade::Apply(Animator& animator) {
// border-image-* longhands that have already been applied.
Apply(GetCSSPropertyWebkitBorderImage(), resolver);
// -webkit-mask-image needs to be applied before -webkit-mask-composite,
// otherwise -webkit-mask-composite has no effect.
Apply(GetCSSPropertyWebkitMaskImage(), resolver);
// TODO(crbug.com/985031): Set bits ::Add-time to know if we need to do this.
ApplyHighPriority(resolver);
......
......@@ -574,7 +574,8 @@
"fast/borders/border-image-repeat-round.html",
"fast/borders/border-image-repeat.html",
"fast/borders/border-image-slices.html",
"fast/borders/border-image-source.html"],
"fast/borders/border-image-source.html",
"fast/backgrounds/mask-composite.html"],
"args": ["--enable-blink-features=CSSCascade"]
},
{
......
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