mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
Backed out changeset 67769dac78c4 for busting builds CLOSED TREE
Backs out https://github.com/servo/servo/pull/18519
This commit is contained in:
parent
a3b85cbd6c
commit
558e357216
8 changed files with 56 additions and 110 deletions
|
@ -289,7 +289,19 @@ impl ToComputedValue for Color {
|
|||
}
|
||||
#[cfg(feature = "gecko")]
|
||||
Color::InheritFromBodyQuirk => {
|
||||
ComputedColor::rgba(context.device().body_text_color())
|
||||
use dom::TElement;
|
||||
use gecko::wrapper::GeckoElement;
|
||||
use gecko_bindings::bindings::Gecko_GetBody;
|
||||
let pres_context = context.device().pres_context();
|
||||
let body = unsafe { Gecko_GetBody(pres_context) }.map(GeckoElement);
|
||||
let data = body.as_ref().and_then(|wrap| wrap.borrow_data());
|
||||
if let Some(data) = data {
|
||||
ComputedColor::rgba(data.styles.primary()
|
||||
.get_color()
|
||||
.clone_color())
|
||||
} else {
|
||||
convert_nscolor_to_computedcolor(pres_context.mDefaultColor)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue