198 |
}; |
}; |
199 |
|
|
200 |
my $HTMLTransparentElements = { |
my $HTMLTransparentElements = { |
201 |
$HTML_NS => {qw/ins 1 font 1 noscript 1/}, |
$HTML_NS => {qw/ins 1 del 1 font 1 noscript 1 canvas 1/}, |
202 |
## NOTE: |html:noscript| is transparent if scripting is disabled |
## NOTE: |html:noscript| is transparent if scripting is disabled |
203 |
## and not in |head|. |
## and not in |head|. |
204 |
}; |
}; |
205 |
|
|
206 |
|
## Semi-transparent: html:video, html:audio, html:object |
207 |
|
|
208 |
our $Element = {}; |
our $Element = {}; |
209 |
|
|
210 |
sub check_document ($$$;$) { |
sub check_document ($$$;$) { |
340 |
#$self->{has_uri_attr}; |
#$self->{has_uri_attr}; |
341 |
#$self->{has_hyperlink_element}; |
#$self->{has_hyperlink_element}; |
342 |
#$self->{has_charset}; |
#$self->{has_charset}; |
343 |
|
#$self->{has_base}; |
344 |
$self->{return} = { |
$self->{return} = { |
345 |
class => {}, |
class => {}, |
346 |
id => $self->{id}, table => [], term => $self->{term}, |
id => $self->{id}, table => [], term => $self->{term}, |
541 |
} # CN |
} # CN |
542 |
unshift @$sib, @cn; |
unshift @$sib, @cn; |
543 |
} |
} |
544 |
|
} elsif ($node_ns eq $HTML_NS and $node_ln eq 'object') { |
545 |
|
my @cn = @{$node->child_nodes}; |
546 |
|
CN: while (@cn) { |
547 |
|
my $cn = shift @cn; |
548 |
|
my $cnt = $cn->node_type; |
549 |
|
if ($cnt == 1) { |
550 |
|
my $cn_nsuri = $cn->namespace_uri; |
551 |
|
$cn_nsuri = '' unless defined $cn_nsuri; |
552 |
|
if ($cn_nsuri eq $HTML_NS and $cn->manakai_local_name eq 'param') { |
553 |
|
# |
554 |
|
} else { |
555 |
|
last CN; |
556 |
|
} |
557 |
|
} elsif ($cnt == 3 or $cnt == 4) { |
558 |
|
if ($cn->data =~ /[^\x09-\x0D\x20]/) { |
559 |
|
last CN; |
560 |
|
} |
561 |
|
} |
562 |
|
} # CN |
563 |
|
unshift @$sib, @cn; |
564 |
} |
} |
565 |
push @$new_todos, {type => 'element', node => $node}; |
push @$new_todos, {type => 'element', node => $node}; |
566 |
} # TP |
} # TP |