3374 |
if ($self->{open_elements}->[0]->[0] eq $node->[0]) { |
if ($self->{open_elements}->[0]->[0] eq $node->[0]) { |
3375 |
$last = 1; |
$last = 1; |
3376 |
if (defined $self->{inner_html_node}) { |
if (defined $self->{inner_html_node}) { |
3377 |
if ($self->{inner_html_node}->[1] & TABLE_CELL_EL) { |
!!!cp ('t28'); |
3378 |
!!!cp ('t27'); |
$node = $self->{inner_html_node}; |
3379 |
# |
} else { |
3380 |
} else { |
die "_reset_insertion_mode: t27"; |
|
!!!cp ('t28'); |
|
|
$node = $self->{inner_html_node}; |
|
|
} |
|
3381 |
} |
} |
3382 |
} |
} |
3383 |
|
|
3384 |
## Step 4..14 |
## Step 4..14 |
3385 |
my $new_mode; |
my $new_mode; |
3386 |
if ($node->[1] & FOREIGN_EL) { |
if ($node->[1] & FOREIGN_EL) { |
3387 |
## NOTE: Strictly spaking, the line below only applies to MathML and |
!!!cp ('t28.1'); |
3388 |
## SVG elements. Currently the HTML syntax supports only MathML and |
## NOTE: Strictly spaking, the line below only applies to MathML and |
3389 |
## SVG elements as foreigners. |
## SVG elements. Currently the HTML syntax supports only MathML and |
3390 |
$new_mode = $self->{insertion_mode} | IN_FOREIGN_CONTENT_IM; |
## SVG elements as foreigners. |
3391 |
## ISSUE: What is set as the secondary insertion mode? |
$new_mode = $self->{insertion_mode} | IN_FOREIGN_CONTENT_IM; |
3392 |
} else { |
## ISSUE: What is set as the secondary insertion mode? |
3393 |
$new_mode = { |
} elsif ($node->[1] & TABLE_CELL_EL) { |
3394 |
|
if ($last) { |
3395 |
|
!!!cp ('t28.2'); |
3396 |
|
# |
3397 |
|
} else { |
3398 |
|
!!!cp ('t28.3'); |
3399 |
|
$new_mode = IN_CELL_IM; |
3400 |
|
} |
3401 |
|
} else { |
3402 |
|
!!!cp ('t28.4'); |
3403 |
|
$new_mode = { |
3404 |
select => IN_SELECT_IM, |
select => IN_SELECT_IM, |
3405 |
## NOTE: |option| and |optgroup| do not set |
## NOTE: |option| and |optgroup| do not set |
3406 |
## insertion mode to "in select" by themselves. |
## insertion mode to "in select" by themselves. |
|
td => IN_CELL_IM, |
|
|
th => IN_CELL_IM, |
|
3407 |
tr => IN_ROW_IM, |
tr => IN_ROW_IM, |
3408 |
tbody => IN_TABLE_BODY_IM, |
tbody => IN_TABLE_BODY_IM, |
3409 |
thead => IN_TABLE_BODY_IM, |
thead => IN_TABLE_BODY_IM, |
3415 |
body => IN_BODY_IM, |
body => IN_BODY_IM, |
3416 |
frameset => IN_FRAMESET_IM, |
frameset => IN_FRAMESET_IM, |
3417 |
}->{$node->[0]->manakai_local_name}; |
}->{$node->[0]->manakai_local_name}; |
3418 |
} |
} |
3419 |
$self->{insertion_mode} = $new_mode and return if defined $new_mode; |
$self->{insertion_mode} = $new_mode and return if defined $new_mode; |
3420 |
|
|
3421 |
## Step 15 |
## Step 15 |
3422 |
if ($node->[1] & HTML_EL) { |
if ($node->[1] & HTML_EL) { |