Miscellaneous build / tidy fixes.

This commit is contained in:
Emilio Cobos Álvarez 2021-02-26 12:40:48 +01:00
parent 5158f65810
commit 31e8e418ea
66 changed files with 566 additions and 294 deletions

View file

@ -16,7 +16,7 @@ doctest = false
app_units = "0.7"
atomic_refcell = "0.1.6"
canvas_traits = { path = "../canvas_traits" }
cssparser = "0.27"
cssparser = "0.28"
embedder_traits = { path = "../embedder_traits" }
euclid = "0.20"
fnv = "1.0"

View file

@ -474,6 +474,9 @@ impl<'a> BuilderForBoxFragment<'a> {
},
// Gecko-only value, represented as a (boxed) empty enum on non-Gecko.
Image::Rect(ref rect) => match **rect {},
Image::ImageSet(..) | Image::CrossFade(..) => {
unreachable!("Shouldn't be parsed on Servo for now")
},
}
}
}

View file

@ -7,7 +7,7 @@ use crate::dom_traversal::{NodeAndStyleInfo, NodeExt, PseudoElementContentItem};
use crate::replaced::ReplacedContent;
use style::properties::longhands::list_style_type::computed_value::T as ListStyleType;
use style::properties::style_structs;
use style::values::computed::url::UrlOrNone;
use style::values::computed::Image;
/// https://drafts.csswg.org/css-lists/#content-property
pub(crate) fn make_marker<'dom, Node>(
@ -21,13 +21,18 @@ where
// https://drafts.csswg.org/css-lists/#marker-image
let marker_image = || match &style.list_style_image {
UrlOrNone::Url(url) => Some(vec![
Image::Url(url) => Some(vec![
PseudoElementContentItem::Replaced(ReplacedContent::from_image_url(
info.node, context, url,
)?),
PseudoElementContentItem::Text(" ".into()),
]),
UrlOrNone::None => None,
// XXX: Non-None image types unimplemented.
Image::ImageSet(..) |
Image::Rect(..) |
Image::Gradient(..) |
Image::CrossFade(..) |
Image::None => None,
};
marker_image().or_else(|| {
Some(vec![PseudoElementContentItem::Text(