Condition Coverage

lib/CSS/Inliner.pm
Criterion Covered Total %
condition 43 157 27.3


and 3 conditions

line !l l&&!r l&&r condition
98 26 0 2 defined $params->{'html_tree'} and $params->{'html_tree'}
0 2 0 defined $params->{'html_tree'} and $params->{'html_tree'} and ref $params->{'html_tree'} ne "HTML::TreeBuilder"
104 26 0 2 defined $params->{'html_tree'} and $params->{'html_tree'}
0 2 0 defined $params->{'html_tree'} and $params->{'html_tree'} and defined $params->{'relaxed'}
2 0 0 defined $params->{'html_tree'} and $params->{'html_tree'} and defined $params->{'relaxed'} and $params->{'relaxed'}
122 26 0 2 defined $params->{'strip_attrs'} && $params->{'strip_attrs'}
27 0 1 defined $params->{'relaxed'} && $params->{'relaxed'}
25 0 3 defined $params->{'leave_style'} && $params->{'leave_style'}
28 0 0 defined $params->{'warns_as_errors'} && $params->{'warns_as_errors'}
28 0 0 defined $params->{'agent'} && $params->{'agent'}
28 0 0 defined $params->{'encode_entities'} && $params->{'encode_entities'}
28 0 0 defined $params->{'ignore_style_type_attr'} && $params->{'ignore_style_type_attr'}
162 0 0 1 $params and $params->{'url'}
221 0 0 1 $params and $params->{'filename'}
279 0 0 27 $params and $params->{'html'}
283 0 26 1 $params and $params->{'charset'}
26 1 0 $params and $params->{'charset'} and not &find_encoding($params->{'charset'})
327 0 0 1 $params and $params->{'content'}
332 0 0 1 exists $params->{'charset'} and $params->{'charset'}
0 0 1 exists $params->{'charset'} and $params->{'charset'} and &find_encoding($params->{'charset'})
0 0 0 exists $params->{'ctcharset'} and $params->{'ctcharset'}
0 0 0 exists $params->{'ctcharset'} and $params->{'ctcharset'} and &find_encoding($params->{'ctcharset'})
344 0 0 0 $meta_charset and &find_encoding($meta_charset)
375 0 0 1 $params and $params->{'content'}
379 0 0 1 $params and $params->{'charset'}
413 0 0 27 $self->_html and $self->_html_tree
435 11 0 173 exists $entry->{'selector'} and $entry->{'declarations'}
441 135 0 38 $selector =~ /(?:^|[\w\._\*\]])::?(?:([\w\-]+))\b/io and not $1 =~ /first-child|last-child/i
670 0 0 0 $res->content_type ne "text/html" and $res->content_type ne "text/css"
715 0 0 0 $i->tag eq "form" and $base
0 0 0 $i->tag eq 'a' || $i->tag eq 'area' || $i->tag eq 'link' and $i->attr("href")
0 0 0 $i->tag eq 'a' || $i->tag eq 'area' || $i->tag eq 'link' and $i->attr("href") and not $i->attr("href") =~ /^\#/
0 0 0 $i->tag eq "td" and $i->attr("background")
0 0 0 $i->tag eq "td" and $i->attr("background") and $base
717 0 0 0 $i->attr("src") and $base
871 0 0 0 defined $i->attr('rel') && $i->attr('rel')
872 0 0 0 defined $i->attr('type') && $i->attr('type')
873 0 0 0 defined $i->attr('href') && $i->attr('href')
913 0 25 2 $i->tag eq "style" and !$i->attr('media') || $i->attr('media') =~ /\b(all|screen)\b/
942 259 0 380 ref $i and $i->isa("HTML::Element")
1013 0 0 0 not defined $meta_charset and $meta_charset_elem

or 2 conditions

line l !l condition
471 102 173 $matched_elements{$element->address} ||= []
676 0 0 $res->content || ''

or 3 conditions

line l !l&&r !l&&!r condition
94 0 28 0 ref $proto || $proto
715 0 0 0 $i->tag eq "img" or $i->tag eq "frame"
0 0 0 $i->tag eq "img" or $i->tag eq "frame" or $i->tag eq "input"
0 0 0 $i->tag eq "img" or $i->tag eq "frame" or $i->tag eq "input" or $i->tag eq "script"
0 0 0 $i->tag eq 'a' || $i->tag eq 'area' || $i->tag eq 'link'
795 0 0 0 $rel eq "stylesheet" or $type eq "text/css"
0 0 0 $rel eq "stylesheet" or $type eq "text/css" or $href =~ /\.css$/
877 0 0 0 $rel eq "stylesheet" or $type eq "text/css"
0 0 0 $rel eq "stylesheet" or $type eq "text/css" or $href =~ /.css$/
913 25 2 0 !$i->attr('media') || $i->attr('media') =~ /\b(all|screen)\b/