style: Support shape-image: <image>

MozReview-Commit-ID: GSCZIMEpCS2
This commit is contained in:
Ting-Yu Lin 2017-11-17 17:59:11 +08:00 committed by Ting-Yu Lin
parent 077d74795a
commit 923ffcf2cc
5 changed files with 82 additions and 27 deletions

View file

@ -27,7 +27,7 @@ pub enum GeometryBox {
}
/// A float area shape, for `shape-outside`.
pub type FloatAreaShape<BasicShape, Url> = ShapeSource<BasicShape, ShapeBox, Url>;
pub type FloatAreaShape<BasicShape, Image> = ShapeSource<BasicShape, ShapeBox, Image>;
// https://drafts.csswg.org/css-shapes-1/#typedef-shape-box
define_css_keyword_enum!(ShapeBox:
@ -41,9 +41,9 @@ add_impls_for_keyword_enum!(ShapeBox);
/// A shape source, for some reference box.
#[allow(missing_docs)]
#[derive(Animate, Clone, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
pub enum ShapeSource<BasicShape, ReferenceBox, Url> {
pub enum ShapeSource<BasicShape, ReferenceBox, ImageOrUrl> {
#[animation(error)]
Url(Url),
ImageOrUrl(ImageOrUrl),
Shape(
BasicShape,
#[animation(constant)]