blib/lib/Mojo/DOM/CSS.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 94 | 99 | 94.9 |
line | l | !l | condition |
---|---|---|---|
174 | 5458 | 1838 | _combinator([reverse(@$_)], $current, $tree, $scope, 0) and return 1 |
233 | 15 | 33 | $_ ne $current and return undef |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
36 | 4 | 12 | 1625 | $current ne $scope and $current->[0] ne "root" |
16 | 0 | 1625 | $current ne $scope and $current->[0] ne "root" and $current = $current->[3] | |
51 | 759 | 7 | 1 | not defined $value and defined $value_re |
52 | 7 | 31 | 728 | defined $value && defined $value_re |
86 | 1320 | 742 | 2448 | @$selectors and ref $selectors->[-1] |
128 | 1604 | 1 | 69 | (my $name = $1) =~ s/^([^|]*)\|//u && $1 ne '*' |
166 | 212 | 55 | 10 | $pc->[1] eq 'has' || $pc->[1] eq 'is' || $pc->[1] eq 'not' and grep {_is_scoped($_);} @{$$pc[2];} |
218 | 0 | 44 | 10 | $current->[3] && $current->[3][0] eq 'root' |
226 | 0 | 18 | 21 | $current->[0] eq "tag" and exists $current->[2]{'href'} |
250 | 396 | 158 | 246 | $args->[0] != 0 && $delta < 0 == $args->[0] < 0 && $delta % $args->[0] == 0 |
292 | 139 | 3233 | 7009 | $is_tag and $type eq "tag" |
139 | 1769 | 1464 | $is_tag and $type eq "attr" | |
293 | 135 | 3416 | 3458 | defined $s->[1] and not $current->[1] =~ /$s->[1]/u |
294 | 3474 | 59 | 18 | defined $s->[2] and not _namespace($s->[2], $current) |
line | l | !l | condition |
---|---|---|---|
7 | 0 | 62 | $ENV{'MOJO_DOM_CSS_DEBUG'} || 0 |
105 | 108 | 177 | $2 // "" |
129 | 64 | 1 | $ns{$alias} // (return [["invalid"]]) |
154 | 42 | 9 | $2 // 0 |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
51 | 686 | 1 | 766 | not $name =~ /$name_re/u or not defined $value and defined $value_re |
52 | 38 | 438 | 290 | not defined $value && defined $value_re or $value =~ /$value_re/u |
105 | 128 | 2 | 155 | $3 // $4 |
2 | 95 | 60 | ($3 // $4) // $5 | |
115 | 6 | 5 | 291 | $name eq "has" or $name eq "is" |
11 | 44 | 247 | $name eq "has" or $name eq "is" or $name eq "not" | |
166 | 15 | 50 | 212 | $pc->[1] eq 'has' || $pc->[1] eq 'is' || $pc->[1] eq 'not' |
203 | 25 | 35 | 144 | exists $current->[2]{'checked'} || exists $current->[2]{'selected'} |
215 | 2 | 2 | 54 | $_->[0] eq 'comment' || $_->[0] eq 'pi' |
221 | 156 | 0 | 76 | $_->[0] eq "text" or $_->[0] eq "raw" |
225 | 13 | 13 | 1053 | $class eq "any-link" or $class eq "link" |
26 | 13 | 1040 | $class eq "any-link" or $class eq "link" or $class eq "visited" | |
231 | 20 | 20 | 1000 | $class eq "only-child" or $class eq "only-of-type" |
239 | 27 | 46 | 919 | $class eq 'nth-of-type' || $class eq 'nth-last-of-type' |
245 | 297 | 46 | 649 | $class eq "nth-last-child" or $class eq "nth-last-of-type" |