mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Support shape-image: <image>
MozReview-Commit-ID: GSCZIMEpCS2
This commit is contained in:
parent
077d74795a
commit
923ffcf2cc
5 changed files with 82 additions and 27 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue