style: Have collect_completion_keywords return url and image-set for CursorImage

Differential Revision: https://phabricator.services.mozilla.com/D107381
This commit is contained in:
Oriol Brufau 2023-05-16 07:33:34 +02:00
parent 2bafbb46f5
commit 5c3be71f25

View file

@ -11,7 +11,7 @@ use crate::values::specified::image::Image;
use crate::values::specified::Number; use crate::values::specified::Number;
use cssparser::Parser; use cssparser::Parser;
use std::fmt::{self, Write}; use std::fmt::{self, Write};
use style_traits::{CssWriter, ParseError, SpecifiedValueInfo, StyleParseErrorKind, ToCss}; use style_traits::{CssWriter, KeywordsCollectFn, ParseError, SpecifiedValueInfo, StyleParseErrorKind, ToCss};
/// A specified value for the `cursor` property. /// A specified value for the `cursor` property.
pub type Cursor = generics::GenericCursor<CursorImage>; pub type Cursor = generics::GenericCursor<CursorImage>;
@ -69,8 +69,11 @@ impl Parse for CursorImage {
// This trait is manually implemented because we don't support the whole <image> // This trait is manually implemented because we don't support the whole <image>
// syntax for cursors // syntax for cursors
impl SpecifiedValueInfo for CursorImage {} impl SpecifiedValueInfo for CursorImage {
fn collect_completion_keywords(f: KeywordsCollectFn) {
f(&["url", "image-set"]);
}
}
/// Specified value of `-moz-force-broken-image-icon` /// Specified value of `-moz-force-broken-image-icon`
#[derive( #[derive(
Clone, Clone,