mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
Auto merge of #16707 - CJKu:bug-1359787, r=manish
Stylo: Implement {specified|computed}::LayerImage. <!-- Please describe your changes on the following line: --> Bug 1359787 - Stylo: Unite the implementation of background-image/ mask-image and border-image-source in {background|svg|border}.mako.rs --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/16707) <!-- Reviewable:end -->
This commit is contained in:
commit
896a920ff5
10 changed files with 100 additions and 267 deletions
|
@ -921,13 +921,13 @@ fn static_assert() {
|
||||||
need_clone=True) %>
|
need_clone=True) %>
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
pub fn set_border_image_source(&mut self, v: longhands::border_image_source::computed_value::T) {
|
pub fn set_border_image_source(&mut self, image: longhands::border_image_source::computed_value::T) {
|
||||||
unsafe {
|
unsafe {
|
||||||
// Prevent leaking of the last elements we did set
|
// Prevent leaking of the last elements we did set
|
||||||
Gecko_SetNullImageValue(&mut self.gecko.mBorderImageSource);
|
Gecko_SetNullImageValue(&mut self.gecko.mBorderImageSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(image) = v.0 {
|
if let Some(image) = image.0 {
|
||||||
self.gecko.mBorderImageSource.set(image, &mut false)
|
self.gecko.mBorderImageSource.set(image, &mut false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2791,18 +2791,9 @@ fn static_assert() {
|
||||||
|
|
||||||
for (image, geckoimage) in images.0.into_iter().zip(self.gecko.${image_layers_field}
|
for (image, geckoimage) in images.0.into_iter().zip(self.gecko.${image_layers_field}
|
||||||
.mLayers.iter_mut()) {
|
.mLayers.iter_mut()) {
|
||||||
% if shorthand == "background":
|
|
||||||
if let Some(image) = image.0 {
|
if let Some(image) = image.0 {
|
||||||
geckoimage.mImage.set(image, cacheable)
|
geckoimage.mImage.set(image, cacheable)
|
||||||
}
|
}
|
||||||
% else:
|
|
||||||
use properties::longhands::mask_image::single_value::computed_value::T;
|
|
||||||
match image {
|
|
||||||
T::Image(image) => geckoimage.mImage.set(image, cacheable),
|
|
||||||
_ => ()
|
|
||||||
}
|
|
||||||
% endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -309,7 +309,7 @@
|
||||||
computed,
|
computed,
|
||||||
inherited_style.get_font());
|
inherited_style.get_font());
|
||||||
% else:
|
% else:
|
||||||
% if property.has_uncacheable_values:
|
% if property.has_uncacheable_values == "True":
|
||||||
context.mutate_style().mutate_${data.current_style_struct.name_lower}()
|
context.mutate_style().mutate_${data.current_style_struct.name_lower}()
|
||||||
.set_${property.ident}(computed, cacheable ${maybe_wm});
|
.set_${property.ident}(computed, cacheable ${maybe_wm});
|
||||||
% else:
|
% else:
|
||||||
|
|
|
@ -12,82 +12,13 @@ ${helpers.predefined_type("background-color", "CSSColor",
|
||||||
spec="https://drafts.csswg.org/css-backgrounds/#background-color",
|
spec="https://drafts.csswg.org/css-backgrounds/#background-color",
|
||||||
animation_value_type="IntermediateColor", complex_color=True)}
|
animation_value_type="IntermediateColor", complex_color=True)}
|
||||||
|
|
||||||
<%helpers:vector_longhand name="background-image" animation_value_type="none"
|
${helpers.predefined_type("background-image", "LayerImage",
|
||||||
spec="https://drafts.csswg.org/css-backgrounds/#the-background-image"
|
initial_value="computed_value::T(None)",
|
||||||
has_uncacheable_values="${product == 'gecko'}">
|
initial_specified_value="SpecifiedValue(None)",
|
||||||
use std::fmt;
|
spec="https://drafts.csswg.org/css-backgrounds/#the-background-image",
|
||||||
use style_traits::ToCss;
|
vector="True",
|
||||||
use values::HasViewportPercentage;
|
animation_value_type="none",
|
||||||
use values::specified::Image;
|
has_uncacheable_values="True" if product == "gecko" else "False")}
|
||||||
|
|
||||||
pub mod computed_value {
|
|
||||||
use values::computed;
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
|
||||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
|
||||||
pub struct T(pub Option<computed::Image>);
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ToCss for computed_value::T {
|
|
||||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
|
||||||
match self.0 {
|
|
||||||
None => dest.write_str("none"),
|
|
||||||
Some(ref image) => image.to_css(dest),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
no_viewport_percentage!(SpecifiedValue);
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
|
||||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
|
||||||
pub struct SpecifiedValue(pub Option<Image>);
|
|
||||||
|
|
||||||
impl ToCss for SpecifiedValue {
|
|
||||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
|
||||||
match *self {
|
|
||||||
SpecifiedValue(Some(ref image)) => image.to_css(dest),
|
|
||||||
SpecifiedValue(None) => dest.write_str("none"),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
|
||||||
pub fn get_initial_value() -> computed_value::T {
|
|
||||||
computed_value::T(None)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn get_initial_specified_value() -> SpecifiedValue {
|
|
||||||
SpecifiedValue(None)
|
|
||||||
}
|
|
||||||
pub fn parse(context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue, ()> {
|
|
||||||
if input.try(|input| input.expect_ident_matching("none")).is_ok() {
|
|
||||||
Ok(SpecifiedValue(None))
|
|
||||||
} else {
|
|
||||||
Ok(SpecifiedValue(Some(try!(Image::parse(context, input)))))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl ToComputedValue for SpecifiedValue {
|
|
||||||
type ComputedValue = computed_value::T;
|
|
||||||
|
|
||||||
#[inline]
|
|
||||||
fn to_computed_value(&self, context: &Context) -> computed_value::T {
|
|
||||||
match *self {
|
|
||||||
SpecifiedValue(None) => computed_value::T(None),
|
|
||||||
SpecifiedValue(Some(ref image)) =>
|
|
||||||
computed_value::T(Some(image.to_computed_value(context))),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
|
||||||
fn from_computed_value(computed: &computed_value::T) -> Self {
|
|
||||||
match *computed {
|
|
||||||
computed_value::T(None) => SpecifiedValue(None),
|
|
||||||
computed_value::T(Some(ref image)) =>
|
|
||||||
SpecifiedValue(Some(ToComputedValue::from_computed_value(image))),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</%helpers:vector_longhand>
|
|
||||||
|
|
||||||
<%helpers:predefined_type name="background-position-x" type="position::HorizontalPosition"
|
<%helpers:predefined_type name="background-position-x" type="position::HorizontalPosition"
|
||||||
initial_value="computed::position::HorizontalPosition::zero()"
|
initial_value="computed::position::HorizontalPosition::zero()"
|
||||||
|
|
|
@ -190,81 +190,14 @@ ${helpers.single_keyword("-moz-float-edge", "content-box margin-box",
|
||||||
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-float-edge)",
|
spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-float-edge)",
|
||||||
animation_value_type="none")}
|
animation_value_type="none")}
|
||||||
|
|
||||||
<%helpers:longhand name="border-image-source" animation_value_type="none" boxed="True"
|
${helpers.predefined_type("border-image-source", "LayerImage",
|
||||||
spec="https://drafts.csswg.org/css-backgrounds/#border-image-source">
|
initial_value="computed_value::T(None)",
|
||||||
use std::fmt;
|
initial_specified_value="SpecifiedValue(None)",
|
||||||
use style_traits::ToCss;
|
spec="https://drafts.csswg.org/css-backgrounds/#the-background-image",
|
||||||
use values::HasViewportPercentage;
|
vector=False,
|
||||||
use values::specified::Image;
|
animation_value_type="none",
|
||||||
|
has_uncacheable_values=False,
|
||||||
no_viewport_percentage!(SpecifiedValue);
|
boxed="True")}
|
||||||
|
|
||||||
pub mod computed_value {
|
|
||||||
use values::computed;
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
|
||||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
|
||||||
pub struct T(pub Option<computed::Image>);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
|
||||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
|
||||||
pub struct SpecifiedValue(pub Option<Image>);
|
|
||||||
|
|
||||||
impl ToCss for computed_value::T {
|
|
||||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
|
||||||
match self.0 {
|
|
||||||
Some(ref image) => image.to_css(dest),
|
|
||||||
None => dest.write_str("none"),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl ToCss for SpecifiedValue {
|
|
||||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
|
||||||
match self.0 {
|
|
||||||
Some(ref image) => image.to_css(dest),
|
|
||||||
None => dest.write_str("none"),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
|
||||||
pub fn get_initial_value() -> computed_value::T {
|
|
||||||
computed_value::T(None)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
|
||||||
pub fn get_initial_specified_value() -> SpecifiedValue {
|
|
||||||
SpecifiedValue(None)
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ToComputedValue for SpecifiedValue {
|
|
||||||
type ComputedValue = computed_value::T;
|
|
||||||
|
|
||||||
#[inline]
|
|
||||||
fn to_computed_value(&self, context: &Context) -> computed_value::T {
|
|
||||||
match self.0 {
|
|
||||||
Some(ref image) => computed_value::T(Some(image.to_computed_value(context))),
|
|
||||||
None => computed_value::T(None),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
fn from_computed_value(computed: &computed_value::T) -> Self {
|
|
||||||
match computed.0 {
|
|
||||||
Some(ref image) =>
|
|
||||||
SpecifiedValue(Some(ToComputedValue::from_computed_value(image))),
|
|
||||||
None => SpecifiedValue(None),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse(context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue, ()> {
|
|
||||||
if input.try(|input| input.expect_ident_matching("none")).is_ok() {
|
|
||||||
return Ok(SpecifiedValue(None));
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(SpecifiedValue(Some(try!(Image::parse(context, input)))))
|
|
||||||
}
|
|
||||||
</%helpers:longhand>
|
|
||||||
|
|
||||||
<%helpers:longhand name="border-image-outset" animation_value_type="none"
|
<%helpers:longhand name="border-image-outset" animation_value_type="none"
|
||||||
spec="https://drafts.csswg.org/css-backgrounds/#border-image-outset">
|
spec="https://drafts.csswg.org/css-backgrounds/#border-image-outset">
|
||||||
|
|
|
@ -190,98 +190,13 @@ ${helpers.single_keyword("mask-composite",
|
||||||
extra_prefixes="webkit",
|
extra_prefixes="webkit",
|
||||||
animation_value_type="none",
|
animation_value_type="none",
|
||||||
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-composite")}
|
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-composite")}
|
||||||
|
${helpers.predefined_type("mask-image", "LayerImage",
|
||||||
<%helpers:vector_longhand name="mask-image" products="gecko" animation_value_type="none" extra_prefixes="webkit"
|
initial_value="computed_value::T(None)",
|
||||||
has_uncacheable_values="${product == 'gecko'}"
|
initial_specified_value="SpecifiedValue(None)",
|
||||||
|
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-image",
|
||||||
|
vector=True,
|
||||||
|
products="gecko",
|
||||||
|
extra_prefixes="webkit",
|
||||||
|
animation_value_type="none",
|
||||||
flags="CREATES_STACKING_CONTEXT",
|
flags="CREATES_STACKING_CONTEXT",
|
||||||
spec="https://drafts.fxtf.org/css-masking/#propdef-mask-image">
|
has_uncacheable_values="True" if product == "gecko" else "False")}
|
||||||
use std::fmt;
|
|
||||||
use style_traits::ToCss;
|
|
||||||
use stylearc::Arc;
|
|
||||||
use values::specified::Image;
|
|
||||||
use values::specified::url::SpecifiedUrl;
|
|
||||||
use values::HasViewportPercentage;
|
|
||||||
|
|
||||||
pub mod computed_value {
|
|
||||||
use std::fmt;
|
|
||||||
use style_traits::ToCss;
|
|
||||||
use values::computed;
|
|
||||||
use values::specified::url::SpecifiedUrl;
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
|
||||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
|
||||||
pub enum T {
|
|
||||||
Image(computed::Image),
|
|
||||||
None
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ToCss for T {
|
|
||||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
|
||||||
match *self {
|
|
||||||
T::None => dest.write_str("none"),
|
|
||||||
T::Image(ref image) => image.to_css(dest),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
no_viewport_percentage!(SpecifiedValue);
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
|
||||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
|
||||||
pub enum SpecifiedValue {
|
|
||||||
Image(Image),
|
|
||||||
None
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ToCss for SpecifiedValue {
|
|
||||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
|
||||||
match *self {
|
|
||||||
SpecifiedValue::Image(ref image) => image.to_css(dest),
|
|
||||||
SpecifiedValue::None => dest.write_str("none"),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
|
||||||
pub fn get_initial_value() -> computed_value::T {
|
|
||||||
computed_value::T::None
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn get_initial_specified_value() -> SpecifiedValue {
|
|
||||||
SpecifiedValue::None
|
|
||||||
}
|
|
||||||
pub fn parse(context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue, ()> {
|
|
||||||
if input.try(|input| input.expect_ident_matching("none")).is_ok() {
|
|
||||||
Ok(SpecifiedValue::None)
|
|
||||||
} else {
|
|
||||||
let image = try!(Image::parse(context, input));
|
|
||||||
match image {
|
|
||||||
Image::Url(url_value) => {
|
|
||||||
Ok(SpecifiedValue::Image(Image::Url(url_value)))
|
|
||||||
}
|
|
||||||
image => Ok(SpecifiedValue::Image(image))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl ToComputedValue for SpecifiedValue {
|
|
||||||
type ComputedValue = computed_value::T;
|
|
||||||
|
|
||||||
#[inline]
|
|
||||||
fn to_computed_value(&self, context: &Context) -> computed_value::T {
|
|
||||||
match *self {
|
|
||||||
SpecifiedValue::None => computed_value::T::None,
|
|
||||||
SpecifiedValue::Image(ref image) =>
|
|
||||||
computed_value::T::Image(image.to_computed_value(context)),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
|
||||||
fn from_computed_value(computed: &computed_value::T) -> Self {
|
|
||||||
match *computed {
|
|
||||||
computed_value::T::None => SpecifiedValue::None,
|
|
||||||
computed_value::T::Image(ref image) =>
|
|
||||||
SpecifiedValue::Image(ToComputedValue::from_computed_value(image)),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</%helpers:vector_longhand>
|
|
||||||
|
|
|
@ -677,3 +677,17 @@ impl AngleOrCorner {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Computed values for none | <image> | <mask-source>.
|
||||||
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
|
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||||
|
pub struct LayerImage(pub Option<Image>);
|
||||||
|
|
||||||
|
impl ToCss for LayerImage {
|
||||||
|
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||||
|
match self.0 {
|
||||||
|
None => dest.write_str("none"),
|
||||||
|
Some(ref image) => image.to_css(dest),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ use super::specified::grid::{TrackBreadth as GenericTrackBreadth, TrackSize as G
|
||||||
|
|
||||||
pub use app_units::Au;
|
pub use app_units::Au;
|
||||||
pub use cssparser::Color as CSSColor;
|
pub use cssparser::Color as CSSColor;
|
||||||
pub use self::image::{AngleOrCorner, EndingShape as GradientShape, Gradient, GradientItem};
|
pub use self::image::{AngleOrCorner, EndingShape as GradientShape, Gradient, GradientItem, LayerImage};
|
||||||
pub use self::image::{GradientKind, Image, ImageRect, LengthOrKeyword, LengthOrPercentageOrKeyword};
|
pub use self::image::{GradientKind, Image, ImageRect, LengthOrKeyword, LengthOrPercentageOrKeyword};
|
||||||
pub use super::{Auto, Either, None_};
|
pub use super::{Auto, Either, None_};
|
||||||
#[cfg(feature = "gecko")]
|
#[cfg(feature = "gecko")]
|
||||||
|
|
|
@ -666,3 +666,52 @@ impl SizeKeyword {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Specified values for none | <image> | <mask-source>.
|
||||||
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
|
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||||
|
pub struct LayerImage(pub Option<Image>);
|
||||||
|
use values::HasViewportPercentage;
|
||||||
|
no_viewport_percentage!(LayerImage);
|
||||||
|
|
||||||
|
impl ToCss for LayerImage {
|
||||||
|
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||||
|
match *self {
|
||||||
|
LayerImage(Some(ref image)) => image.to_css(dest),
|
||||||
|
LayerImage(None) => dest.write_str("none"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
use super::computed::{ToComputedValue, Context};
|
||||||
|
impl ToComputedValue for LayerImage {
|
||||||
|
type ComputedValue = super::computed::LayerImage;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn to_computed_value(&self, context: &Context) -> Self::ComputedValue {
|
||||||
|
match *self {
|
||||||
|
LayerImage(None) => super::computed::LayerImage(None),
|
||||||
|
LayerImage(Some(ref image)) =>
|
||||||
|
super::computed::LayerImage(Some(image.to_computed_value(context))),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn from_computed_value(computed: &Self::ComputedValue) -> Self {
|
||||||
|
match *computed {
|
||||||
|
super::computed::LayerImage(None) => LayerImage(None),
|
||||||
|
super::computed::LayerImage(Some(ref image)) =>
|
||||||
|
LayerImage(Some(ToComputedValue::from_computed_value(image))),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Parse for LayerImage {
|
||||||
|
fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
|
||||||
|
if input.try(|input| input.expect_ident_matching("none")).is_ok() {
|
||||||
|
Ok(LayerImage(None))
|
||||||
|
} else {
|
||||||
|
Ok(LayerImage(Some(try!(Image::parse(context, input)))))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ pub use self::align::{AlignItems, AlignJustifyContent, AlignJustifySelf, Justify
|
||||||
pub use self::color::Color;
|
pub use self::color::Color;
|
||||||
pub use self::grid::{GridLine, TrackKeyword};
|
pub use self::grid::{GridLine, TrackKeyword};
|
||||||
pub use self::image::{AngleOrCorner, ColorStop, EndingShape as GradientEndingShape, Gradient};
|
pub use self::image::{AngleOrCorner, ColorStop, EndingShape as GradientEndingShape, Gradient};
|
||||||
pub use self::image::{GradientItem, GradientKind, HorizontalDirection, Image, ImageRect};
|
pub use self::image::{GradientItem, GradientKind, HorizontalDirection, Image, ImageRect, LayerImage};
|
||||||
pub use self::image::{LengthOrKeyword, LengthOrPercentageOrKeyword, SizeKeyword, VerticalDirection};
|
pub use self::image::{LengthOrKeyword, LengthOrPercentageOrKeyword, SizeKeyword, VerticalDirection};
|
||||||
pub use self::length::AbsoluteLength;
|
pub use self::length::AbsoluteLength;
|
||||||
pub use self::length::{FontRelativeLength, ViewportPercentageLength, CharacterWidth, Length, CalcLengthOrPercentage};
|
pub use self::length::{FontRelativeLength, ViewportPercentageLength, CharacterWidth, Length, CalcLengthOrPercentage};
|
||||||
|
|
|
@ -827,8 +827,8 @@ mod shorthand_serialization {
|
||||||
let mut properties = Vec::new();
|
let mut properties = Vec::new();
|
||||||
|
|
||||||
let image = single_vec_value_typedef!(image,
|
let image = single_vec_value_typedef!(image,
|
||||||
image::single_value::SpecifiedValue::Image(
|
image::single_value::SpecifiedValue(
|
||||||
Image::Url(SpecifiedUrl::new_for_testing("http://servo/test.png"))));
|
Some(Image::Url(SpecifiedUrl::new_for_testing("http://servo/test.png")))));
|
||||||
|
|
||||||
let mode = single_vec_keyword_value!(mode, luminance);
|
let mode = single_vec_keyword_value!(mode, luminance);
|
||||||
|
|
||||||
|
@ -882,8 +882,8 @@ mod shorthand_serialization {
|
||||||
let mut properties = Vec::new();
|
let mut properties = Vec::new();
|
||||||
|
|
||||||
let image = single_vec_value_typedef!(image,
|
let image = single_vec_value_typedef!(image,
|
||||||
image::single_value::SpecifiedValue::Image(
|
image::single_value::SpecifiedValue(
|
||||||
Image::Url(SpecifiedUrl::new_for_testing("http://servo/test.png"))));
|
Some(Image::Url(SpecifiedUrl::new_for_testing("http://servo/test.png")))));
|
||||||
|
|
||||||
let mode = single_vec_keyword_value!(mode, luminance);
|
let mode = single_vec_keyword_value!(mode, luminance);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue