Add support for non-standard -moz color keyword values.

Closes #15928
This commit is contained in:
Matt Brubeck 2017-03-08 10:17:44 -08:00 committed by Emilio Cobos Álvarez
parent 35028f8f60
commit 16e318d055
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
20 changed files with 188 additions and 58 deletions

View file

@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use app_units::Au;
use cssparser::Parser;
use euclid::size::Size2D;
use euclid::size::TypedSize2D;
use media_queries::CSSErrorReporterTest;
use std::f32::consts::PI;
use style::media_queries::{Device, MediaType};
use style::parser::ParserContext;
use style::properties::ComputedValues;
use style::stylesheets::Origin;
@ -43,11 +43,12 @@ fn test_linear_gradient() {
// AngleOrCorner::None should become AngleOrCorner::Angle(Angle(PI)) when parsed
// Note that Angle(PI) is correct for top-to-bottom rendering, whereas Angle(0) would render bottom-to-top.
// ref: https://developer.mozilla.org/en-US/docs/Web/CSS/angle
let container = Size2D::new(Au::default(), Au::default());
let viewport_size = TypedSize2D::new(0., 0.);
let initial_style = ComputedValues::initial_values();
let device = Device::new(MediaType::Screen, viewport_size);
let specified_context = Context {
is_root_element: true,
viewport_size: container,
device: &device,
inherited_style: initial_style,
layout_parent_style: initial_style,
style: initial_style.clone(),