Backed out changeset 67769dac78c4 for busting builds CLOSED TREE

Backs out https://github.com/servo/servo/pull/18519
This commit is contained in:
Gecko Backout 2017-09-15 20:47:46 +00:00 committed by moz-servo-sync
parent a3b85cbd6c
commit 558e357216
8 changed files with 56 additions and 110 deletions

View file

@ -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)
}
},
}
}