Branch Coverage

blib/lib/CSS/DOM/Rule/Style.pm
Criterion Covered Total %
branch 10 90 11.1


line true false branch
25 54 2 if (defined wantarray)
27 30 24 if length $sel
31 3 53 if (@_)
79 84 1 if ref $old eq 'ARRAY' and defined wantarray
81 1 84 if @_
95 0 0 unless (ref $self->[3])
102 0 0 unless ($tree = $self->[3][2])
118 0 0 if ($types =~ s/^i//) { }
0 0 elsif ($tokens[0] eq '*') { }
132 0 0 if ($types =~ s/^#//) { }
0 0 elsif ($types =~ /^di/ and $tokens[0] eq '.') { }
0 0 elsif ($types =~ s/^(::?)i//) { }
0 0 elsif ($types =~ s/^:fi\)//) { }
0 0 elsif ($types =~ s/^\[i]//) { }
0 0 elsif ($types =~ /^\[id']/ and $tokens[2] eq '=') { }
0 0 elsif ($types =~ s/^\[i[~|]']//) { }
187 0 0 if (@subsel == 1 and not defined $subsel[0])
195 0 0 if ($types =~ /^(s?)d/ and $tokens[$+[1]] =~ /([>+])/) { }
203 0 0 if $types =~ s/^s//
206 0 0 if ($types =~ s/^(?:,s?|\z)//)
221 0 0 unless my $spec = _elem_matches_sel($elem, $pseudo, $_)
225 0 0 if $spec gt $specificity
236 0 0 unless my $spec = _elem_matches_subsel($elem, $pseudo, $subsels->[-1])
243 0 0 if (not $combinator) { }
246 0 0 unless $e->can('tagName')
254 0 0 if ($s)
270 0 0 unless $elem->can('tagName')
272 0 0 unless my $s = _elem_matches_subsel($elem, undef, $next_sel)
290 0 0 if (defined $tag and $tag ne '*')
291 0 0 unless $tag eq lc $elem->tagName
299 0 0 if ($type eq '#') { }
0 0 elsif ($type eq '~') { }
0 0 elsif ($type eq ':' and not $id =~ /^(?:first-l(?:ine|etter)|before|after)\z/) { }
0 0 elsif ($type =~ /:/) { }
0 0 elsif ($type eq '=') { }
0 0 elsif ($type eq '|') { }
300 0 0 unless $id eq $elem->id
305 0 0 unless defined $attr and length $attr
306 0 0 unless $attr =~ /(?:^|[ \t\r\n\f])\Q$arg\E(?:\z|[ \t\r\n\f])/
318 0 0 unless $pseudo and lc $id eq lc $pseudo
322 0 0 if (defined $arg) { }
324 0 0 unless $attr eq $arg
326 0 0 unless defined $attr or length $attr
331 0 0 unless defined $attr and length $attr
332 0 0 unless $attr =~ /^\Q$arg\E(?:-|\z)/