333 |
## true for non-interactive content as long as the element cannot be |
## true for non-interactive content as long as the element cannot be |
334 |
## interactive content. |
## interactive content. |
335 |
|
|
336 |
if ($nsuri eq $HTML_NS and ($ln eq 'video' or $ln eq 'audio')) { |
if ($nsuri eq $HTML_NS and $ln eq 'input') { |
337 |
|
my $value = $el->get_attribute_ns (undef, 'type'); |
338 |
|
$value =~ tr/A-Z/a-z/; ## ASCII case-insensitive. |
339 |
|
return ($value ne 'hidden'); |
340 |
|
} elsif ($nsuri eq $HTML_NS and ($ln eq 'img' or $ln eq 'object')) { |
341 |
|
return $el->has_attribute_ns (undef, 'usemap'); |
342 |
|
} elsif ($nsuri eq $HTML_NS and ($ln eq 'video' or $ln eq 'audio')) { |
343 |
return $el->has_attribute_ns (undef, 'controls'); |
return $el->has_attribute_ns (undef, 'controls'); |
344 |
} elsif ($nsuri eq $HTML_NS and $ln eq 'menu') { |
} elsif ($nsuri eq $HTML_NS and $ln eq 'menu') { |
345 |
my $value = $el->get_attribute_ns (undef, 'type'); |
my $value = $el->get_attribute_ns (undef, 'type'); |
346 |
$value =~ tr/A-Z/a-z/; # ASCII case-insensitive |
$value =~ tr/A-Z/a-z/; ## ASCII case-insensitive. |
347 |
return ($value eq 'toolbar'); |
return ($value eq 'toolbar'); |
348 |
} else { |
} else { |
349 |
return 1; |
return 1; |
350 |
} |
} |
|
|
|
|
## TODO: input:not([type=hidden]) |
|
351 |
}; # $IsInHTMLInteractiveContent |
}; # $IsInHTMLInteractiveContent |
352 |
|
|
353 |
my $HTMLTransparentElements = { |
my $HTMLTransparentElements = { |