Auto merge of #14893 - Manishearth:alias, r=emilio

Support property aliases

Aliases now get forwarded to their "original" property name at parse time. CSSOM continues to provide access through alias getters.

We'll need to probably add `${"-webkit-foo -moz-foo" if gecko else ""}` all over the place. Might want to come up with a convenient attibute name for that (`gecko_prefix="mw"`) or something.

r? @heycam or @bholley

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14893)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-01-07 13:56:19 -08:00 committed by GitHub
commit d14158a592
6 changed files with 37 additions and 56 deletions

View file

@ -457,24 +457,6 @@ mod shorthand_serialization {
}
}
#[test]
fn overflow_wrap_should_only_serialize_with_a_single_property() {
use style::properties::longhands::overflow_wrap::computed_value::T as OverflowWrap;
let value = DeclaredValue::Value(OverflowWrap::break_word);
let properties = vec![
PropertyDeclaration::OverflowWrap(value)
];
let serialization = shorthand_properties_to_string(properties);
// word-wrap is considered an outdated alternative to overflow-wrap, but it is currently
// what servo is using in its naming conventions:
// https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap
assert_eq!(serialization, "word-wrap: break-word;");
}
mod outline {
use style::properties::longhands::outline_width::SpecifiedValue as WidthContainer;
use super::*;