| 86 |
LI_EL | |
LI_EL | |
| 87 |
P_EL | |
P_EL | |
| 88 |
|
|
| 89 |
|
## ISSUE: option, optgroup, rt, rp? |
| 90 |
|
|
| 91 |
BODY_EL | |
BODY_EL | |
| 92 |
HTML_EL | |
HTML_EL | |
| 93 |
TABLE_CELL_EL | |
TABLE_CELL_EL | |
| 132 |
FORM_EL | |
FORM_EL | |
| 133 |
FRAMESET_EL | |
FRAMESET_EL | |
| 134 |
HEADING_EL | |
HEADING_EL | |
|
OPTION_EL | |
|
|
OPTGROUP_EL | |
|
| 135 |
SELECT_EL | |
SELECT_EL | |
| 136 |
TABLE_ROW_EL | |
TABLE_ROW_EL | |
| 137 |
TABLE_ROW_GROUP_EL | |
TABLE_ROW_GROUP_EL | |
| 249 |
mtext => FOREIGN_FLOW_CONTENT_EL, |
mtext => FOREIGN_FLOW_CONTENT_EL, |
| 250 |
}, |
}, |
| 251 |
$SVG_NS => { |
$SVG_NS => { |
| 252 |
foreignObject => FOREIGN_FLOW_CONTENT_EL, |
foreignObject => FOREIGN_FLOW_CONTENT_EL | MISC_SCOPING_EL, |
| 253 |
desc => FOREIGN_FLOW_CONTENT_EL, |
desc => FOREIGN_FLOW_CONTENT_EL, |
| 254 |
title => FOREIGN_FLOW_CONTENT_EL, |
title => FOREIGN_FLOW_CONTENT_EL, |
| 255 |
}, |
}, |
| 4518 |
pop @{$self->{open_elements}} |
pop @{$self->{open_elements}} |
| 4519 |
while $self->{open_elements}->[-1]->[1] & FOREIGN_EL; |
while $self->{open_elements}->[-1]->[1] & FOREIGN_EL; |
| 4520 |
|
|
| 4521 |
|
## NOTE: |<span><svg>| ... two parse errors, |<svg>| ... a parse error. |
| 4522 |
|
|
| 4523 |
$self->{insertion_mode} &= ~ IN_FOREIGN_CONTENT_IM; |
$self->{insertion_mode} &= ~ IN_FOREIGN_CONTENT_IM; |
| 4524 |
## Reprocess. |
## Reprocess. |
| 4525 |
next B; |
next B; |
| 7398 |
} |
} |
| 7399 |
!!!next-token; |
!!!next-token; |
| 7400 |
next B; |
next B; |
| 7401 |
|
} elsif ($token->{tag_name} eq 'optgroup' or |
| 7402 |
|
$token->{tag_name} eq 'option') { |
| 7403 |
|
## has an |option| element in scope |
| 7404 |
|
INSCOPE: for (reverse 0..$#{$self->{open_elements}}) { |
| 7405 |
|
my $node = $self->{open_elements}->[$_]; |
| 7406 |
|
if ($node->[1] & OPTION_EL) { |
| 7407 |
|
!!!cp ('t397.1'); |
| 7408 |
|
## NOTE: As if </option> |
| 7409 |
|
!!!back-token; # <option> or <optgroup> |
| 7410 |
|
$token = {type => END_TAG_TOKEN, tag_name => 'option', |
| 7411 |
|
line => $token->{line}, column => $token->{column}}; |
| 7412 |
|
next B; |
| 7413 |
|
} elsif ($node->[1] & SCOPING_EL) { |
| 7414 |
|
!!!cp ('t397.2'); |
| 7415 |
|
last INSCOPE; |
| 7416 |
|
} |
| 7417 |
|
} # INSCOPE |
| 7418 |
|
|
| 7419 |
|
$reconstruct_active_formatting_elements->($insert_to_current); |
| 7420 |
|
|
| 7421 |
|
!!!insert-element-t ($token->{tag_name}, $token->{attributes}, $token); |
| 7422 |
|
|
| 7423 |
|
!!!nack ('t397.3'); |
| 7424 |
|
!!!next-token; |
| 7425 |
|
redo B; |
| 7426 |
} elsif ($token->{tag_name} eq 'rt' or |
} elsif ($token->{tag_name} eq 'rt' or |
| 7427 |
$token->{tag_name} eq 'rp') { |
$token->{tag_name} eq 'rp') { |
| 7428 |
## has a |ruby| element in scope |
## has a |ruby| element in scope |
| 7470 |
|
|
| 7471 |
if ($self->{self_closing}) { |
if ($self->{self_closing}) { |
| 7472 |
pop @{$self->{open_elements}}; |
pop @{$self->{open_elements}}; |
| 7473 |
!!!ack ('t398.1'); |
!!!ack ('t398.6'); |
| 7474 |
} else { |
} else { |
| 7475 |
!!!cp ('t398.2'); |
!!!cp ('t398.7'); |
| 7476 |
$self->{insertion_mode} |= IN_FOREIGN_CONTENT_IM; |
$self->{insertion_mode} |= IN_FOREIGN_CONTENT_IM; |
| 7477 |
## NOTE: |<body><math><mi><svg>| -> "in foreign content" insertion |
## NOTE: |<body><math><mi><svg>| -> "in foreign content" insertion |
| 7478 |
## mode, "in body" (not "in foreign content") secondary insertion |
## mode, "in body" (not "in foreign content") secondary insertion |
| 7483 |
next B; |
next B; |
| 7484 |
} elsif ({ |
} elsif ({ |
| 7485 |
caption => 1, col => 1, colgroup => 1, frame => 1, |
caption => 1, col => 1, colgroup => 1, frame => 1, |
| 7486 |
frameset => 1, head => 1, option => 1, optgroup => 1, |
frameset => 1, head => 1, |
| 7487 |
tbody => 1, td => 1, tfoot => 1, th => 1, |
tbody => 1, td => 1, tfoot => 1, th => 1, |
| 7488 |
thead => 1, tr => 1, |
thead => 1, tr => 1, |
| 7489 |
}->{$token->{tag_name}}) { |
}->{$token->{tag_name}}) { |
| 7578 |
} |
} |
| 7579 |
} |
} |
| 7580 |
|
|
| 7581 |
!!!parse-error (type => 'start tag not allowed', |
## NOTE: |<marquee></body>|, |<svg><foreignobject></body>| |
| 7582 |
|
|
| 7583 |
|
!!!parse-error (type => 'unmatched end tag', |
| 7584 |
text => $token->{tag_name}, token => $token); |
text => $token->{tag_name}, token => $token); |
| 7585 |
## NOTE: Ignore the token. |
## NOTE: Ignore the token. |
| 7586 |
!!!next-token; |
!!!next-token; |
| 7892 |
|
|
| 7893 |
## Step 2 |
## Step 2 |
| 7894 |
S2: { |
S2: { |
| 7895 |
if ($node->[0]->manakai_local_name eq $token->{tag_name}) { |
my $node_tag_name = $node->[0]->manakai_local_name; |
| 7896 |
|
$node_tag_name =~ tr/A-Z/a-z/; # for SVG camelCase tag names |
| 7897 |
|
if ($node_tag_name eq $token->{tag_name}) { |
| 7898 |
## Step 1 |
## Step 1 |
| 7899 |
## generate implied end tags |
## generate implied end tags |
| 7900 |
while ($self->{open_elements}->[-1]->[1] & END_TAG_OPTIONAL_EL) { |
while ($self->{open_elements}->[-1]->[1] & END_TAG_OPTIONAL_EL) { |
| 7907 |
} |
} |
| 7908 |
|
|
| 7909 |
## Step 2 |
## Step 2 |
| 7910 |
if ($self->{open_elements}->[-1]->[0]->manakai_local_name |
my $current_tag_name |
| 7911 |
ne $token->{tag_name}) { |
= $self->{open_elements}->[-1]->[0]->manakai_local_name; |
| 7912 |
|
$current_tag_name =~ tr/A-Z/a-z/; |
| 7913 |
|
if ($current_tag_name ne $token->{tag_name}) { |
| 7914 |
!!!cp ('t431'); |
!!!cp ('t431'); |
| 7915 |
## NOTE: <x><y></x> |
## NOTE: <x><y></x> |
| 7916 |
!!!parse-error (type => 'not closed', |
!!!parse-error (type => 'not closed', |