stylo: Support system colors

MozReview-Commit-ID: HUfTdcMRoEx
This commit is contained in:
Manish Goregaokar 2017-03-15 14:49:35 -07:00 committed by Manish Goregaokar
parent d309782461
commit 6b9a6806b8
7 changed files with 720 additions and 1 deletions

View file

@ -132,6 +132,7 @@ impl ToComputedValue for specified::Color {
let pres_context = unsafe { &*context.device.pres_context };
match *self {
specified::Color::RGBA(rgba) => rgba,
specified::Color::System(system) => to_rgba(system.to_computed_value(context)),
specified::Color::CurrentColor => context.inherited_style.get_color().clone_color(),
specified::Color::MozDefaultColor => to_rgba(pres_context.mDefaultColor),
specified::Color::MozDefaultBackgroundColor => to_rgba(pres_context.mBackgroundColor),