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

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

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

revision 1.4 by wakaba, Sun Dec 23 11:20:08 2007 UTC revision 1.5 by wakaba, Sun Dec 23 15:45:49 2007 UTC
# Line 119  sub delete_rule ($$) { Line 119  sub delete_rule ($$) {
119    
120  ## TODO: insert_rule  ## TODO: insert_rule
121    
122    ## TODO: Documentation
123    sub manakai_is_default_namespace ($$) {
124      my $uri = $_[1];
125      for my $rule (@{$_[0]->css_rules}) {
126        next if $rule->type == 2 or $rule->type == 3; # CHARSET_RULE or IMPORT_RULE
127        return 0 if $rule->type != 7; # NAMESPACE_RULE
128    
129        ## TODO: Can we insert NAMESPACE_RULE after other kinds of rules
130        ## by insert_rule?
131    
132        if ($uri eq $rule->namespace_uri) {
133          return 1 if $rule->prefix eq '';
134        }
135      }
136    
137      return 0;
138    } # manakai_is_default_namespace
139    
140    ## TODO: Documentation
141    sub manakai_lookup_namespace_prefix ($$) {
142      my $uri = $_[1];
143      for my $rule (@{$_[0]->css_rules}) {
144        next if $rule->type == 2 or $rule->type == 3; # CHARSET_RULE or IMPORT_RULE
145        return undef if $rule->type != 7; # NAMESPACE_RULE
146    
147        ## TODO: Can we insert NAMESPACE_RULE after other kinds of rules
148        ## by insert_rule?
149    
150        if ($uri eq $rule->namespace_uri) {
151          my $prefix = $rule->prefix;
152          return $prefix if $prefix ne '';
153        }
154      }
155    
156      return undef;
157    } # manakai_lookup_namespace_prefix
158    
159  package Message::IF::StyleSheet;  package Message::IF::StyleSheet;
160  package Message::IF::CSSStyleSheet;  package Message::IF::CSSStyleSheet;
161    

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24