mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Further changes required by Servo
This commit is contained in:
parent
4559546fbb
commit
bb55e923bb
15 changed files with 76 additions and 38 deletions
|
@ -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.”
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue