Bug 1696677 - Have collect_completion_keywords return url and image-set for CursorImage. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D107381
This commit is contained in:
Micah Tigley 2021-03-07 21:38:20 +00:00
parent dde7219f71
commit 9d0923ec27
2 changed files with 8 additions and 3 deletions

View File

@ -5810,6 +5810,7 @@ exports.CSS_PROPERTIES = {
"grab",
"grabbing",
"help",
"image-set",
"inherit",
"initial",
"move",
@ -5831,6 +5832,7 @@ exports.CSS_PROPERTIES = {
"sw-resize",
"text",
"unset",
"url",
"vertical-text",
"w-resize",
"wait",

View File

@ -11,7 +11,7 @@ use crate::values::specified::image::Image;
use crate::values::specified::Number;
use cssparser::Parser;
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.
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>
// 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`
#[derive(
Clone,