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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sat Dec 22 06:29:32 2007 UTC (16 years, 11 months ago) by wakaba
Branch: MAIN
++ manakai/lib/Message/DOM/ChangeLog	22 Dec 2007 06:29:10 -0000
2007-12-22  Wakaba  <wakaba@suika.fam.cx>

	* CSSStyleSheet.pm, CSSRule.pm, CSSRuleList.pm, CSSStyleDeclaration.pm:
	First version of CSSOM implementation.

++ manakai/lib/Message/Charset/ChangeLog	23 Nov 2007 04:23:29 -0000
2007-11-23  Wakaba  <wakaba@suika.fam.cx>

	* Info.pm (is_syntactically_valid_iana_charset_name): Function
	name was misspelled.

1 wakaba 1.1 package Message::DOM::CSSStyleSheet;
2     use strict;
3     our $VERSION=do{my @r=(q$Revision: 1.12 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};
4     push our @ISA, 'Message::IF::CSSStyleSheet';
5    
6     sub new ($) {
7     return bless \{css_rules => []}, shift;
8     } # new
9    
10     sub AUTOLOAD {
11     my $method_name = our $AUTOLOAD;
12     $method_name =~ s/.*:://;
13     return if $method_name eq 'DESTROY';
14    
15     if ({
16     ## Read-only attributes (trivial accessors)
17     href => 1,
18     owner_node => 1,
19     owner_rule => 1,
20     parent_style_sheet => 1,
21     type => 1,
22     }->{$method_name}) {
23     no strict 'refs';
24     eval qq{
25     sub $method_name (\$) {
26     return \${\$_[0]}->{$method_name};
27     }
28     };
29     goto &{ $AUTOLOAD };
30     } else {
31     require Carp;
32     Carp::croak (qq<Can't locate method "$AUTOLOAD">);
33     }
34     } # AUTOLOAD
35    
36     ## |StyleSheet| attributes
37    
38     sub disabled ($;$) {
39     if (@_ > 1) {
40     if ($_[1]) {
41     ${$_[0]}->{disabled} = 1;
42     } else {
43     delete ${$_[0]}->{disabled};
44     }
45     }
46     return ${$_[0]}->{disabled};
47     } # disabled
48    
49     sub href ($);
50    
51     ## TODO: media
52    
53     sub owner_node ($);
54    
55     sub parent_style_sheet ($);
56    
57     sub title ($;$) {
58     if (@_ > 1) {
59     if (defined $_[1]) {
60     ${$_[0]}->{title} = ''.$_[1];
61     } else {
62     delete ${$_[0]}->{title};
63     }
64     }
65     return ${$_[0]}->{title};
66     } # title
67    
68     sub type ($);
69    
70     ## |CSSStyleSheet| attributes
71    
72     sub css_rules ($) {
73     require Message::DOM::CSSRuleList;
74     return bless \\($_[0]), 'Message::DOM::CSSRuleList';
75     } # css_rules
76    
77     sub owner_rule ($);
78    
79     ## |CSSStyleSheet| methods
80    
81     ## TODO: delete_rule
82    
83     ## TODO: insert_rule
84    
85     package Message::IF::StyleSheet;
86     package Message::IF::CSSStyleSheet;
87    
88     1;
89     ## $Date:$

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24