mirror of
https://github.com/servo/servo.git
synced 2025-08-14 18:05:36 +01:00
style: Let overflow parse two values.
Per https://github.com/w3c/csswg-drafts/issues/2484. Bug: 1453148 Reviewed-by: xidorn MozReview-Commit-ID: D7M3PhnTtD2
This commit is contained in:
parent
ec6f71e8fa
commit
061c87ad00
3 changed files with 15 additions and 45 deletions
|
@ -75,39 +75,6 @@ mod shorthand_serialization {
|
|||
block.to_css_string()
|
||||
}
|
||||
|
||||
// Add Test to show error if a longhand property is missing!!!!!!
|
||||
|
||||
mod overflow {
|
||||
pub use super::*;
|
||||
use style::properties::longhands::overflow_x::SpecifiedValue as OverflowValue;
|
||||
|
||||
#[test]
|
||||
fn equal_overflow_properties_should_serialize_to_single_value() {
|
||||
let mut properties = Vec::new();
|
||||
|
||||
let overflow = OverflowValue::Auto;
|
||||
properties.push(PropertyDeclaration::OverflowX(overflow));
|
||||
properties.push(PropertyDeclaration::OverflowY(overflow));
|
||||
|
||||
let serialization = shorthand_properties_to_string(properties);
|
||||
assert_eq!(serialization, "overflow: auto;");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn different_overflow_properties_should_serialize_to_two_values() {
|
||||
let mut properties = Vec::new();
|
||||
|
||||
let overflow_x = OverflowValue::Scroll;
|
||||
properties.push(PropertyDeclaration::OverflowX(overflow_x));
|
||||
|
||||
let overflow_y = OverflowValue::Auto;
|
||||
properties.push(PropertyDeclaration::OverflowY(overflow_y));
|
||||
|
||||
let serialization = shorthand_properties_to_string(properties);
|
||||
assert_eq!(serialization, "overflow-x: scroll; overflow-y: auto;");
|
||||
}
|
||||
}
|
||||
|
||||
mod four_sides_shorthands {
|
||||
pub use super::*;
|
||||
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
[border is expected to be border: dotted;]
|
||||
expected: FAIL
|
||||
|
||||
[overflow is expected to be overflow: scroll hidden;]
|
||||
expected: FAIL
|
||||
|
||||
[outline is expected to be outline: blue dotted 2px;]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue