/[suikacvs]/markup/html/whatpm/Whatpm/ContentChecker.pm
Suika

Diff of /markup/html/whatpm/Whatpm/ContentChecker.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.56 by wakaba, Sun Feb 10 04:09:57 2008 UTC revision 1.57 by wakaba, Sun Feb 17 06:36:28 2008 UTC
# Line 198  our $ElementDefault = { Line 198  our $ElementDefault = {
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 ($$$;$) {
# Line 338  sub check_element ($$$;$) { Line 340  sub check_element ($$$;$) {
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},
# Line 538  sub _check_get_children ($$$) { Line 541  sub _check_get_children ($$$) {
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

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24