mirror of
https://github.com/servo/servo.git
synced 2025-06-24 09:04:33 +01:00
Revert early resolving of currentColor.
This commit is contained in:
parent
e2ec549da5
commit
bdca6d9fc4
1 changed files with 2 additions and 12 deletions
|
@ -122,6 +122,8 @@ pub mod specified {
|
||||||
|
|
||||||
pub mod computed {
|
pub mod computed {
|
||||||
use cssparser;
|
use cssparser;
|
||||||
|
pub use CSSColor = cssparser::Color;
|
||||||
|
pub use compute_CSSColor = std::util::id;
|
||||||
use super::*;
|
use super::*;
|
||||||
use super::super::longhands::font_weight;
|
use super::super::longhands::font_weight;
|
||||||
pub struct Context {
|
pub struct Context {
|
||||||
|
@ -177,16 +179,4 @@ pub mod computed {
|
||||||
specified::LPA_Auto => LPA_Auto,
|
specified::LPA_Auto => LPA_Auto,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct CSSColor {
|
|
||||||
rgba: cssparser::RGBA,
|
|
||||||
is_current_color: bool, // For inheritance
|
|
||||||
}
|
|
||||||
pub fn compute_CSSColor(color: specified::CSSColor, context: &Context) -> CSSColor {
|
|
||||||
match color {
|
|
||||||
cssparser::RGBA(rgba) => CSSColor { rgba: rgba, is_current_color: false },
|
|
||||||
cssparser::CurrentColor => CSSColor { rgba: context.current_color,
|
|
||||||
is_current_color: true },
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue