aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdenilson Cavalcanti <cavalcantii@gmail.com>2015-04-21 17:13:15 -0700
committerAdenilson Cavalcanti <cavalcantii@gmail.com>2015-04-21 19:10:07 -0700
commit95bcc5747c9fa849b2cb6e4205adc0f684176505 (patch)
tree4999f61b501cbc6908e28ec6e33126958f4eff83
parent23945f2ea865710751e9c822b367598eddd86e1f (diff)
downloadservo-95bcc5747c9fa849b2cb6e4205adc0f684176505.tar.gz
servo-95bcc5747c9fa849b2cb6e4205adc0f684176505.zip
Adding transparent white.
Using helper color function (less verbose and clear to understand).
-rw-r--r--components/gfx/color.rs5
-rw-r--r--components/layout/display_list_builder.rs2
2 files changed, 6 insertions, 1 deletions
diff --git a/components/gfx/color.rs b/components/gfx/color.rs
index a91c6818ee6..f6fb0a7de3d 100644
--- a/components/gfx/color.rs
+++ b/components/gfx/color.rs
@@ -39,3 +39,8 @@ pub fn transparent_black() -> AzColor {
pub fn white() -> AzColor {
AzColor { r: 1.0, g: 1.0, b: 1.0, a: 1.0 }
}
+
+#[inline]
+pub fn transparent_white() -> AzColor {
+ AzColor { r: 1.0, g: 1.0, b: 1.0, a: 0.0 }
+}
diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs
index e92d0411216..7fcacac7713 100644
--- a/components/layout/display_list_builder.rs
+++ b/components/layout/display_list_builder.rs
@@ -1318,7 +1318,7 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
ScrollPolicy::Scrollable
};
- let transparent = color::rgba(1.0, 1.0, 1.0, 0.0);
+ let transparent = color::transparent_white();
let stacking_context =
self.create_stacking_context(display_list,
Some(Arc::new(PaintLayer::new(self.layer_id(0),