/[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.6 by wakaba, Mon Jan 14 03:55:23 2008 UTC revision 1.7 by wakaba, Mon Jan 14 05:53:44 2008 UTC
# Line 60  sub ____new ($$$) { Line 60  sub ____new ($$$) {
60  sub css_text ($;$) {  sub css_text ($;$) {
61    ## TODO: setter    ## TODO: setter
62    
63    ## TODO: Browser compatibility    ## NOTE: Where and how white space characters are inserted are
64      ## intentionally changed from those in browsers so that properties are
65      ## more prettily printed.
66      ## See <http://suika.fam.cx/gate/2005/sw/cssText> for what browsers do.
67    local $Error::Depth = $Error::Depth + 1;    local $Error::Depth = $Error::Depth + 1;
68    return $_[0]->selector_text . " {\n" . $_[0]->style->css_text . "}\n";    return $_[0]->selector_text . " {\n" . $_[0]->style->css_text . '}';
69  } # css_text  } # css_text
70    
71  sub type ($) { Message::DOM::CSSRule::STYLE_RULE }  sub type ($) { Message::DOM::CSSRule::STYLE_RULE }
# Line 78  sub selector_text ($;$) { Line 81  sub selector_text ($;$) {
81    my $self = $_[0];    my $self = $_[0];
82    require Whatpm::CSS::SelectorsSerializer;    require Whatpm::CSS::SelectorsSerializer;
83    return Whatpm::CSS::SelectorsSerializer->serialize_selector_text    return Whatpm::CSS::SelectorsSerializer->serialize_selector_text
84        ($$self->{_selectors}, sub {        ($$self->{_selectors}, ${$self->parent_style_sheet}->{_nsmap});
         ## TODO: We should have some caching mechanism, otherwise  
         ## too many computation for complex selectors in long style sheet.  
         return $self->parent_style_sheet->manakai_lookup_namespace_prefix  
             ($_[0]);  
       });  
85  } # selector_text  } # selector_text
86    
87  sub style ($) {  sub style ($) {

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24