74 |
textarea => 1, tfoot => 1, thead => 1, title => 1, tr => 1, ul => 1, wbr => 1, |
textarea => 1, tfoot => 1, thead => 1, title => 1, tr => 1, ul => 1, wbr => 1, |
75 |
}; |
}; |
76 |
my $scoping_category = { |
my $scoping_category = { |
77 |
button => 1, caption => 1, html => 1, marquee => 1, object => 1, |
applet => 1, button => 1, caption => 1, html => 1, marquee => 1, object => 1, |
78 |
table => 1, td => 1, th => 1, |
table => 1, td => 1, th => 1, |
79 |
}; |
}; |
80 |
my $formatting_category = { |
my $formatting_category = { |
3019 |
my $formatting_end_tag = sub { |
my $formatting_end_tag = sub { |
3020 |
my $tag_name = shift; |
my $tag_name = shift; |
3021 |
|
|
3022 |
## NOTE: The adoptioon agency algorithm (AAA). |
## NOTE: The adoption agency algorithm (AAA). |
3023 |
|
|
3024 |
FET: { |
FET: { |
3025 |
## Step 1 |
## Step 1 |
3061 |
return; |
return; |
3062 |
} |
} |
3063 |
} elsif ({ |
} elsif ({ |
3064 |
table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
3065 |
button => 1, marquee => 1, object => 1, html => 1, |
button => 1, marquee => 1, object => 1, html => 1, |
3066 |
}->{$node->[1]}) { |
}->{$node->[1]}) { |
3067 |
!!!cp ('t56'); |
!!!cp ('t56'); |
3088 |
if (not $formatting_category->{$node->[1]} and |
if (not $formatting_category->{$node->[1]} and |
3089 |
#not $phrasing_category->{$node->[1]} and |
#not $phrasing_category->{$node->[1]} and |
3090 |
($special_category->{$node->[1]} or |
($special_category->{$node->[1]} or |
3091 |
$scoping_category->{$node->[1]})) { |
$scoping_category->{$node->[1]})) { ## Scoping is redundant, maybe |
3092 |
!!!cp ('t59'); |
!!!cp ('t59'); |
3093 |
$furthest_block = $node; |
$furthest_block = $node; |
3094 |
$furthest_block_i_in_open = $_; |
$furthest_block_i_in_open = $_; |
5495 |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
5496 |
redo B; |
redo B; |
5497 |
} elsif ({ |
} elsif ({ |
5498 |
table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
5499 |
button => 1, marquee => 1, object => 1, html => 1, |
button => 1, marquee => 1, object => 1, html => 1, |
5500 |
}->{$_->[1]}) { |
}->{$_->[1]}) { |
5501 |
!!!cp ('t345'); |
!!!cp ('t345'); |
5538 |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
5539 |
redo B; |
redo B; |
5540 |
} elsif ({ |
} elsif ({ |
5541 |
table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
5542 |
button => 1, marquee => 1, object => 1, html => 1, |
button => 1, marquee => 1, object => 1, html => 1, |
5543 |
}->{$_->[1]}) { |
}->{$_->[1]}) { |
5544 |
!!!cp ('t352'); |
!!!cp ('t352'); |
5560 |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
5561 |
redo B; |
redo B; |
5562 |
} elsif ({ |
} elsif ({ |
5563 |
table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
5564 |
button => 1, marquee => 1, object => 1, html => 1, |
button => 1, marquee => 1, object => 1, html => 1, |
5565 |
}->{$_->[1]}) { |
}->{$_->[1]}) { |
5566 |
!!!cp ('t354'); |
!!!cp ('t354'); |
5616 |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
5617 |
redo B; |
redo B; |
5618 |
} elsif ({ |
} elsif ({ |
5619 |
table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
5620 |
button => 1, marquee => 1, object => 1, html => 1, |
button => 1, marquee => 1, object => 1, html => 1, |
5621 |
}->{$_->[1]}) { |
}->{$_->[1]}) { |
5622 |
!!!cp ('t361'); |
!!!cp ('t361'); |
5672 |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
5673 |
redo B; |
redo B; |
5674 |
} elsif ({ |
} elsif ({ |
5675 |
table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
5676 |
button => 1, marquee => 1, object => 1, html => 1, |
button => 1, marquee => 1, object => 1, html => 1, |
5677 |
}->{$_->[1]}) { |
}->{$_->[1]}) { |
5678 |
!!!cp ('t368'); |
!!!cp ('t368'); |
5751 |
$token = {type => END_TAG_TOKEN, tag_name => 'nobr'}; |
$token = {type => END_TAG_TOKEN, tag_name => 'nobr'}; |
5752 |
redo B; |
redo B; |
5753 |
} elsif ({ |
} elsif ({ |
5754 |
table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
5755 |
button => 1, marquee => 1, object => 1, html => 1, |
button => 1, marquee => 1, object => 1, html => 1, |
5756 |
}->{$node->[1]}) { |
}->{$node->[1]}) { |
5757 |
!!!cp ('t377'); |
!!!cp ('t377'); |
5775 |
$token = {type => END_TAG_TOKEN, tag_name => 'button'}; |
$token = {type => END_TAG_TOKEN, tag_name => 'button'}; |
5776 |
redo B; |
redo B; |
5777 |
} elsif ({ |
} elsif ({ |
5778 |
table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
5779 |
button => 1, marquee => 1, object => 1, html => 1, |
button => 1, marquee => 1, object => 1, html => 1, |
5780 |
}->{$node->[1]}) { |
}->{$node->[1]}) { |
5781 |
!!!cp ('t379'); |
!!!cp ('t379'); |
5793 |
|
|
5794 |
!!!next-token; |
!!!next-token; |
5795 |
redo B; |
redo B; |
5796 |
} elsif ($token->{tag_name} eq 'marquee' or |
} elsif ({ |
5797 |
$token->{tag_name} eq 'object') { |
applet => 1, marquee => 1, object => 1, |
5798 |
|
}->{$token->{tag_name}}) { |
5799 |
!!!cp ('t380'); |
!!!cp ('t380'); |
5800 |
$reconstruct_active_formatting_elements->($insert_to_current); |
$reconstruct_active_formatting_elements->($insert_to_current); |
5801 |
|
|
5818 |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
5819 |
redo B; |
redo B; |
5820 |
} elsif ({ |
} elsif ({ |
5821 |
table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
5822 |
button => 1, marquee => 1, object => 1, html => 1, |
button => 1, marquee => 1, object => 1, html => 1, |
5823 |
}->{$_->[1]}) { |
}->{$_->[1]}) { |
5824 |
!!!cp ('t383'); |
!!!cp ('t383'); |
5863 |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
$token = {type => END_TAG_TOKEN, tag_name => 'p'}; |
5864 |
redo B; |
redo B; |
5865 |
} elsif ({ |
} elsif ({ |
5866 |
table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
5867 |
button => 1, marquee => 1, object => 1, html => 1, |
button => 1, marquee => 1, object => 1, html => 1, |
5868 |
}->{$_->[1]}) { |
}->{$_->[1]}) { |
5869 |
!!!cp ('t387'); |
!!!cp ('t387'); |
6077 |
div => 1, dl => 1, fieldset => 1, listing => 1, |
div => 1, dl => 1, fieldset => 1, listing => 1, |
6078 |
menu => 1, ol => 1, pre => 1, ul => 1, |
menu => 1, ol => 1, pre => 1, ul => 1, |
6079 |
dd => 1, dt => 1, li => 1, |
dd => 1, dt => 1, li => 1, |
6080 |
button => 1, marquee => 1, object => 1, |
applet => 1, button => 1, marquee => 1, object => 1, |
6081 |
}->{$token->{tag_name}}) { |
}->{$token->{tag_name}}) { |
6082 |
## has an element in scope |
## has an element in scope |
6083 |
my $i; |
my $i; |
6088 |
$i = $_; |
$i = $_; |
6089 |
last INSCOPE; |
last INSCOPE; |
6090 |
} elsif ({ |
} elsif ({ |
6091 |
table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
6092 |
button => 1, marquee => 1, object => 1, html => 1, |
button => 1, marquee => 1, object => 1, html => 1, |
6093 |
}->{$node->[1]}) { |
}->{$node->[1]}) { |
6094 |
!!!cp ('t411'); |
!!!cp ('t411'); |
6125 |
## Step 4. |
## Step 4. |
6126 |
$clear_up_to_marker->() |
$clear_up_to_marker->() |
6127 |
if { |
if { |
6128 |
button => 1, marquee => 1, object => 1, |
applet => 1, button => 1, marquee => 1, object => 1, |
6129 |
}->{$token->{tag_name}}; |
}->{$token->{tag_name}}; |
6130 |
} |
} |
6131 |
!!!next-token; |
!!!next-token; |
6142 |
$i = $_; |
$i = $_; |
6143 |
last INSCOPE; |
last INSCOPE; |
6144 |
} elsif ({ |
} elsif ({ |
6145 |
table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
6146 |
button => 1, marquee => 1, object => 1, html => 1, |
button => 1, marquee => 1, object => 1, html => 1, |
6147 |
}->{$node->[1]}) { |
}->{$node->[1]}) { |
6148 |
!!!cp ('t419'); |
!!!cp ('t419'); |
6190 |
$i = $_; |
$i = $_; |
6191 |
last INSCOPE; |
last INSCOPE; |
6192 |
} elsif ({ |
} elsif ({ |
6193 |
table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
6194 |
button => 1, marquee => 1, object => 1, html => 1, |
button => 1, marquee => 1, object => 1, html => 1, |
6195 |
}->{$node->[1]}) { |
}->{$node->[1]}) { |
6196 |
!!!cp ('t424'); |
!!!cp ('t424'); |
6234 |
$i = $_; |
$i = $_; |
6235 |
last INSCOPE; |
last INSCOPE; |
6236 |
} elsif ({ |
} elsif ({ |
6237 |
table => 1, caption => 1, td => 1, th => 1, |
applet => 1, table => 1, caption => 1, td => 1, th => 1, |
6238 |
button => 1, marquee => 1, object => 1, html => 1, |
button => 1, marquee => 1, object => 1, html => 1, |
6239 |
}->{$node->[1]}) { |
}->{$node->[1]}) { |
6240 |
!!!cp ('t411.1'); |
!!!cp ('t411.1'); |