Further changes required by Servo

This commit is contained in:
Oriol Brufau 2023-11-02 22:34:38 +01:00 committed by Martin Robinson
parent 4559546fbb
commit bb55e923bb
15 changed files with 76 additions and 38 deletions

View file

@ -553,7 +553,7 @@ impl<'a> BuilderForBoxFragment<'a> {
let style = &self.fragment.style;
let b = style.get_background();
let background_color = style.resolve_color(b.background_color.clone());
if background_color.alpha > 0 {
if background_color.alpha > 0.0 {
// https://drafts.csswg.org/css-backgrounds/#background-color
// “The background color is clipped according to the background-clip
// value associated with the bottom-most background image layer.”

View file

@ -505,7 +505,7 @@ impl StackingContext {
.to_webrender();
let background_color = style.resolve_color(style.get_background().background_color.clone());
if background_color.alpha > 0 {
if background_color.alpha > 0.0 {
let common = builder.common_properties(painting_area, &style);
let color = super::rgba(background_color);
builder

View file

@ -472,7 +472,7 @@ impl ComputedValuesExt for ComputedValues {
fn background_is_transparent(&self) -> bool {
let background = self.get_background();
let color = self.resolve_color(background.background_color.clone());
color.alpha == 0 &&
color.alpha == 0.0 &&
background
.background_image
.0