mirror of
https://github.com/servo/servo.git
synced 2025-09-10 06:58:21 +01:00
Resolve color:currentcolor during computing
The keyword value "currentcolor" should be preserved rather than being replaced by the CSS-wide keyword "inherit" during parsing.
This commit is contained in:
parent
eb8d0c3df8
commit
b24614f894
3 changed files with 39 additions and 28 deletions
|
@ -1102,7 +1102,8 @@ pub extern "C" fn Servo_DeclarationBlock_SetColorValue(declarations:
|
|||
use cssparser::Color;
|
||||
use style::gecko::values::convert_nscolor_to_rgba;
|
||||
use style::properties::{DeclaredValue, PropertyDeclaration, LonghandId};
|
||||
use style::values::specified::{CSSColor, CSSRGBA};
|
||||
use style::properties::longhands;
|
||||
use style::values::specified::CSSColor;
|
||||
|
||||
let declarations = RwLock::<PropertyDeclarationBlock>::as_arc(&declarations);
|
||||
let long = get_longhand_from_id!(property);
|
||||
|
@ -1114,7 +1115,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetColorValue(declarations:
|
|||
BorderRightColor => color,
|
||||
BorderBottomColor => color,
|
||||
BorderLeftColor => color,
|
||||
Color => CSSRGBA { parsed: rgba, authored: None },
|
||||
Color => longhands::color::SpecifiedValue(color),
|
||||
BackgroundColor => color,
|
||||
};
|
||||
declarations.write().declarations.push((prop, Default::default()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue