3850 |
tbody => 1, tfoot => 1, thead => 1, |
tbody => 1, tfoot => 1, thead => 1, |
3851 |
tr => 1, td => 1, th => 1, |
tr => 1, td => 1, th => 1, |
3852 |
}->{$token->{tag_name}})) { |
}->{$token->{tag_name}})) { |
3853 |
## TODO: The type below is not good - <select> is replaced by </select> |
|
3854 |
!!!parse-error (type => 'not closed', text => 'select', |
## 1. Parse error. |
3855 |
token => $token); |
if ($token->{tag_name} eq 'select') { |
3856 |
## NOTE: As if the token were </select> (<select> case) or |
!!!parse-error (type => 'select in select', ## XXX: documentation |
3857 |
## as if there were </select> (otherwise). |
token => $token); |
3858 |
## have an element in table scope |
} else { |
3859 |
|
!!!parse-error (type => 'not closed', text => 'select', |
3860 |
|
token => $token); |
3861 |
|
} |
3862 |
|
|
3863 |
|
## 2./<select>-1. Unless "have an element in table scope" (select): |
3864 |
my $i; |
my $i; |
3865 |
INSCOPE: for (reverse 0..$#{$self->{open_elements}}) { |
INSCOPE: for (reverse 0..$#{$self->{open_elements}}) { |
3866 |
my $node = $self->{open_elements}->[$_]; |
my $node = $self->{open_elements}->[$_]; |
3875 |
} # INSCOPE |
} # INSCOPE |
3876 |
unless (defined $i) { |
unless (defined $i) { |
3877 |
!!!cp ('t280'); |
!!!cp ('t280'); |
3878 |
!!!parse-error (type => 'unmatched end tag', |
if ($token->{tag_name} eq 'select') { |
3879 |
text => 'select', token => $token); |
## NOTE: This error would be raised when |
3880 |
## Ignore the token |
## |select.innerHTML = '<select>'| is executed; in this |
3881 |
|
## case two errors, "select in select" and "unmatched |
3882 |
|
## end tags" are reported to the user, the latter might |
3883 |
|
## be confusing but this is what the spec requires. |
3884 |
|
!!!parse-error (type => 'unmatched end tag', |
3885 |
|
text => 'select', |
3886 |
|
token => $token); |
3887 |
|
} |
3888 |
|
## Ignore the token. |
3889 |
!!!nack ('t280.1'); |
!!!nack ('t280.1'); |
3890 |
!!!next-token; |
!!!next-token; |
3891 |
next B; |
next B; |
3892 |
} |
} |
3893 |
|
|
3894 |
|
## 3. Otherwise, as if there were <select>: |
3895 |
|
|
3896 |
!!!cp ('t281'); |
!!!cp ('t281'); |
3897 |
splice @{$self->{open_elements}}, $i; |
splice @{$self->{open_elements}}, $i; |