5 |
require Message::DOM::DOMException; |
require Message::DOM::DOMException; |
6 |
require Scalar::Util; |
require Scalar::Util; |
7 |
|
|
8 |
sub new ($;%) { |
sub ____new ($;%) { |
9 |
my $class = shift; |
my $class = shift; |
10 |
my $self = bless \{@_}, $class; |
my $self = bless \{@_}, $class; |
11 |
for (@{$$self->{css_rules}}) { |
for (@{$$self->{css_rules}}) { |
13 |
Scalar::Util::weaken (${$_}->{parent_style_sheet}); |
Scalar::Util::weaken (${$_}->{parent_style_sheet}); |
14 |
} |
} |
15 |
return $self; |
return $self; |
16 |
} # new |
} # ____new |
17 |
|
|
18 |
sub AUTOLOAD { |
sub AUTOLOAD { |
19 |
my $method_name = our $AUTOLOAD; |
my $method_name = our $AUTOLOAD; |
88 |
return bless \\($_[0]), 'Message::DOM::CSSRuleList'; |
return bless \\($_[0]), 'Message::DOM::CSSRuleList'; |
89 |
} # css_rules |
} # css_rules |
90 |
|
|
91 |
|
## NOTE: This is a manakai extension. |
92 |
|
sub css_text ($;$) { |
93 |
|
## TODO: setter |
94 |
|
|
95 |
|
my $r = ''; |
96 |
|
local $Error::Depth = $Error::Depth + 1; |
97 |
|
for my $rule (@{$_[0]->css_rules}) { |
98 |
|
$r .= $rule->css_text; |
99 |
|
} |
100 |
|
return $r; |
101 |
|
} # css_text |
102 |
|
|
103 |
sub owner_rule ($); |
sub owner_rule ($); |
104 |
|
|
105 |
## |CSSStyleSheet| methods |
## |CSSStyleSheet| methods |