| 4329 |
if ($self->{open_elements}->[0]->[0] eq $node->[0]) { |
if ($self->{open_elements}->[0]->[0] eq $node->[0]) { |
| 4330 |
$last = 1; |
$last = 1; |
| 4331 |
if (defined $self->{inner_html_node}) { |
if (defined $self->{inner_html_node}) { |
| 4332 |
if ($self->{inner_html_node}->[1] & TABLE_CELL_EL) { |
|
| 4333 |
|
$node = $self->{inner_html_node}; |
| 4334 |
# |
} else { |
| 4335 |
} else { |
die "_reset_insertion_mode: t27"; |
|
|
|
|
$node = $self->{inner_html_node}; |
|
|
} |
|
| 4336 |
} |
} |
| 4337 |
} |
} |
| 4338 |
|
|
| 4339 |
## Step 4..14 |
## Step 4..14 |
| 4340 |
my $new_mode; |
my $new_mode; |
| 4341 |
if ($node->[1] & FOREIGN_EL) { |
if ($node->[1] & FOREIGN_EL) { |
| 4342 |
## NOTE: Strictly spaking, the line below only applies to MathML and |
|
| 4343 |
## SVG elements. Currently the HTML syntax supports only MathML and |
## NOTE: Strictly spaking, the line below only applies to MathML and |
| 4344 |
## SVG elements as foreigners. |
## SVG elements. Currently the HTML syntax supports only MathML and |
| 4345 |
$new_mode = $self->{insertion_mode} | IN_FOREIGN_CONTENT_IM; |
## SVG elements as foreigners. |
| 4346 |
## ISSUE: What is set as the secondary insertion mode? |
$new_mode = $self->{insertion_mode} | IN_FOREIGN_CONTENT_IM; |
| 4347 |
} else { |
## ISSUE: What is set as the secondary insertion mode? |
| 4348 |
$new_mode = { |
} elsif ($node->[1] & TABLE_CELL_EL) { |
| 4349 |
|
if ($last) { |
| 4350 |
|
|
| 4351 |
|
# |
| 4352 |
|
} else { |
| 4353 |
|
|
| 4354 |
|
$new_mode = IN_CELL_IM; |
| 4355 |
|
} |
| 4356 |
|
} else { |
| 4357 |
|
|
| 4358 |
|
$new_mode = { |
| 4359 |
select => IN_SELECT_IM, |
select => IN_SELECT_IM, |
| 4360 |
## NOTE: |option| and |optgroup| do not set |
## NOTE: |option| and |optgroup| do not set |
| 4361 |
## insertion mode to "in select" by themselves. |
## insertion mode to "in select" by themselves. |
|
td => IN_CELL_IM, |
|
|
th => IN_CELL_IM, |
|
| 4362 |
tr => IN_ROW_IM, |
tr => IN_ROW_IM, |
| 4363 |
tbody => IN_TABLE_BODY_IM, |
tbody => IN_TABLE_BODY_IM, |
| 4364 |
thead => IN_TABLE_BODY_IM, |
thead => IN_TABLE_BODY_IM, |
| 4370 |
body => IN_BODY_IM, |
body => IN_BODY_IM, |
| 4371 |
frameset => IN_FRAMESET_IM, |
frameset => IN_FRAMESET_IM, |
| 4372 |
}->{$node->[0]->manakai_local_name}; |
}->{$node->[0]->manakai_local_name}; |
| 4373 |
} |
} |
| 4374 |
$self->{insertion_mode} = $new_mode and return if defined $new_mode; |
$self->{insertion_mode} = $new_mode and return if defined $new_mode; |
| 4375 |
|
|
| 4376 |
## Step 15 |
## Step 15 |
| 4377 |
if ($node->[1] & HTML_EL) { |
if ($node->[1] & HTML_EL) { |