/[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.3 by wakaba, Sun Dec 23 08:18:59 2007 UTC revision 1.5 by wakaba, Sun Dec 23 15:45:49 2007 UTC
# Line 73  sub selector_text ($;$) { Line 73  sub selector_text ($;$) {
73    ## TODO: setter    ## TODO: setter
74    
75    ## TODO: Browser-compatible serializer    ## TODO: Browser-compatible serializer
76      ## TODO: This code does not work for cases where default namespace
77      ## has no namespace prefix declared.
78      my $self = $_[0];
79    require Whatpm::CSS::SelectorsSerializer;    require Whatpm::CSS::SelectorsSerializer;
80    return Whatpm::CSS::SelectorsSerializer->serialize_test    return Whatpm::CSS::SelectorsSerializer->serialize_test
81        (${$_[0]}->{_selectors});        ($$self->{_selectors}, sub {
82            ## TODO: We should have some caching mechanism, otherwise
83            ## too many computation for complex selectors in long style sheet.
84            return $self->parent_style_sheet->manakai_lookup_namespace_prefix
85                ($_[0]);
86          });
87  } # selector_text  } # selector_text
88    
89  sub style ($) {  sub style ($) {
# Line 91  sub ____new ($$) { Line 99  sub ____new ($$) {
99    
100  ## |CSSRule| attributes  ## |CSSRule| attributes
101    
102  ## TODO: |css_text|  sub css_text ($;$) {
103      ## TODO: setter
104    
105      ## NOTE: It will be broken if |encoding| contains |"| or |\|, but this
106      ## is what browsers do.
107      return '@charset "'.${$_[0]}->{encoding}.'";';
108    } # css_text
109    
110  sub type ($) { Message::DOM::CSSRule::CHARSET_RULE }  sub type ($) { Message::DOM::CSSRule::CHARSET_RULE }
111    
# Line 221  sub ____new ($$$) { Line 235  sub ____new ($$$) {
235    
236  ## |CSSRule| attributes  ## |CSSRule| attributes
237    
238  ## TODO: |css_text|  sub css_text ($;$) {
239      ## TODO: Setter
240    
241      ## NOTE: Sometimes ugly, but this is what Firefox does.
242      my $prefix = ${$_[0]}->{prefix};
243      return '@namespace '.($prefix ne '' ? $prefix.' ' : '').
244          'url('.${$_[0]}->{namespace_uri}.');';
245    } # css_text
246    
247  sub type ($) { Message::DOM::CSSRule::NAMESPACE_RULE }  sub type ($) { Message::DOM::CSSRule::NAMESPACE_RULE }
248    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24