350 |
my $node_ns = $node->namespace_uri; |
my $node_ns = $node->namespace_uri; |
351 |
$node_ns = '' unless defined $node_ns; |
$node_ns = '' unless defined $node_ns; |
352 |
my $node_ln = $node->manakai_local_name; |
my $node_ln = $node->manakai_local_name; |
|
if ($node_ns eq $HTML_NS) { |
|
|
if ($node_ln eq 'noscript') { |
|
|
my $end = $self->_add_minuses ({$HTML_NS, {noscript => 1}}); |
|
|
push @$sib, $end; |
|
|
} |
|
|
} |
|
|
## TODO: |noscript| is not a transparent element in |head|. |
|
353 |
if ($HTMLTransparentElements->{$node_ns}->{$node_ln}) { |
if ($HTMLTransparentElements->{$node_ns}->{$node_ln}) { |
354 |
unshift @$sib, @{$node->child_nodes}; |
if ($node_ns eq $HTML_NS and $node_ln eq 'noscript') { |
355 |
push @$new_todos, {type => 'element-attributes', node => $node}; |
if ($parent_todo->{flag}->{in_head}) { |
356 |
last TP; |
# |
357 |
|
} else { |
358 |
|
my $end = $self->_add_minuses ({$HTML_NS, {noscript => 1}}); |
359 |
|
push @$sib, $end; |
360 |
|
|
361 |
|
unshift @$sib, @{$node->child_nodes}; |
362 |
|
push @$new_todos, {type => 'element-attributes', node => $node}; |
363 |
|
last TP; |
364 |
|
} |
365 |
|
} else { |
366 |
|
unshift @$sib, @{$node->child_nodes}; |
367 |
|
push @$new_todos, {type => 'element-attributes', node => $node}; |
368 |
|
last TP; |
369 |
|
} |
370 |
} |
} |
371 |
if ($node_ns eq $HTML_NS and ($node_ln eq 'video' or $node_ln eq 'audio')) { |
if ($node_ns eq $HTML_NS and ($node_ln eq 'video' or $node_ln eq 'audio')) { |
372 |
if ($node->has_attribute_ns (undef, 'src')) { |
if ($node->has_attribute_ns (undef, 'src')) { |