mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Do not use CVAS for specified::Attr
This commit is contained in:
parent
0254fd0635
commit
5e8ee277fc
3 changed files with 9 additions and 10 deletions
|
@ -5,7 +5,7 @@
|
|||
//! Various macro helpers.
|
||||
|
||||
macro_rules! trivial_to_computed_value {
|
||||
($name: ident) => {
|
||||
($name:ty) => {
|
||||
impl $crate::values::computed::ToComputedValue for $name {
|
||||
type ComputedValue = $name;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
//! Computed values.
|
||||
|
||||
use Atom;
|
||||
use {Atom, Namespace};
|
||||
use context::QuirksMode;
|
||||
use euclid::Size2D;
|
||||
use font_metrics::FontMetricsProvider;
|
||||
|
@ -332,13 +332,15 @@ impl<T> ToComputedValue for T
|
|||
}
|
||||
}
|
||||
|
||||
trivial_to_computed_value!(Atom);
|
||||
trivial_to_computed_value!(());
|
||||
trivial_to_computed_value!(bool);
|
||||
trivial_to_computed_value!(f32);
|
||||
trivial_to_computed_value!(i32);
|
||||
trivial_to_computed_value!(u8);
|
||||
trivial_to_computed_value!(u16);
|
||||
trivial_to_computed_value!(bool);
|
||||
trivial_to_computed_value!(i32);
|
||||
trivial_to_computed_value!(f32);
|
||||
trivial_to_computed_value!(Atom);
|
||||
trivial_to_computed_value!(BorderStyle);
|
||||
trivial_to_computed_value!(Namespace);
|
||||
trivial_to_computed_value!(String);
|
||||
|
||||
/// A `<number>` value.
|
||||
|
|
|
@ -21,7 +21,6 @@ use super::computed::{Context, ToComputedValue};
|
|||
use super::generics::{GreaterThanOrEqualToOne, NonNegative};
|
||||
use super::generics::grid::{GridLine as GenericGridLine, TrackBreadth as GenericTrackBreadth};
|
||||
use super::generics::grid::{TrackSize as GenericTrackSize, TrackList as GenericTrackList};
|
||||
use values::computed::ComputedValueAsSpecified;
|
||||
use values::specified::calc::CalcNode;
|
||||
|
||||
pub use properties::animated_properties::TransitionProperty;
|
||||
|
@ -681,8 +680,8 @@ pub type NamespaceId = ();
|
|||
/// An attr(...) rule
|
||||
///
|
||||
/// `[namespace? `|`]? ident`
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, ToComputedValue)]
|
||||
pub struct Attr {
|
||||
/// Optional namespace
|
||||
pub namespace: Option<(Namespace, NamespaceId)>,
|
||||
|
@ -777,5 +776,3 @@ impl ToCss for Attr {
|
|||
dest.write_str(")")
|
||||
}
|
||||
}
|
||||
|
||||
impl ComputedValueAsSpecified for Attr {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue