| 376 |
$Namespace->{$el_nsuri}->{loaded} = 1; |
$Namespace->{$el_nsuri}->{loaded} = 1; |
| 377 |
} |
} |
| 378 |
} |
} |
| 379 |
|
|
| 380 |
|
my $element_state = {}; |
| 381 |
my $eldef = $Element->{$el_nsuri}->{$el_ln} || |
my $eldef = $Element->{$el_nsuri}->{$el_ln} || |
| 382 |
$Element->{$el_nsuri}->{''} || |
$Element->{$el_nsuri}->{''} || |
| 383 |
$ElementDefault; |
$ElementDefault; |
| 384 |
my $content_def = $item->{transparent} |
my $content_def = $item->{transparent} |
| 385 |
? $item->{parent_def} || $eldef : $eldef; |
? $item->{parent_def} || $eldef : $eldef; |
| 386 |
|
my $content_state = $item->{transparent} |
| 387 |
|
? $item->{parent_state} || $element_state : $element_state; |
| 388 |
|
|
|
my $element_state = {}; |
|
| 389 |
my @new_item; |
my @new_item; |
| 390 |
push @new_item, [$eldef->{check_start}, $self, $item, $element_state]; |
push @new_item, [$eldef->{check_start}, $self, $item, $element_state]; |
| 391 |
push @new_item, [$eldef->{check_attrs}, $self, $item, $element_state]; |
push @new_item, [$eldef->{check_attrs}, $self, $item, $element_state]; |
| 404 |
$child_nsuri eq $HTML_NS and $child_ln eq 'noscript')) { |
$child_nsuri eq $HTML_NS and $child_ln eq 'noscript')) { |
| 405 |
push @new_item, [$content_def->{check_child_element}, |
push @new_item, [$content_def->{check_child_element}, |
| 406 |
$self, $item, $child, |
$self, $item, $child, |
| 407 |
$child_nsuri, $child_ln, 1, $element_state]; |
$child_nsuri, $child_ln, 1, $content_state]; |
| 408 |
push @new_item, {type => 'element', node => $child, |
push @new_item, {type => 'element', node => $child, |
| 409 |
parent_state => $element_state, |
parent_state => $element_state, |
| 410 |
parent_def => $content_def, |
parent_def => $content_def, |
| 418 |
# |
# |
| 419 |
} else { |
} else { |
| 420 |
$content_def = $item->{parent_def} || $content_def; |
$content_def = $item->{parent_def} || $content_def; |
| 421 |
|
$content_state = $item->{parent_state} || $content_state; |
| 422 |
} |
} |
| 423 |
} elsif ($el_ln eq 'video' or $el_ln eq 'audio') { |
} elsif ($el_ln eq 'video' or $el_ln eq 'audio') { |
| 424 |
if ($self->{plus_elements}->{$child_nsuri}->{$child_ln}) { |
if ($self->{plus_elements}->{$child_nsuri}->{$child_ln}) { |
| 427 |
$element_state->{has_source} = 1; |
$element_state->{has_source} = 1; |
| 428 |
} else { |
} else { |
| 429 |
$content_def = $item->{parent_def} || $content_def; |
$content_def = $item->{parent_def} || $content_def; |
| 430 |
|
$content_state = $item->{parent_state} || $content_state; |
| 431 |
} |
} |
| 432 |
} |
} |
| 433 |
} |
} |
| 434 |
|
|
| 435 |
push @new_item, [$content_def->{check_child_element}, |
push @new_item, [$content_def->{check_child_element}, |
| 436 |
$self, $item, $child, |
$self, $item, $child, |
| 437 |
$child_nsuri, $child_ln, 0, $element_state]; |
$child_nsuri, $child_ln, 0, $content_state]; |
| 438 |
push @new_item, {type => 'element', node => $child, |
push @new_item, {type => 'element', node => $child, |
| 439 |
parent_def => $eldef, |
parent_def => $eldef, |
| 440 |
parent_state => $element_state}; |
parent_state => $element_state}; |
| 448 |
my $has_significant = ($child->data =~ /[^\x09-\x0D\x20]/); |
my $has_significant = ($child->data =~ /[^\x09-\x0D\x20]/); |
| 449 |
push @new_item, [$content_def->{check_child_text}, |
push @new_item, [$content_def->{check_child_text}, |
| 450 |
$self, $item, $child, $has_significant, |
$self, $item, $child, $has_significant, |
| 451 |
$element_state]; |
$content_state]; |
| 452 |
$element_state->{has_significant} ||= $has_significant; |
$element_state->{has_significant} ||= $has_significant; |
| 453 |
if ($has_significant and |
if ($has_significant and |
| 454 |
$HTMLSemiTransparentElements->{$el_nsuri}->{$el_ln}) { |
$HTMLSemiTransparentElements->{$el_nsuri}->{$el_ln}) { |