mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
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:
parent
2bafbb46f5
commit
5c3be71f25
1 changed files with 6 additions and 3 deletions
|
@ -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,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue