style: Remove DeclaredValue::WithVariables.

We never construct it.

Differential Revision: https://phabricator.services.mozilla.com/D5976
This commit is contained in:
Emilio Cobos Álvarez 2018-09-17 01:33:15 +00:00
parent d5ba19696a
commit c155efe7a5
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 0 additions and 10 deletions

View file

@ -543,7 +543,6 @@ impl<'a> CustomPropertiesBuilder<'a> {
self.may_have_cycles |= !specified_value.references.is_empty(); self.may_have_cycles |= !specified_value.references.is_empty();
map.insert(name.clone(), (*specified_value).clone()); map.insert(name.clone(), (*specified_value).clone());
}, },
DeclaredValue::WithVariables(_) => unreachable!(),
DeclaredValue::CSSWideKeyword(keyword) => match keyword { DeclaredValue::CSSWideKeyword(keyword) => match keyword {
CSSWideKeyword::Initial => { CSSWideKeyword::Initial => {
map.remove(name); map.remove(name);

View file

@ -379,7 +379,6 @@
% endif % endif
% endif % endif
} }
DeclaredValue::WithVariables(_) => unreachable!(),
DeclaredValue::CSSWideKeyword(keyword) => match keyword { DeclaredValue::CSSWideKeyword(keyword) => match keyword {
% if not data.current_style_struct.inherited: % if not data.current_style_struct.inherited:
CSSWideKeyword::Unset | CSSWideKeyword::Unset |

View file

@ -1444,8 +1444,6 @@ impl ShorthandId {
pub enum DeclaredValue<'a, T: 'a> { pub enum DeclaredValue<'a, T: 'a> {
/// A known specified value from the stylesheet. /// A known specified value from the stylesheet.
Value(&'a T), Value(&'a T),
/// An unparsed value that contains `var()` functions.
WithVariables(&'a Arc<UnparsedValue>),
/// An CSS-wide keyword. /// An CSS-wide keyword.
CSSWideKeyword(CSSWideKeyword), CSSWideKeyword(CSSWideKeyword),
} }
@ -1459,11 +1457,6 @@ pub enum DeclaredValue<'a, T: 'a> {
pub enum DeclaredValueOwned<T> { pub enum DeclaredValueOwned<T> {
/// A known specified value from the stylesheet. /// A known specified value from the stylesheet.
Value(T), Value(T),
/// An unparsed value that contains `var()` functions.
WithVariables(
#[cfg_attr(feature = "gecko", ignore_malloc_size_of = "XXX: how to handle this?")]
Arc<UnparsedValue>
),
/// An CSS-wide keyword. /// An CSS-wide keyword.
CSSWideKeyword(CSSWideKeyword), CSSWideKeyword(CSSWideKeyword),
} }
@ -1473,7 +1466,6 @@ impl<T> DeclaredValueOwned<T> {
fn borrow(&self) -> DeclaredValue<T> { fn borrow(&self) -> DeclaredValue<T> {
match *self { match *self {
DeclaredValueOwned::Value(ref v) => DeclaredValue::Value(v), DeclaredValueOwned::Value(ref v) => DeclaredValue::Value(v),
DeclaredValueOwned::WithVariables(ref v) => DeclaredValue::WithVariables(v),
DeclaredValueOwned::CSSWideKeyword(v) => DeclaredValue::CSSWideKeyword(v), DeclaredValueOwned::CSSWideKeyword(v) => DeclaredValue::CSSWideKeyword(v),
} }
} }