mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Change nscolor to StyleComplexColor.
Bug: 1467622 Reviewed-by: xidorn MozReview-Commit-ID: 1bbQzOoOuBe
This commit is contained in:
parent
6f9b47be25
commit
a76f5393d4
4 changed files with 15 additions and 13 deletions
|
@ -9,6 +9,7 @@ use values::RGBA;
|
|||
use values::computed::{LengthOrPercentage, NonNegativeLength};
|
||||
use values::computed::{NonNegativeLengthOrPercentage, NonNegativeNumber, Number};
|
||||
use values::computed::Opacity;
|
||||
use values::computed::color::Color;
|
||||
use values::computed::url::ComputedUrl;
|
||||
use values::generics::svg as generic;
|
||||
|
||||
|
@ -17,9 +18,9 @@ pub use values::specified::SVGPaintOrder;
|
|||
pub use values::specified::MozContextProperties;
|
||||
|
||||
/// Computed SVG Paint value
|
||||
pub type SVGPaint = generic::SVGPaint<RGBA, ComputedUrl>;
|
||||
pub type SVGPaint = generic::SVGPaint<Color, ComputedUrl>;
|
||||
/// Computed SVG Paint Kind value
|
||||
pub type SVGPaintKind = generic::SVGPaintKind<RGBA, ComputedUrl>;
|
||||
pub type SVGPaintKind = generic::SVGPaintKind<Color, ComputedUrl>;
|
||||
|
||||
impl Default for SVGPaint {
|
||||
fn default() -> Self {
|
||||
|
@ -33,7 +34,7 @@ impl Default for SVGPaint {
|
|||
impl SVGPaint {
|
||||
/// Opaque black color
|
||||
pub fn black() -> Self {
|
||||
let rgba = RGBA::from_floats(0., 0., 0., 1.);
|
||||
let rgba = RGBA::from_floats(0., 0., 0., 1.).into();
|
||||
SVGPaint {
|
||||
kind: generic::SVGPaintKind::Color(rgba),
|
||||
fallback: None,
|
||||
|
|
|
@ -13,14 +13,14 @@ use values::CustomIdent;
|
|||
use values::generics::svg as generic;
|
||||
use values::specified::{LengthOrPercentage, NonNegativeLengthOrPercentage, NonNegativeNumber};
|
||||
use values::specified::{Number, Opacity};
|
||||
use values::specified::color::RGBAColor;
|
||||
use values::specified::color::Color;
|
||||
use values::specified::url::SpecifiedUrl;
|
||||
|
||||
/// Specified SVG Paint value
|
||||
pub type SVGPaint = generic::SVGPaint<RGBAColor, SpecifiedUrl>;
|
||||
pub type SVGPaint = generic::SVGPaint<Color, SpecifiedUrl>;
|
||||
|
||||
/// Specified SVG Paint Kind value
|
||||
pub type SVGPaintKind = generic::SVGPaintKind<RGBAColor, SpecifiedUrl>;
|
||||
pub type SVGPaintKind = generic::SVGPaintKind<Color, SpecifiedUrl>;
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
fn is_context_value_enabled() -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue