| 525 |
|
|
| 526 |
if ($char_stream) { # if supported |
if ($char_stream) { # if supported |
| 527 |
## "Change the encoding" algorithm: |
## "Change the encoding" algorithm: |
|
|
|
|
## Step 1 |
|
|
if ($charset->{category} & |
|
|
Message::Charset::Info::CHARSET_CATEGORY_UTF16 ()) { |
|
|
$charset = Message::Charset::Info->get_by_html_name ('utf-8'); |
|
|
($char_stream, $e_status) = $charset->get_decode_handle |
|
|
($byte_stream, |
|
|
byte_buffer => \ $buffer->{buffer}); |
|
|
} |
|
|
$charset_name = $charset->get_iana_name; |
|
| 528 |
|
|
| 529 |
## Step 2 |
## Step 1 |
| 530 |
if (defined $self->{input_encoding} and |
if (defined $self->{input_encoding} and |
| 531 |
$self->{input_encoding} eq $charset_name) { |
$self->{input_encoding} eq $charset_name) { |
| 532 |
!!!parse-error (type => 'charset label:matching', |
!!!parse-error (type => 'charset label:matching', |
| 536 |
return; |
return; |
| 537 |
} |
} |
| 538 |
|
|
| 539 |
|
## Step 2 (HTML5 revision 3205) |
| 540 |
|
if (defined $self->{input_encoding} and |
| 541 |
|
Message::Charset::Info->get_by_html_name ($self->{input_encoding}) |
| 542 |
|
->{category} & Message::Charset::Info::CHARSET_CATEGORY_UTF16 ()) { |
| 543 |
|
$self->{confident} = 1; |
| 544 |
|
return; |
| 545 |
|
} |
| 546 |
|
|
| 547 |
|
## Step 3 |
| 548 |
|
if ($charset->{category} & |
| 549 |
|
Message::Charset::Info::CHARSET_CATEGORY_UTF16 ()) { |
| 550 |
|
$charset = Message::Charset::Info->get_by_html_name ('utf-8'); |
| 551 |
|
($char_stream, $e_status) = $charset->get_decode_handle |
| 552 |
|
($byte_stream, |
| 553 |
|
byte_buffer => \ $buffer->{buffer}); |
| 554 |
|
} |
| 555 |
|
$charset_name = $charset->get_iana_name; |
| 556 |
|
|
| 557 |
!!!parse-error (type => 'charset label detected', |
!!!parse-error (type => 'charset label detected', |
| 558 |
text => $self->{input_encoding}, |
text => $self->{input_encoding}, |
| 559 |
value => $charset_name, |
value => $charset_name, |
| 560 |
level => $self->{level}->{warn}, |
level => $self->{level}->{warn}, |
| 561 |
token => $token); |
token => $token); |
| 562 |
|
|
| 563 |
## Step 3 |
## Step 4 |
| 564 |
# if (can) { |
# if (can) { |
| 565 |
## change the encoding on the fly. |
## change the encoding on the fly. |
| 566 |
#$self->{confident} = 1; |
#$self->{confident} = 1; |
| 567 |
#return; |
#return; |
| 568 |
# } |
# } |
| 569 |
|
|
| 570 |
## Step 4 |
## Step 5 |
| 571 |
throw Whatpm::HTML::RestartParser (); |
throw Whatpm::HTML::RestartParser (); |
| 572 |
} |
} |
| 573 |
}; # $self->{change_encoding} |
}; # $self->{change_encoding} |
| 828 |
## combined with the original insertion mode. In thie parser, |
## combined with the original insertion mode. In thie parser, |
| 829 |
## they are stored together in the bit-or'ed form. |
## they are stored together in the bit-or'ed form. |
| 830 |
|
|
| 831 |
|
sub IM_MASK () { 0b11111111111 } |
| 832 |
|
|
| 833 |
## NOTE: "initial" and "before html" insertion modes have no constants. |
## NOTE: "initial" and "before html" insertion modes have no constants. |
| 834 |
|
|
| 835 |
## NOTE: "after after body" insertion mode. |
## NOTE: "after after body" insertion mode. |
| 944 |
$doctype->public_id ($token->{pubid}) if defined $token->{pubid}; |
$doctype->public_id ($token->{pubid}) if defined $token->{pubid}; |
| 945 |
$doctype->system_id ($token->{sysid}) if defined $token->{sysid}; |
$doctype->system_id ($token->{sysid}) if defined $token->{sysid}; |
| 946 |
## NOTE: Other DocumentType attributes are null or empty lists. |
## NOTE: Other DocumentType attributes are null or empty lists. |
| 947 |
## ISSUE: internalSubset = null?? |
## In Firefox3, |internalSubset| attribute is set to the empty |
| 948 |
|
## string, while |null| is an allowed value for the attribute |
| 949 |
|
## according to DOM3 Core. |
| 950 |
$self->{document}->append_child ($doctype); |
$self->{document}->append_child ($doctype); |
| 951 |
|
|
| 952 |
if ($token->{quirks} or $doctype_name ne 'HTML') { |
if ($token->{quirks} or $doctype_name ne 'HTML') { |
| 2259 |
$parse_rcdata->(RCDATA_CONTENT_MODEL); |
$parse_rcdata->(RCDATA_CONTENT_MODEL); |
| 2260 |
## ISSUE: A spec bug [Bug 6038] |
## ISSUE: A spec bug [Bug 6038] |
| 2261 |
splice @{$self->{open_elements}}, -2, 1, () # <head> |
splice @{$self->{open_elements}}, -2, 1, () # <head> |
| 2262 |
if ($self->{insertion_mode} & AFTER_HEAD_IM) == AFTER_HEAD_IM; |
if ($self->{insertion_mode} & IM_MASK) == AFTER_HEAD_IM; |
| 2263 |
next B; |
next B; |
| 2264 |
} elsif ($token->{tag_name} eq 'style' or |
} elsif ($token->{tag_name} eq 'style' or |
| 2265 |
$token->{tag_name} eq 'noframes') { |
$token->{tag_name} eq 'noframes') { |
| 2279 |
$parse_rcdata->(CDATA_CONTENT_MODEL); |
$parse_rcdata->(CDATA_CONTENT_MODEL); |
| 2280 |
## ISSUE: A spec bug [Bug 6038] |
## ISSUE: A spec bug [Bug 6038] |
| 2281 |
splice @{$self->{open_elements}}, -2, 1, () # <head> |
splice @{$self->{open_elements}}, -2, 1, () # <head> |
| 2282 |
if ($self->{insertion_mode} & AFTER_HEAD_IM) == AFTER_HEAD_IM; |
if ($self->{insertion_mode} & IM_MASK) == AFTER_HEAD_IM; |
| 2283 |
next B; |
next B; |
| 2284 |
} elsif ($token->{tag_name} eq 'noscript') { |
} elsif ($token->{tag_name} eq 'noscript') { |
| 2285 |
if ($self->{insertion_mode} == IN_HEAD_IM) { |
if ($self->{insertion_mode} == IN_HEAD_IM) { |
| 2327 |
$script_start_tag->(); |
$script_start_tag->(); |
| 2328 |
## ISSUE: A spec bug [Bug 6038] |
## ISSUE: A spec bug [Bug 6038] |
| 2329 |
splice @{$self->{open_elements}}, -2, 1 # <head> |
splice @{$self->{open_elements}}, -2, 1 # <head> |
| 2330 |
if ($self->{insertion_mode} & AFTER_HEAD_IM) == AFTER_HEAD_IM; |
if ($self->{insertion_mode} & IM_MASK) == AFTER_HEAD_IM; |
| 2331 |
next B; |
next B; |
| 2332 |
} elsif ($token->{tag_name} eq 'body' or |
} elsif ($token->{tag_name} eq 'body' or |
| 2333 |
$token->{tag_name} eq 'frameset') { |
$token->{tag_name} eq 'frameset') { |
| 2510 |
## Reprocess in the "after head" insertion mode... |
## Reprocess in the "after head" insertion mode... |
| 2511 |
} elsif ($self->{insertion_mode} == IN_HEAD_NOSCRIPT_IM) { |
} elsif ($self->{insertion_mode} == IN_HEAD_NOSCRIPT_IM) { |
| 2512 |
!!!cp ('t143.3'); |
!!!cp ('t143.3'); |
| 2513 |
## ISSUE: Two parse errors for <head><noscript></br> |
## NOTE: Two parse errors for <head><noscript></br> |
| 2514 |
!!!parse-error (type => 'unmatched end tag', |
!!!parse-error (type => 'unmatched end tag', |
| 2515 |
text => 'br', token => $token); |
text => 'br', token => $token); |
| 2516 |
## As if </noscript> |
## As if </noscript> |
| 2653 |
caption => 1, col => 1, colgroup => 1, tbody => 1, |
caption => 1, col => 1, colgroup => 1, tbody => 1, |
| 2654 |
td => 1, tfoot => 1, th => 1, thead => 1, tr => 1, |
td => 1, tfoot => 1, th => 1, thead => 1, tr => 1, |
| 2655 |
}->{$token->{tag_name}}) { |
}->{$token->{tag_name}}) { |
| 2656 |
if ($self->{insertion_mode} == IN_CELL_IM) { |
if (($self->{insertion_mode} & IM_MASK) == IN_CELL_IM) { |
| 2657 |
## have an element in table scope |
## have an element in table scope |
| 2658 |
for (reverse 0..$#{$self->{open_elements}}) { |
for (reverse 0..$#{$self->{open_elements}}) { |
| 2659 |
my $node = $self->{open_elements}->[$_]; |
my $node = $self->{open_elements}->[$_]; |
| 2681 |
!!!nack ('t153.1'); |
!!!nack ('t153.1'); |
| 2682 |
!!!next-token; |
!!!next-token; |
| 2683 |
next B; |
next B; |
| 2684 |
} elsif ($self->{insertion_mode} & IN_CAPTION_IM) { |
} elsif (($self->{insertion_mode} & IM_MASK) == IN_CAPTION_IM) { |
| 2685 |
!!!parse-error (type => 'not closed', text => 'caption', |
!!!parse-error (type => 'not closed', text => 'caption', |
| 2686 |
token => $token); |
token => $token); |
| 2687 |
|
|
| 2746 |
} |
} |
| 2747 |
} elsif ($token->{type} == END_TAG_TOKEN) { |
} elsif ($token->{type} == END_TAG_TOKEN) { |
| 2748 |
if ($token->{tag_name} eq 'td' or $token->{tag_name} eq 'th') { |
if ($token->{tag_name} eq 'td' or $token->{tag_name} eq 'th') { |
| 2749 |
if ($self->{insertion_mode} == IN_CELL_IM) { |
if (($self->{insertion_mode} & IM_MASK) == IN_CELL_IM) { |
| 2750 |
## have an element in table scope |
## have an element in table scope |
| 2751 |
my $i; |
my $i; |
| 2752 |
INSCOPE: for (reverse 0..$#{$self->{open_elements}}) { |
INSCOPE: for (reverse 0..$#{$self->{open_elements}}) { |
| 2796 |
|
|
| 2797 |
!!!next-token; |
!!!next-token; |
| 2798 |
next B; |
next B; |
| 2799 |
} elsif ($self->{insertion_mode} == IN_CAPTION_IM) { |
} elsif (($self->{insertion_mode} & IM_MASK) == IN_CAPTION_IM) { |
| 2800 |
!!!cp ('t169'); |
!!!cp ('t169'); |
| 2801 |
!!!parse-error (type => 'unmatched end tag', |
!!!parse-error (type => 'unmatched end tag', |
| 2802 |
text => $token->{tag_name}, token => $token); |
text => $token->{tag_name}, token => $token); |
| 2808 |
# |
# |
| 2809 |
} |
} |
| 2810 |
} elsif ($token->{tag_name} eq 'caption') { |
} elsif ($token->{tag_name} eq 'caption') { |
| 2811 |
if ($self->{insertion_mode} == IN_CAPTION_IM) { |
if (($self->{insertion_mode} & IM_MASK) == IN_CAPTION_IM) { |
| 2812 |
## have a table element in table scope |
## have a table element in table scope |
| 2813 |
my $i; |
my $i; |
| 2814 |
INSCOPE: { |
INSCOPE: { |
| 2857 |
|
|
| 2858 |
!!!next-token; |
!!!next-token; |
| 2859 |
next B; |
next B; |
| 2860 |
} elsif ($self->{insertion_mode} == IN_CELL_IM) { |
} elsif (($self->{insertion_mode} & IM_MASK) == IN_CELL_IM) { |
| 2861 |
!!!cp ('t177'); |
!!!cp ('t177'); |
| 2862 |
!!!parse-error (type => 'unmatched end tag', |
!!!parse-error (type => 'unmatched end tag', |
| 2863 |
text => $token->{tag_name}, token => $token); |
text => $token->{tag_name}, token => $token); |
| 2872 |
table => 1, tbody => 1, tfoot => 1, |
table => 1, tbody => 1, tfoot => 1, |
| 2873 |
thead => 1, tr => 1, |
thead => 1, tr => 1, |
| 2874 |
}->{$token->{tag_name}} and |
}->{$token->{tag_name}} and |
| 2875 |
$self->{insertion_mode} == IN_CELL_IM) { |
($self->{insertion_mode} & IM_MASK) == IN_CELL_IM) { |
| 2876 |
## have an element in table scope |
## have an element in table scope |
| 2877 |
my $i; |
my $i; |
| 2878 |
my $tn; |
my $tn; |
| 2909 |
next B; |
next B; |
| 2910 |
} # INSCOPE |
} # INSCOPE |
| 2911 |
} elsif ($token->{tag_name} eq 'table' and |
} elsif ($token->{tag_name} eq 'table' and |
| 2912 |
$self->{insertion_mode} == IN_CAPTION_IM) { |
($self->{insertion_mode} & IM_MASK) == IN_CAPTION_IM) { |
| 2913 |
!!!parse-error (type => 'not closed', text => 'caption', |
!!!parse-error (type => 'not closed', text => 'caption', |
| 2914 |
token => $token); |
token => $token); |
| 2915 |
|
|
| 2975 |
!!!cp ('t191'); |
!!!cp ('t191'); |
| 2976 |
# |
# |
| 2977 |
} |
} |
| 2978 |
} elsif ({ |
} elsif ({ |
| 2979 |
tbody => 1, tfoot => 1, |
tbody => 1, tfoot => 1, |
| 2980 |
thead => 1, tr => 1, |
thead => 1, tr => 1, |
| 2981 |
}->{$token->{tag_name}} and |
}->{$token->{tag_name}} and |
| 2982 |
$self->{insertion_mode} == IN_CAPTION_IM) { |
($self->{insertion_mode} & IM_MASK) == IN_CAPTION_IM) { |
| 2983 |
!!!cp ('t192'); |
!!!cp ('t192'); |
| 2984 |
!!!parse-error (type => 'unmatched end tag', |
!!!parse-error (type => 'unmatched end tag', |
| 2985 |
text => $token->{tag_name}, token => $token); |
text => $token->{tag_name}, token => $token); |
| 2986 |
## Ignore the token |
## Ignore the token |
| 2987 |
!!!next-token; |
!!!next-token; |
| 2988 |
next B; |
next B; |
| 2989 |
} else { |
} else { |
| 2990 |
!!!cp ('t193'); |
!!!cp ('t193'); |
| 2991 |
# |
# |
| 2992 |
} |
} |
| 2993 |
} elsif ($token->{type} == END_OF_FILE_TOKEN) { |
} elsif ($token->{type} == END_OF_FILE_TOKEN) { |
| 2994 |
for my $entry (@{$self->{open_elements}}) { |
for my $entry (@{$self->{open_elements}}) { |
| 2995 |
unless ($entry->[1] & ALL_END_TAG_OPTIONAL_EL) { |
unless ($entry->[1] & ALL_END_TAG_OPTIONAL_EL) { |
| 3082 |
next B; |
next B; |
| 3083 |
} elsif ($token->{type} == START_TAG_TOKEN) { |
} elsif ($token->{type} == START_TAG_TOKEN) { |
| 3084 |
if ({ |
if ({ |
| 3085 |
tr => ($self->{insertion_mode} != IN_ROW_IM), |
tr => (($self->{insertion_mode} & IM_MASK) != IN_ROW_IM), |
| 3086 |
th => 1, td => 1, |
th => 1, td => 1, |
| 3087 |
}->{$token->{tag_name}}) { |
}->{$token->{tag_name}}) { |
| 3088 |
if ($self->{insertion_mode} == IN_TABLE_IM) { |
if (($self->{insertion_mode} & IM_MASK) == IN_TABLE_IM) { |
| 3089 |
## Clear back to table context |
## Clear back to table context |
| 3090 |
while (not ($self->{open_elements}->[-1]->[1] |
while (not ($self->{open_elements}->[-1]->[1] |
| 3091 |
& TABLE_SCOPING_EL)) { |
& TABLE_SCOPING_EL)) { |
| 3098 |
## reprocess in the "in table body" insertion mode... |
## reprocess in the "in table body" insertion mode... |
| 3099 |
} |
} |
| 3100 |
|
|
| 3101 |
if ($self->{insertion_mode} == IN_TABLE_BODY_IM) { |
if (($self->{insertion_mode} & IM_MASK) == IN_TABLE_BODY_IM) { |
| 3102 |
unless ($token->{tag_name} eq 'tr') { |
unless ($token->{tag_name} eq 'tr') { |
| 3103 |
!!!cp ('t202'); |
!!!cp ('t202'); |
| 3104 |
!!!parse-error (type => 'missing start tag:tr', token => $token); |
!!!parse-error (type => 'missing start tag:tr', token => $token); |
| 3150 |
tbody => 1, tfoot => 1, thead => 1, |
tbody => 1, tfoot => 1, thead => 1, |
| 3151 |
tr => 1, # $self->{insertion_mode} == IN_ROW_IM |
tr => 1, # $self->{insertion_mode} == IN_ROW_IM |
| 3152 |
}->{$token->{tag_name}}) { |
}->{$token->{tag_name}}) { |
| 3153 |
if ($self->{insertion_mode} == IN_ROW_IM) { |
if (($self->{insertion_mode} & IM_MASK) == IN_ROW_IM) { |
| 3154 |
## As if </tr> |
## As if </tr> |
| 3155 |
## have an element in table scope |
## have an element in table scope |
| 3156 |
my $i; |
my $i; |
| 3197 |
} |
} |
| 3198 |
} |
} |
| 3199 |
|
|
| 3200 |
if ($self->{insertion_mode} == IN_TABLE_BODY_IM) { |
if (($self->{insertion_mode} & IM_MASK) == IN_TABLE_BODY_IM) { |
| 3201 |
## have an element in table scope |
## have an element in table scope |
| 3202 |
my $i; |
my $i; |
| 3203 |
INSCOPE: for (reverse 0..$#{$self->{open_elements}}) { |
INSCOPE: for (reverse 0..$#{$self->{open_elements}}) { |
| 3411 |
$insert = $insert_to_foster; |
$insert = $insert_to_foster; |
| 3412 |
# |
# |
| 3413 |
} elsif ($token->{type} == END_TAG_TOKEN) { |
} elsif ($token->{type} == END_TAG_TOKEN) { |
| 3414 |
if ($token->{tag_name} eq 'tr' and |
if ($token->{tag_name} eq 'tr' and |
| 3415 |
$self->{insertion_mode} == IN_ROW_IM) { |
($self->{insertion_mode} & IM_MASK) == IN_ROW_IM) { |
| 3416 |
## have an element in table scope |
## have an element in table scope |
| 3417 |
my $i; |
my $i; |
| 3418 |
INSCOPE: for (reverse 0..$#{$self->{open_elements}}) { |
INSCOPE: for (reverse 0..$#{$self->{open_elements}}) { |
| 3419 |
my $node = $self->{open_elements}->[$_]; |
my $node = $self->{open_elements}->[$_]; |
| 3452 |
!!!nack ('t231.1'); |
!!!nack ('t231.1'); |
| 3453 |
next B; |
next B; |
| 3454 |
} elsif ($token->{tag_name} eq 'table') { |
} elsif ($token->{tag_name} eq 'table') { |
| 3455 |
if ($self->{insertion_mode} == IN_ROW_IM) { |
if (($self->{insertion_mode} & IM_MASK) == IN_ROW_IM) { |
| 3456 |
## As if </tr> |
## As if </tr> |
| 3457 |
## have an element in table scope |
## have an element in table scope |
| 3458 |
my $i; |
my $i; |
| 3491 |
## reprocess in the "in table body" insertion mode... |
## reprocess in the "in table body" insertion mode... |
| 3492 |
} |
} |
| 3493 |
|
|
| 3494 |
if ($self->{insertion_mode} == IN_TABLE_BODY_IM) { |
if (($self->{insertion_mode} & IM_MASK) == IN_TABLE_BODY_IM) { |
| 3495 |
## have an element in table scope |
## have an element in table scope |
| 3496 |
my $i; |
my $i; |
| 3497 |
INSCOPE: for (reverse 0..$#{$self->{open_elements}}) { |
INSCOPE: for (reverse 0..$#{$self->{open_elements}}) { |
| 3573 |
tbody => 1, tfoot => 1, thead => 1, |
tbody => 1, tfoot => 1, thead => 1, |
| 3574 |
}->{$token->{tag_name}} and |
}->{$token->{tag_name}} and |
| 3575 |
$self->{insertion_mode} & ROW_IMS) { |
$self->{insertion_mode} & ROW_IMS) { |
| 3576 |
if ($self->{insertion_mode} == IN_ROW_IM) { |
if (($self->{insertion_mode} & IM_MASK) == IN_ROW_IM) { |
| 3577 |
## have an element in table scope |
## have an element in table scope |
| 3578 |
my $i; |
my $i; |
| 3579 |
INSCOPE: for (reverse 0..$#{$self->{open_elements}}) { |
INSCOPE: for (reverse 0..$#{$self->{open_elements}}) { |
| 3707 |
} else { |
} else { |
| 3708 |
die "$0: $token->{type}: Unknown token type"; |
die "$0: $token->{type}: Unknown token type"; |
| 3709 |
} |
} |
| 3710 |
} elsif ($self->{insertion_mode} == IN_COLUMN_GROUP_IM) { |
} elsif (($self->{insertion_mode} & IM_MASK) == IN_COLUMN_GROUP_IM) { |
| 3711 |
if ($token->{type} == CHARACTER_TOKEN) { |
if ($token->{type} == CHARACTER_TOKEN) { |
| 3712 |
if ($token->{data} =~ s/^([\x09\x0A\x0C\x20]+)//) { |
if ($token->{data} =~ s/^([\x09\x0A\x0C\x20]+)//) { |
| 3713 |
$self->{open_elements}->[-1]->[0]->manakai_append_text ($1); |
$self->{open_elements}->[-1]->[0]->manakai_append_text ($1); |
| 3839 |
} elsif ({ |
} elsif ({ |
| 3840 |
select => 1, input => 1, textarea => 1, |
select => 1, input => 1, textarea => 1, |
| 3841 |
}->{$token->{tag_name}} or |
}->{$token->{tag_name}} or |
| 3842 |
($self->{insertion_mode} == IN_SELECT_IN_TABLE_IM and |
(($self->{insertion_mode} & IM_MASK) |
| 3843 |
|
== IN_SELECT_IN_TABLE_IM and |
| 3844 |
{ |
{ |
| 3845 |
caption => 1, table => 1, |
caption => 1, table => 1, |
| 3846 |
tbody => 1, tfoot => 1, thead => 1, |
tbody => 1, tfoot => 1, thead => 1, |
| 3962 |
!!!nack ('t291.1'); |
!!!nack ('t291.1'); |
| 3963 |
!!!next-token; |
!!!next-token; |
| 3964 |
next B; |
next B; |
| 3965 |
} elsif ($self->{insertion_mode} == IN_SELECT_IN_TABLE_IM and |
} elsif (($self->{insertion_mode} & IM_MASK) |
| 3966 |
|
== IN_SELECT_IN_TABLE_IM and |
| 3967 |
{ |
{ |
| 3968 |
caption => 1, table => 1, tbody => 1, |
caption => 1, table => 1, tbody => 1, |
| 3969 |
tfoot => 1, thead => 1, tr => 1, td => 1, th => 1, |
tfoot => 1, thead => 1, tr => 1, td => 1, th => 1, |
| 4800 |
line => $token->{line}, column => $token->{column}}, |
line => $token->{line}, column => $token->{column}}, |
| 4801 |
{type => START_TAG_TOKEN, tag_name => 'hr', |
{type => START_TAG_TOKEN, tag_name => 'hr', |
| 4802 |
line => $token->{line}, column => $token->{column}}, |
line => $token->{line}, column => $token->{column}}, |
|
{type => START_TAG_TOKEN, tag_name => 'p', |
|
|
line => $token->{line}, column => $token->{column}}, |
|
| 4803 |
{type => START_TAG_TOKEN, tag_name => 'label', |
{type => START_TAG_TOKEN, tag_name => 'label', |
| 4804 |
line => $token->{line}, column => $token->{column}}, |
line => $token->{line}, column => $token->{column}}, |
| 4805 |
); |
); |
| 4822 |
#{type => CHARACTER_TOKEN, data => ''}, # SHOULD |
#{type => CHARACTER_TOKEN, data => ''}, # SHOULD |
| 4823 |
{type => END_TAG_TOKEN, tag_name => 'label', |
{type => END_TAG_TOKEN, tag_name => 'label', |
| 4824 |
line => $token->{line}, column => $token->{column}}, |
line => $token->{line}, column => $token->{column}}, |
|
{type => END_TAG_TOKEN, tag_name => 'p', |
|
|
line => $token->{line}, column => $token->{column}}, |
|
| 4825 |
{type => START_TAG_TOKEN, tag_name => 'hr', |
{type => START_TAG_TOKEN, tag_name => 'hr', |
| 4826 |
line => $token->{line}, column => $token->{column}}, |
line => $token->{line}, column => $token->{column}}, |
| 4827 |
{type => END_TAG_TOKEN, tag_name => 'form', |
{type => END_TAG_TOKEN, tag_name => 'form', |
| 4905 |
last INSCOPE; |
last INSCOPE; |
| 4906 |
} |
} |
| 4907 |
} # INSCOPE |
} # INSCOPE |
| 4908 |
|
|
| 4909 |
|
## TODO: <non-ruby><rt> is not allowed. |
| 4910 |
|
|
| 4911 |
!!!insert-element-t ($token->{tag_name}, $token->{attributes}, $token); |
!!!insert-element-t ($token->{tag_name}, $token->{attributes}, $token); |
| 4912 |
|
|
| 5004 |
|
|
| 5005 |
if ($self->{insertion_mode} & TABLE_IMS or |
if ($self->{insertion_mode} & TABLE_IMS or |
| 5006 |
$self->{insertion_mode} & BODY_TABLE_IMS or |
$self->{insertion_mode} & BODY_TABLE_IMS or |
| 5007 |
$self->{insertion_mode} == IN_COLUMN_GROUP_IM) { |
($self->{insertion_mode} & IM_MASK) == IN_COLUMN_GROUP_IM) { |
| 5008 |
!!!cp ('t400.1'); |
!!!cp ('t400.1'); |
| 5009 |
$self->{insertion_mode} = IN_SELECT_IN_TABLE_IM; |
$self->{insertion_mode} = IN_SELECT_IN_TABLE_IM; |
| 5010 |
} else { |
} else { |
| 5621 |
}->{$node_ln}; |
}->{$node_ln}; |
| 5622 |
$p->{content_model} = PCDATA_CONTENT_MODEL |
$p->{content_model} = PCDATA_CONTENT_MODEL |
| 5623 |
unless defined $p->{content_model}; |
unless defined $p->{content_model}; |
|
## ISSUE: What is "the name of the element"? local name? |
|
| 5624 |
|
|
| 5625 |
$p->{inner_html_node} = [$node, $el_category->{$node_ln}]; |
$p->{inner_html_node} = [$node, $el_category->{$node_ln}]; |
| 5626 |
## TODO: Foreign element OK? |
## TODO: Foreign element OK? |