mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Unbox a bunch of color properties.
This builds on https://github.com/servo/rust-cssparser/pull/118.
This commit is contained in:
parent
e394334739
commit
0c102e2350
37 changed files with 185 additions and 195 deletions
|
@ -12,7 +12,7 @@ path = "lib.rs"
|
|||
[dependencies]
|
||||
azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
|
||||
canvas_traits = {path = "../canvas_traits"}
|
||||
cssparser = {version = "0.7", features = ["heap_size", "serde-serialization"]}
|
||||
cssparser = {version = "0.8", features = ["heap_size", "serde-serialization"]}
|
||||
euclid = "0.10.1"
|
||||
gleam = "0.2.8"
|
||||
ipc-channel = "0.5"
|
||||
|
|
|
@ -1016,9 +1016,9 @@ impl ToAzureStyle for RGBA {
|
|||
type Target = Color;
|
||||
|
||||
fn to_azure_style(self) -> Color {
|
||||
Color::rgba(self.red as AzFloat,
|
||||
self.green as AzFloat,
|
||||
self.blue as AzFloat,
|
||||
self.alpha as AzFloat)
|
||||
Color::rgba(self.red_f32() as AzFloat,
|
||||
self.green_f32() as AzFloat,
|
||||
self.blue_f32() as AzFloat,
|
||||
self.alpha_f32() as AzFloat)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue