mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Auto merge of #5787 - Adenilson:colorWhite01, r=SimonSapin
<!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5787) <!-- Reviewable:end -->
This commit is contained in:
commit
f9a50c9be0
5 changed files with 7 additions and 7 deletions
|
@ -548,7 +548,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
||||||
epoch: Epoch(0),
|
epoch: Epoch(0),
|
||||||
id: LayerId::null(),
|
id: LayerId::null(),
|
||||||
rect: Rect::zero(),
|
rect: Rect::zero(),
|
||||||
background_color: color::transparent_black(),
|
background_color: color::transparent(),
|
||||||
scroll_policy: ScrollPolicy::Scrollable,
|
scroll_policy: ScrollPolicy::Scrollable,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ pub fn black() -> AzColor {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn transparent_black() -> AzColor {
|
pub fn transparent() -> AzColor {
|
||||||
AzColor { r: 0.0, g: 0.0, b: 0.0, a: 0.0 }
|
AzColor { r: 0.0, g: 0.0, b: 0.0, a: 0.0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@ impl<'a> PaintContext<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn clear(&self) {
|
pub fn clear(&self) {
|
||||||
let pattern = ColorPattern::new(color::transparent_black());
|
let pattern = ColorPattern::new(color::transparent());
|
||||||
let rect = Rect(Point2D(self.page_rect.origin.x as AzFloat,
|
let rect = Rect(Point2D(self.page_rect.origin.x as AzFloat,
|
||||||
self.page_rect.origin.y as AzFloat),
|
self.page_rect.origin.y as AzFloat),
|
||||||
Size2D(self.screen_rect.size.width as AzFloat,
|
Size2D(self.screen_rect.size.width as AzFloat,
|
||||||
|
|
|
@ -1318,7 +1318,7 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
|
||||||
ScrollPolicy::Scrollable
|
ScrollPolicy::Scrollable
|
||||||
};
|
};
|
||||||
|
|
||||||
let transparent = color::rgba(1.0, 1.0, 1.0, 0.0);
|
let transparent = color::transparent();
|
||||||
let stacking_context =
|
let stacking_context =
|
||||||
self.create_stacking_context(display_list,
|
self.create_stacking_context(display_list,
|
||||||
Some(Arc::new(PaintLayer::new(self.layer_id(0),
|
Some(Arc::new(PaintLayer::new(self.layer_id(0),
|
||||||
|
|
|
@ -1226,16 +1226,16 @@ impl FragmentBorderBoxIterator for CollectingFragmentBorderBoxIterator {
|
||||||
// transparent background color is handled correctly.
|
// transparent background color is handled correctly.
|
||||||
fn get_root_flow_background_color(flow: &mut Flow) -> AzColor {
|
fn get_root_flow_background_color(flow: &mut Flow) -> AzColor {
|
||||||
if !flow.is_block_like() {
|
if !flow.is_block_like() {
|
||||||
return color::transparent_black()
|
return color::transparent()
|
||||||
}
|
}
|
||||||
|
|
||||||
let block_flow = flow.as_block();
|
let block_flow = flow.as_block();
|
||||||
let kid = match block_flow.base.children.iter_mut().next() {
|
let kid = match block_flow.base.children.iter_mut().next() {
|
||||||
None => return color::transparent_black(),
|
None => return color::transparent(),
|
||||||
Some(kid) => kid,
|
Some(kid) => kid,
|
||||||
};
|
};
|
||||||
if !kid.is_block_like() {
|
if !kid.is_block_like() {
|
||||||
return color::transparent_black()
|
return color::transparent()
|
||||||
}
|
}
|
||||||
|
|
||||||
let kid_block_flow = kid.as_block();
|
let kid_block_flow = kid.as_block();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue