/[suikacvs]/messaging/manakai/lib/Message/DOM/CSSStyleDeclaration.pm
Suika

Diff of /messaging/manakai/lib/Message/DOM/CSSStyleDeclaration.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by wakaba, Fri Jan 25 16:06:13 2008 UTC revision 1.14 by wakaba, Sat Jan 26 05:12:05 2008 UTC
# Line 87  sub css_text ($;$) { Line 87  sub css_text ($;$) {
87          $serialized{$prop_def->{serialize_multiple}} = 1;          $serialized{$prop_def->{serialize_multiple}} = 1;
88          my $v = $prop_def->{serialize_multiple}->($self);          my $v = $prop_def->{serialize_multiple}->($self);
89          for my $prop_name (sort {$a cmp $b} keys %$v) {          for my $prop_name (sort {$a cmp $b} keys %$v) {
90            $r .= '  ' . $prop_name . ': ' . $v->{$prop_name}->[0]            $r .= '  ' . $prop_name . ': ' . $v->{$prop_name}->[0];
91                . $v->{$prop_name}->[1] . ";\n"            $r .= ' ! ' . $v->{$prop_name}->[1] if length $v->{$prop_name}->[1];
92              $r .= ";\n";
93          }          }
94        }        }
95      } else {      } else {
# Line 127  sub get_property_priority ($$) { Line 128  sub get_property_priority ($$) {
128    my $prop_def = $Whatpm::CSS::Parser::Prop->{$prop_name};    my $prop_def = $Whatpm::CSS::Parser::Prop->{$prop_name};
129    return '' unless defined $prop_def;    return '' unless defined $prop_def;
130    
131    my $v = ${$_[0]}->{$prop_def->{key}};    if ($prop_def->{serialize}) {
132    return $v ? $v->[1] : '';      my $v = ${$_[0]}->{$prop_def->{key}};
133        return $v ? $v->[1] : '';
134      } elsif ($prop_def->{serialize_shorthand} or
135               $prop_def->{serialize_multiple}) {
136        my $v = ($prop_def->{serialize_shorthand} or
137                 $prop_def->{serialize_multiple})->($_[0]);
138        if (defined $v->{$prop_def->{css}}) {
139          return $v->{$prop_def->{css}}->[1];
140        } else {
141          return '';
142        }
143      } else {
144        die "Implementation error: No serializer for property '$prop_name'";
145      }
146  } # get_property_priority  } # get_property_priority
147    
148  sub item ($$) {  sub item ($$) {
# Line 251  sub css_text ($;$) { Line 265  sub css_text ($;$) {
265          $serialized{$prop_def->{serialize_multiple}} = 1;          $serialized{$prop_def->{serialize_multiple}} = 1;
266          my $v = $prop_def->{serialize_multiple}->($self);          my $v = $prop_def->{serialize_multiple}->($self);
267          for my $prop_name (sort {$a cmp $b} keys %$v) {          for my $prop_name (sort {$a cmp $b} keys %$v) {
268            $r .= '  ' . $prop_name . ': ' . $v->{$prop_name}->[0]            $r .= '  ' . $prop_name . ': ' . $v->{$prop_name}->[0];
269                . $v->{$prop_name}->[1] . ";\n"            $r .= ' ! ' . $v->{$prop_name}->[1] if length $v->{$prop_name}->[1];
270              $r .= ";\n";
271          }          }
272        }        }
273      } else {      } else {

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24