157 |
## TODO: setter |
## TODO: setter |
158 |
|
|
159 |
my $self = $_[0]; |
my $self = $_[0]; |
160 |
my $value = $$self->{cascade}->get_computed_value |
if ($prop_def->{compute} or $prop_def->{compute_multiple}) { |
161 |
($$self->{element}, $prop_def->{css}); |
my $value = $$self->{cascade}->get_computed_value |
162 |
if ($value) { |
($$self->{element}, $prop_def->{css}); |
163 |
return $prop_def->{serialize}->($self, $prop_def->{css}, $value); |
if ($value) { |
164 |
|
return $prop_def->{serialize}->($self, $prop_def->{css}, $value); |
165 |
|
} else { |
166 |
|
return ''; |
167 |
|
} |
168 |
|
} elsif ($prop_def->{serialize_multiple}) { |
169 |
|
my $v = $prop_def->{serialize_multiple}->($self); |
170 |
|
if (defined $v->{$prop_def->{css}}) { |
171 |
|
return $v->{$prop_def->{css}}; |
172 |
|
} else { |
173 |
|
return ''; |
174 |
|
} |
175 |
} else { |
} else { |
176 |
return ""; |
## TODO: This should be an error of the implementation. |
177 |
|
## However, currently some shorthand properties does not have |
178 |
|
## serializer. |
179 |
|
## TODO: Remove {serialize} from shorthand properties, since |
180 |
|
## they have no effect. |
181 |
|
warn "$0: No computed value function for $method_name"; |
182 |
|
#die "$0: No computed value function for $method_name"; |
183 |
} |
} |
184 |
}; |
}; |
185 |
goto &{ $AUTOLOAD }; |
goto &{ $AUTOLOAD }; |