mirror of
https://github.com/servo/servo.git
synced 2025-09-11 07:28:19 +01:00
stylo: Support quirksmode text-decoration color override
This commit is contained in:
parent
f27cd541b3
commit
ade09844b7
3 changed files with 24 additions and 4 deletions
|
@ -1062,8 +1062,8 @@ pub extern "C" fn Servo_DeclarationBlock_SetPixelValue(declarations:
|
|||
value: f32) {
|
||||
use style::properties::{DeclaredValue, PropertyDeclaration, LonghandId};
|
||||
use style::properties::longhands::border_spacing::SpecifiedValue as BorderSpacing;
|
||||
use style::values::specified::length::NoCalcLength;
|
||||
use style::values::specified::BorderWidth;
|
||||
use style::values::specified::length::NoCalcLength;
|
||||
|
||||
let declarations = RwLock::<PropertyDeclarationBlock>::as_arc(&declarations);
|
||||
let long = get_longhand_from_id!(property);
|
||||
|
@ -1206,9 +1206,16 @@ pub extern "C" fn Servo_DeclarationBlock_SetFontFamily(declarations:
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_DeclarationBlock_SetTextDecorationColorOverride(_:
|
||||
RawServoDeclarationBlockBorrowed) {
|
||||
error!("stylo: Don't know how to handle quirks-mode text-decoration color overrides");
|
||||
pub extern "C" fn Servo_DeclarationBlock_SetTextDecorationColorOverride(declarations:
|
||||
RawServoDeclarationBlockBorrowed) {
|
||||
use style::properties::{DeclaredValue, PropertyDeclaration};
|
||||
use style::properties::longhands::text_decoration_line;
|
||||
|
||||
let declarations = RwLock::<PropertyDeclarationBlock>::as_arc(&declarations);
|
||||
let mut decoration = text_decoration_line::computed_value::none;
|
||||
decoration |= text_decoration_line::COLOR_OVERRIDE;
|
||||
let decl = PropertyDeclaration::TextDecorationLine(DeclaredValue::Value(decoration));
|
||||
declarations.write().declarations.push((decl, Default::default()));
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue