mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Really honor background-color: transparent in HCM even for form controls
I forgot we were doing this "revert-or-initial" shenanigans (which is needed for stuff like link colors to be honored), so we need to early-return. Use a more explicit test rather than a reftest for this. Differential Revision: https://phabricator.services.mozilla.com/D142063
This commit is contained in:
parent
1a83c738f3
commit
a9fe204f39
1 changed files with 9 additions and 6 deletions
|
@ -428,14 +428,17 @@ fn tweak_when_ignoring_colors(
|
|||
// otherwise, this is needed to preserve semi-transparent
|
||||
// backgrounds.
|
||||
//
|
||||
// NOTE(emilio): We revert even for alpha == 0. Not doing so would
|
||||
// be a bit special casey, even though it causes issues like
|
||||
// bug 1625036. The reasoning is that the conditions that trigger
|
||||
// that (having mismatched widget and default backgrounds) are both
|
||||
// uncommon, and broken in other applications as well, and not
|
||||
// honoring transparent makes stuff uglier or break unconditionally
|
||||
// NOTE(emilio): We honor transparent unconditionally, like we do
|
||||
// for color, even though it causes issues like bug 1625036. The
|
||||
// reasoning is that the conditions that trigger that (having
|
||||
// mismatched widget and default backgrounds) are both uncommon, and
|
||||
// broken in other applications as well, and not honoring
|
||||
// transparent makes stuff uglier or break unconditionally
|
||||
// (bug 1666059, bug 1755713).
|
||||
let alpha = alpha_channel(color, context);
|
||||
if alpha == 0 {
|
||||
return;
|
||||
}
|
||||
let mut color = context.builder.device.default_background_color();
|
||||
color.alpha = alpha;
|
||||
declarations_to_apply_unless_overriden
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue