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

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

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

revision 1.8 by wakaba, Fri Feb 8 15:08:04 2008 UTC revision 1.9 by wakaba, Mon Feb 11 00:32:53 2008 UTC
# Line 116  sub encoding ($) { Line 116  sub encoding ($) {
116  package Message::DOM::CSSImportRule;  package Message::DOM::CSSImportRule;
117  push our @ISA, 'Message::DOM::CSSRule', 'Message::IF::CSSImportRule';  push our @ISA, 'Message::DOM::CSSRule', 'Message::IF::CSSImportRule';
118    
119  sub ____new ($$$$) {  sub ____new ($$$$$) {
120    my $self = bless \{href => $_[1], media => \$_[2],    my $self = bless \{href => $_[1],
121                       style_sheet => $_[3]}, $_[0];                       base_uri => $_[2], ## Ref to base URI
122                         media => \$_[3],
123                         style_sheet => $_[4]}, $_[0];
124    require Message::DOM::MediaList;    require Message::DOM::MediaList;
125    bless $$self->{media}, 'Message::DOM::MediaList';    bless $$self->{media}, 'Message::DOM::MediaList';
126    ${$_[3]}->{owner_rule} = $self;    ${$_[4]}->{owner_rule} = $self;
127    Scalar::Util::weaken (${$_[3]}->{owner_rule});    Scalar::Util::weaken (${$_[4]}->{owner_rule});
128    return $self;    return $self;
129  } # ____new  } # ____new
130    
131  ## |CSSRule| attributes  ## |CSSRule| attributes
132    
133  ## TODO: |css_text|  sub css_text ($;$) {
134      ## TODO: setter
135    
136      my $self = shift;
137      my $r = '@import url(' . $self->href . ')';
138      my $media = ''.$self->media;
139      if ($media) {
140        $r .= ' ' . $media;
141      }
142      $r .= ';';
143      return $r;
144    } # css_text
145    
146  sub type ($) { Message::DOM::CSSRule::IMPORT_RULE }  sub type ($) { Message::DOM::CSSRule::IMPORT_RULE }
147    

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24