MDL-33468 css_optimiser: Fixed validation of individual background styles

This commit is contained in:
Sam Hemelryk 2012-06-11 09:32:49 +12:00
parent ecad5058a0
commit f791122195

View File

@ -3861,6 +3861,14 @@ class css_style_backgroundcolor extends css_style_color {
public function is_special_empty_value() {
return ($this->value === self::NULL_VALUE);
}
/**
* Returns true if the value for this style is valid
* @return bool
*/
public function is_valid() {
return $this->is_special_empty_value() || parent::is_valid();
}
}
/**
@ -3907,6 +3915,14 @@ class css_style_backgroundimage extends css_style_generic {
public function is_special_empty_value() {
return ($this->value === self::NULL_VALUE);
}
/**
* Returns true if the value for this style is valid
* @return bool
*/
public function is_valid() {
return $this->is_special_empty_value() || parent::is_valid();
}
}
class css_style_backgroundimage_advanced extends css_style_generic {
@ -3973,6 +3989,14 @@ class css_style_backgroundrepeat extends css_style_generic {
public function is_special_empty_value() {
return ($this->value === self::NULL_VALUE);
}
/**
* Returns true if the value for this style is valid
* @return bool
*/
public function is_valid() {
return $this->is_special_empty_value() || parent::is_valid();
}
}
/**
@ -4016,6 +4040,14 @@ class css_style_backgroundattachment extends css_style_generic {
public function is_special_empty_value() {
return ($this->value === self::NULL_VALUE);
}
/**
* Returns true if the value for this style is valid
* @return bool
*/
public function is_valid() {
return $this->is_special_empty_value() || parent::is_valid();
}
}
/**
@ -4059,6 +4091,14 @@ class css_style_backgroundposition extends css_style_generic {
public function is_special_empty_value() {
return ($this->value === self::NULL_VALUE);
}
/**
* Returns true if the value for this style is valid
* @return bool
*/
public function is_valid() {
return $this->is_special_empty_value() || parent::is_valid();
}
}
/**