Skip to content

Commit

Permalink
MDL-33468 css_optimiser: Fixed validation of individual background st…
Browse files Browse the repository at this point in the history
…yles
  • Loading branch information
Sam Hemelryk committed Jun 12, 2012
1 parent ecad505 commit f791122
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion lib/csslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3861,6 +3861,14 @@ public function consolidate_to() {
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();
}
}

/**
Expand Down Expand Up @@ -3907,6 +3915,14 @@ public function consolidate_to() {
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 {
Expand Down Expand Up @@ -3973,6 +3989,14 @@ public function consolidate_to() {
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();
}
}

/**
Expand Down Expand Up @@ -4016,6 +4040,14 @@ public function consolidate_to() {
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();
}
}

/**
Expand Down Expand Up @@ -4059,6 +4091,14 @@ public function consolidate_to() {
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();
}
}

/**
Expand Down Expand Up @@ -4435,4 +4475,4 @@ protected function clean_value($value) {
}
return trim($value);
}
}
}

0 comments on commit f791122

Please sign in to comment.